| 1 | import type * as composer from "@distilled.cloud/gcp/composer_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 { EnvironmentsUserWorkloadsSecret } from "./EnvironmentsUserWorkloadsSecret.ts"; |
| 6 | |
| 7 | export interface GetUserWorkloadsSecretRequest extends Omit< |
| 8 | composer.GetProjectsLocationsEnvironmentsUserWorkloadsSecretsRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Cloud Composer `userWorkloadsSecrets.get`. |
| 14 | * |
| 15 | * Bind this operation to an {@link EnvironmentsUserWorkloadsSecret} in a |
| 16 | * Function/Action init phase. Provide {@link GetUserWorkloadsSecretHttp}. |
| 17 | * Data values in the response are cleared by the API. |
| 18 | * |
| 19 | * ### Observing Secrets |
| 20 | * **Example:** Read the bound Secret |
| 21 | * ```typescript |
| 22 | * const getSecret = yield* GCP.Composer.GetUserWorkloadsSecret(secret); |
| 23 | * const live = yield* getSecret(); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | * @category Composer |
| 28 | */ |
| 29 | export interface GetUserWorkloadsSecret extends Binding.Service< |
| 30 | GetUserWorkloadsSecret, |
| 31 | "GCP.Composer.GetUserWorkloadsSecret", |
| 32 | ( |
| 33 | secret: EnvironmentsUserWorkloadsSecret, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: GetUserWorkloadsSecretRequest, |
| 37 | ) => Effect.Effect< |
| 38 | composer.UserWorkloadsSecret, |
| 39 | composer.GetProjectsLocationsEnvironmentsUserWorkloadsSecretsError, |
| 40 | RuntimeContext |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const GetUserWorkloadsSecret = Binding.Service<GetUserWorkloadsSecret>( |
| 46 | "GCP.Composer.GetUserWorkloadsSecret", |
| 47 | ); |