| 1 | import * as greengrassv2 from "@distilled.cloud/aws/greengrassv2"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeGreengrassDeploymentHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { CancelDeployment } from "./CancelDeployment.ts"; |
| 5 | |
| 6 | export const CancelDeploymentHttp = Layer.effect( |
| 7 | CancelDeployment, |
| 8 | makeGreengrassDeploymentHttpBinding({ |
| 9 | tag: "AWS.GreengrassV2.CancelDeployment", |
| 10 | operation: greengrassv2.cancelDeployment, |
| 11 | actions: ["greengrass:CancelDeployment"], |
| 12 | // Canceling a deployment cancels the backing IoT Job and resolves the |
| 13 | // thing/thing-group target with the caller's credentials. |
| 14 | dependentActions: [ |
| 15 | "iot:CancelJob", |
| 16 | "iot:DeleteThingShadow", |
| 17 | "iot:DescribeJob", |
| 18 | "iot:DescribeThing", |
| 19 | "iot:DescribeThingGroup", |
| 20 | "iot:GetThingShadow", |
| 21 | "iot:UpdateJob", |
| 22 | "iot:UpdateThingShadow", |
| 23 | ], |
| 24 | }), |
| 25 | ); |