| 1 | import * as greengrassv2 from "@distilled.cloud/aws/greengrassv2"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeGreengrassAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { ListDeployments } from "./ListDeployments.ts"; |
| 5 | |
| 6 | export const ListDeploymentsHttp = Layer.effect( |
| 7 | ListDeployments, |
| 8 | makeGreengrassAccountHttpBinding({ |
| 9 | tag: "AWS.GreengrassV2.ListDeployments", |
| 10 | operation: greengrassv2.listDeployments, |
| 11 | // Enumerating deployments resolves each deployment's backing IoT Job |
| 12 | // and thing/thing-group target with the caller's credentials. |
| 13 | actions: [ |
| 14 | "greengrass:ListDeployments", |
| 15 | "iot:DescribeJob", |
| 16 | "iot:DescribeThing", |
| 17 | "iot:DescribeThingGroup", |
| 18 | "iot:GetThingShadow", |
| 19 | ], |
| 20 | }), |
| 21 | ); |