The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as iotw from "@distilled.cloud/aws/iot-wireless"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeIotWirelessDeviceHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GetResourcePosition, type GetResourcePositionRequest } from "./GetResourcePosition.ts"; |
| 5 | |
| 6 | export const GetResourcePositionHttp = Layer.effect( |
| 7 | GetResourcePosition, |
| 8 | makeIotWirelessDeviceHttpBinding({ |
| 9 | capability: "GetResourcePosition", |
| 10 | iamActions: ["iotwireless:GetResourcePosition"], |
| 11 | // IoT Wireless authorizes the position APIs against a type-level ARN |
| 12 | // (…:WirelessDevice/WirelessDevice) — the device ARN never matches. |
| 13 | resourceScope: "any", |
| 14 | operation: iotw.getResourcePosition, |
| 15 | prepare: (request: GetResourcePositionRequest | undefined, wirelessDeviceId) => ({ |
| 16 | ...request, |
| 17 | ResourceIdentifier: wirelessDeviceId, |
| 18 | ResourceType: "WirelessDevice" as const, |
| 19 | }), |
| 20 | }), |
| 21 | ); |