| 1 | import type * as dms from "@distilled.cloud/aws/database-migration-service"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { ReplicationInstance } from "./ReplicationInstance.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `dms:RebootReplicationInstance`. |
| 8 | * |
| 9 | * Bind this operation to a {@link ReplicationInstance} to reboot it (e.g. to |
| 10 | * recover a stuck migration or force a Multi-AZ failover with |
| 11 | * `ForceFailover`). Provide the implementation with |
| 12 | * `Effect.provide(AWS.DMS.RebootReplicationInstanceHttp)`. |
| 13 | * ### Rebooting an Instance |
| 14 | * **Example:** Reboot with Planned Failover |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the instance |
| 17 | * const reboot = yield* AWS.DMS.RebootReplicationInstance(instance); |
| 18 | * |
| 19 | * // runtime |
| 20 | * yield* reboot({ ForcePlannedFailover: true }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface RebootReplicationInstance extends Binding.Service< |
| 26 | RebootReplicationInstance, |
| 27 | "AWS.DMS.RebootReplicationInstance", |
| 28 | ( |
| 29 | instance: ReplicationInstance, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request?: Omit< |
| 33 | dms.RebootReplicationInstanceMessage, |
| 34 | "ReplicationInstanceArn" |
| 35 | >, |
| 36 | ) => Effect.Effect< |
| 37 | dms.RebootReplicationInstanceResponse, |
| 38 | dms.RebootReplicationInstanceError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const RebootReplicationInstance = |
| 44 | Binding.Service<RebootReplicationInstance>( |
| 45 | "AWS.DMS.RebootReplicationInstance", |
| 46 | ); |