| 1 | import type * as docdb from "@distilled.cloud/aws/docdb"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `ApplyPendingMaintenanceAction` operation (IAM |
| 7 | * action `rds:ApplyPendingMaintenanceAction` — DocumentDB shares the RDS |
| 8 | * control plane). |
| 9 | * |
| 10 | * Opts a DocumentDB cluster or instance into a pending maintenance action |
| 11 | * (`system-update`, `db-upgrade`, `ca-certificate-rotation`) immediately or |
| 12 | * at the next maintenance window — the apply half of maintenance |
| 13 | * automation. The target is an ARN carried in the request, so the grant |
| 14 | * spans the account. Provide the implementation with |
| 15 | * `Effect.provide(AWS.DocDB.ApplyPendingMaintenanceActionHttp)`. |
| 16 | * ### Maintenance |
| 17 | * **Example:** Apply Maintenance at the Next Window |
| 18 | * ```typescript |
| 19 | * const applyPending = yield* DocDB.ApplyPendingMaintenanceAction(); |
| 20 | * |
| 21 | * yield* applyPending({ |
| 22 | * ResourceIdentifier: clusterArn, |
| 23 | * ApplyAction: "system-update", |
| 24 | * OptInType: "next-maintenance", |
| 25 | * }); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface ApplyPendingMaintenanceAction extends Binding.Service< |
| 31 | ApplyPendingMaintenanceAction, |
| 32 | "AWS.DocDB.ApplyPendingMaintenanceAction", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request: docdb.ApplyPendingMaintenanceActionMessage, |
| 36 | ) => Effect.Effect< |
| 37 | docdb.ApplyPendingMaintenanceActionResult, |
| 38 | docdb.ApplyPendingMaintenanceActionError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const ApplyPendingMaintenanceAction = |
| 43 | Binding.Service<ApplyPendingMaintenanceAction>( |
| 44 | "AWS.DocDB.ApplyPendingMaintenanceAction", |
| 45 | ); |