| 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 | |
| 5 | /** |
| 6 | * Runtime binding for `dms:DescribeReplications`. |
| 7 | * |
| 8 | * Bind this operation (account-level) to look up DMS Serverless |
| 9 | * replications and their provisioning/replication status — filter by |
| 10 | * `replication-config-arn` or `replication-config-id`. Pair with |
| 11 | * {@link StartReplication} / {@link StopReplication} for serverless |
| 12 | * replication automation. Provide the implementation with |
| 13 | * `Effect.provide(AWS.DMS.DescribeReplicationsHttp)`. |
| 14 | * ### Orchestrating Serverless Replications |
| 15 | * **Example:** Check a Serverless Replication's Status |
| 16 | * ```typescript |
| 17 | * // init — account-level, no target resource |
| 18 | * const describeReplications = yield* AWS.DMS.DescribeReplications(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const { Replications } = yield* describeReplications({ |
| 22 | * Filters: [{ Name: "replication-config-arn", Values: [configArn] }], |
| 23 | * }); |
| 24 | * // Replications[0].Status: "created" | "running" | "stopped" | … |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface DescribeReplications extends Binding.Service< |
| 30 | DescribeReplications, |
| 31 | "AWS.DMS.DescribeReplications", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request?: dms.DescribeReplicationsMessage, |
| 35 | ) => Effect.Effect< |
| 36 | dms.DescribeReplicationsResponse, |
| 37 | dms.DescribeReplicationsError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | |
| 42 | export const DescribeReplications = Binding.Service<DescribeReplications>( |
| 43 | "AWS.DMS.DescribeReplications", |
| 44 | ); |