| 1 | import type * as oracle from "@distilled.cloud/gcp/oracledatabase_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 { AutonomousDatabase } from "./AutonomousDatabase.ts"; |
| 6 | |
| 7 | export interface StopAutonomousDatabaseRequest extends Omit< |
| 8 | oracle.StopProjectsLocationsAutonomousDatabasesRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Oracle Database `autonomousDatabases.stop`. |
| 14 | * |
| 15 | * Grants `roles/oracledatabase.autonomousDatabaseAdmin` on the project |
| 16 | * because `autonomousDatabases.stop` is only in the admin roles and Oracle |
| 17 | * Database@Google Cloud has no per-resource IAM. |
| 18 | * |
| 19 | * ### Stopping a database |
| 20 | * **Example:** Stop the bound database |
| 21 | * ```typescript |
| 22 | * const stop = yield* GCP.OracleDatabase.StopAutonomousDatabase(db); |
| 23 | * yield* stop(); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | * @category OracleDatabase |
| 28 | */ |
| 29 | export interface StopAutonomousDatabase extends Binding.Service< |
| 30 | StopAutonomousDatabase, |
| 31 | "GCP.OracleDatabase.StopAutonomousDatabase", |
| 32 | ( |
| 33 | database: AutonomousDatabase, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: StopAutonomousDatabaseRequest, |
| 37 | ) => Effect.Effect< |
| 38 | oracle.Operation, |
| 39 | oracle.StopProjectsLocationsAutonomousDatabasesError, |
| 40 | RuntimeContext |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const StopAutonomousDatabase = Binding.Service<StopAutonomousDatabase>( |
| 46 | "GCP.OracleDatabase.StopAutonomousDatabase", |
| 47 | ); |