| 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 ContinueServiceDeploymentRequest |
| 7 | extends ECS.ContinueServiceDeploymentRequest {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for `ecs:ContinueServiceDeployment`. |
| 11 | * |
| 12 | * Bind this operation to a `Service` inside a function runtime to get a |
| 13 | * callable that resumes a blue/green deployment paused at a lifecycle-hook |
| 14 | * stage — the canonical consumer is the deployment lifecycle-hook Lambda |
| 15 | * that validates the green revision and then approves (or vetoes) the |
| 16 | * traffic shift. The host is granted `ecs:ContinueServiceDeployment` on the |
| 17 | * bound service's deployments. |
| 18 | * ### Service Deployments |
| 19 | * **Example:** Approve a Lifecycle-Hook Stage |
| 20 | * ```typescript |
| 21 | * const continueServiceDeployment = |
| 22 | * yield* AWS.ECS.ContinueServiceDeployment(service); |
| 23 | * |
| 24 | * yield* continueServiceDeployment({ |
| 25 | * serviceDeploymentArn: deploymentArn, |
| 26 | * hookId, |
| 27 | * }); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface ContinueServiceDeployment extends Binding.Service< |
| 33 | ContinueServiceDeployment, |
| 34 | "AWS.ECS.ContinueServiceDeployment", |
| 35 | ( |
| 36 | service: Service, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request: ContinueServiceDeploymentRequest, |
| 40 | ) => Effect.Effect< |
| 41 | ECS.ContinueServiceDeploymentResponse, |
| 42 | ECS.ContinueServiceDeploymentError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | export const ContinueServiceDeployment = |
| 47 | Binding.Service<ContinueServiceDeployment>( |
| 48 | "AWS.ECS.ContinueServiceDeployment", |
| 49 | ); |