| 1 | import type * as alloydb from "@distilled.cloud/gcp/alloydb_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 { Backup } from "./Backup.ts"; |
| 6 | |
| 7 | export interface GetBackupRequest extends Omit< |
| 8 | alloydb.GetProjectsLocationsBackupsRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for AlloyDB `backups.get`. |
| 14 | * |
| 15 | * Bind this operation to a {@link Backup} in a Function/Action init |
| 16 | * phase. Provide {@link GetBackupHttp}. |
| 17 | * |
| 18 | * ### Observing Backups |
| 19 | * **Example:** Read the bound backup |
| 20 | * ```typescript |
| 21 | * const getBackup = yield* GCP.AlloyDB.GetBackup(backup); |
| 22 | * const live = yield* getBackup(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | * @category AlloyDB |
| 27 | */ |
| 28 | export interface GetBackup extends Binding.Service< |
| 29 | GetBackup, |
| 30 | "GCP.AlloyDB.GetBackup", |
| 31 | ( |
| 32 | backup: Backup, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: GetBackupRequest, |
| 36 | ) => Effect.Effect< |
| 37 | alloydb.Backup, |
| 38 | alloydb.GetProjectsLocationsBackupsError, |
| 39 | RuntimeContext |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const GetBackup = Binding.Service<GetBackup>("GCP.AlloyDB.GetBackup"); |