| 1 | import type * as binaryauthorization from "@distilled.cloud/gcp/binaryauthorization_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { PlatformsPolicy } from "./PlatformsPolicy.ts"; |
| 6 | |
| 7 | export interface GetPlatformsPolicyRequest extends Omit< |
| 8 | binaryauthorization.GetProjectsPlatformsPoliciesRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Binary Authorization `platforms.policies.get`. |
| 14 | * |
| 15 | * Bind this operation to a {@link PlatformsPolicy} in a Function/Action |
| 16 | * init phase. Provide {@link GetPlatformsPolicyHttp}. |
| 17 | * |
| 18 | * ### Reading a Platform Policy |
| 19 | * **Example:** Get the bound policy |
| 20 | * ```typescript |
| 21 | * const getPolicy = yield* GCP.BinaryAuthorization.GetPlatformsPolicy( |
| 22 | * policy, |
| 23 | * ); |
| 24 | * const live = yield* getPolicy(); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | * @category BinaryAuthorization |
| 29 | */ |
| 30 | export interface GetPlatformsPolicy extends Binding.Service< |
| 31 | GetPlatformsPolicy, |
| 32 | "GCP.BinaryAuthorization.GetPlatformsPolicy", |
| 33 | ( |
| 34 | policy: PlatformsPolicy, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request?: GetPlatformsPolicyRequest, |
| 38 | ) => Effect.Effect< |
| 39 | binaryauthorization.PlatformPolicy, |
| 40 | binaryauthorization.GetProjectsPlatformsPoliciesError, |
| 41 | RuntimeContext |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const GetPlatformsPolicy = Binding.Service<GetPlatformsPolicy>( |
| 47 | "GCP.BinaryAuthorization.GetPlatformsPolicy", |
| 48 | ); |