| 1 | import type * as SVC from "@distilled.cloud/aws/codedeploy"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { DeploymentGroup } from "./DeploymentGroup.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `codedeploy:PutLifecycleEventHookExecutionStatus` — |
| 8 | * the canonical CodeDeploy data-plane call: a Lambda validation hook |
| 9 | * (`BeforeAllowTraffic`/`AfterAllowTraffic` for Lambda deployments, plus |
| 10 | * `BeforeInstall`/`AfterInstall`/`AfterAllowTestTraffic` for ECS) reports |
| 11 | * `Succeeded` or `Failed` back to the paused deployment. |
| 12 | * ### Lifecycle Hooks |
| 13 | * **Example:** Report a Validation Result |
| 14 | * ```typescript |
| 15 | * const putHookStatus = |
| 16 | * yield* AWS.CodeDeploy.PutLifecycleEventHookExecutionStatus(group); |
| 17 | * |
| 18 | * yield* putHookStatus({ |
| 19 | * deploymentId: event.DeploymentId, |
| 20 | * lifecycleEventHookExecutionId: event.LifecycleEventHookExecutionId, |
| 21 | * status: "Succeeded", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface PutLifecycleEventHookExecutionStatus extends Binding.Service< |
| 28 | PutLifecycleEventHookExecutionStatus, |
| 29 | "AWS.CodeDeploy.PutLifecycleEventHookExecutionStatus", |
| 30 | <G extends DeploymentGroup>( |
| 31 | group: G, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: SVC.PutLifecycleEventHookExecutionStatusInput, |
| 35 | ) => Effect.Effect< |
| 36 | SVC.PutLifecycleEventHookExecutionStatusOutput, |
| 37 | SVC.PutLifecycleEventHookExecutionStatusError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const PutLifecycleEventHookExecutionStatus = |
| 42 | Binding.Service<PutLifecycleEventHookExecutionStatus>( |
| 43 | "AWS.CodeDeploy.PutLifecycleEventHookExecutionStatus", |
| 44 | ); |