| 1 | import type * as ECS from "@distilled.cloud/aws/ecs"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Service } from "./Service.ts"; |
| 5 | |
| 6 | export interface DescribeServiceDeploymentsRequest |
| 7 | extends ECS.DescribeServiceDeploymentsRequest {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for `ecs:DescribeServiceDeployments`. |
| 11 | * |
| 12 | * Bind this operation to a `Service` inside a function runtime to get a |
| 13 | * callable that describes the bound service's deployments — rollout state, |
| 14 | * circuit-breaker status, target service revision. The host is granted |
| 15 | * `ecs:DescribeServiceDeployments` on the service's deployments (deployment |
| 16 | * ARNs are only known at runtime, e.g. from `ListServiceDeployments`). |
| 17 | * ### Service Deployments |
| 18 | * **Example:** Inspect a Deployment's Rollout State |
| 19 | * ```typescript |
| 20 | * const describeServiceDeployments = |
| 21 | * yield* AWS.ECS.DescribeServiceDeployments(service); |
| 22 | * |
| 23 | * const response = yield* describeServiceDeployments({ |
| 24 | * serviceDeploymentArns: [deploymentArn], |
| 25 | * }); |
| 26 | * const status = response.serviceDeployments?.[0]?.status; |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface DescribeServiceDeployments extends Binding.Service< |
| 32 | DescribeServiceDeployments, |
| 33 | "AWS.ECS.DescribeServiceDeployments", |
| 34 | ( |
| 35 | service: Service, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request: DescribeServiceDeploymentsRequest, |
| 39 | ) => Effect.Effect< |
| 40 | ECS.DescribeServiceDeploymentsResponse, |
| 41 | ECS.DescribeServiceDeploymentsError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | export const DescribeServiceDeployments = |
| 46 | Binding.Service<DescribeServiceDeployments>( |
| 47 | "AWS.ECS.DescribeServiceDeployments", |
| 48 | ); |