| 1 | import * as greengrassv2 from "@distilled.cloud/aws/greengrassv2"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeGreengrassDeploymentHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GetDeployment } from "./GetDeployment.ts"; |
| 5 | |
| 6 | export const GetDeploymentHttp = Layer.effect( |
| 7 | GetDeployment, |
| 8 | makeGreengrassDeploymentHttpBinding({ |
| 9 | tag: "AWS.GreengrassV2.GetDeployment", |
| 10 | operation: greengrassv2.getDeployment, |
| 11 | actions: ["greengrass:GetDeployment"], |
| 12 | // Deployments are backed by IoT Jobs; reading one resolves the job and |
| 13 | // the thing/thing-group target with the caller's credentials. |
| 14 | dependentActions: [ |
| 15 | "iot:DescribeJob", |
| 16 | "iot:DescribeThing", |
| 17 | "iot:DescribeThingGroup", |
| 18 | "iot:GetThingShadow", |
| 19 | ], |
| 20 | }), |
| 21 | ); |