| 1 | import type * as greengrassv2 from "@distilled.cloud/aws/greengrassv2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Deployment } from "./Deployment.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `greengrass:CancelDeployment`. |
| 8 | * |
| 9 | * Halts the bound {@link Deployment}'s rollout: core devices that already |
| 10 | * received it keep running its components, but devices that have not yet |
| 11 | * applied it never will. The deployment id is injected from the binding — |
| 12 | * the canonical emergency-stop for a bad rollout. Provide the implementation |
| 13 | * with `Effect.provide(AWS.GreengrassV2.CancelDeploymentHttp)`. |
| 14 | * ### Monitoring Deployments |
| 15 | * **Example:** Emergency-Stop A Rollout |
| 16 | * ```typescript |
| 17 | * // init — bind the operation to the deployment |
| 18 | * const cancelDeployment = yield* AWS.GreengrassV2.CancelDeployment(deployment); |
| 19 | * |
| 20 | * // runtime |
| 21 | * yield* cancelDeployment(); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface CancelDeployment extends Binding.Service< |
| 27 | CancelDeployment, |
| 28 | "AWS.GreengrassV2.CancelDeployment", |
| 29 | ( |
| 30 | deployment: Deployment, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request?: Omit<greengrassv2.CancelDeploymentRequest, "deploymentId">, |
| 34 | ) => Effect.Effect< |
| 35 | greengrassv2.CancelDeploymentResponse, |
| 36 | greengrassv2.CancelDeploymentError |
| 37 | > |
| 38 | > |
| 39 | > {} |
| 40 | export const CancelDeployment = Binding.Service<CancelDeployment>( |
| 41 | "AWS.GreengrassV2.CancelDeployment", |
| 42 | ); |