1import * as greengrassv2 from "@distilled.cloud/aws/greengrassv2";
2import * as Layer from "effect/Layer";
3import { makeGreengrassAccountHttpBinding } from "./BindingHttp.ts";
4import { GetCoreDevice } from "./GetCoreDevice.ts";
5
6export const GetCoreDeviceHttp = Layer.effect(
7 GetCoreDevice,
8 makeGreengrassAccountHttpBinding({
9 tag: "AWS.GreengrassV2.GetCoreDevice",
10 operation: greengrassv2.getCoreDevice,
11 // Core devices are IoT things; Greengrass authorizes the IoT-side lookup
12 // with the caller's credentials before resolving the device (observed
13 // "not authorized to call Iot Core services for thing" without it).
14 actions: ["greengrass:GetCoreDevice", "iot:DescribeThing"],
15 }),
16);