@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 38 lines 1.36 KB
Raw
1 import type * as mi from "@distilled.cloud/aws/iot-managed-integrations";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ManagedThing } from "./ManagedThing.ts";
5
6 /**
7 * Runtime binding for the `GetManagedThingCertificate` operation (IAM
8 * action `iotmanagedintegrations:GetManagedThingCertificate`), scoped to
9 * one {@link ManagedThing}.
10 *
11 * Reads the (public) certificate PEM the bound device authenticates with —
12 * useful for fleet audit and certificate-rotation tooling. Provide the
13 * implementation with
14 * `Effect.provide(AWS.IoTManagedIntegrations.GetManagedThingCertificateHttp)`.
15 *
16 * ### Reading Device State
17 * **Example:** Fetch the Device Certificate
18 * ```typescript
19 * const getCertificate =
20 * yield* IoTManagedIntegrations.GetManagedThingCertificate(thing);
21 *
22 * const { CertificatePem } = yield* getCertificate();
23 * ```
24 *
25 * @binding
26 */
27 export interface GetManagedThingCertificate extends Binding.Service<
28 GetManagedThingCertificate,
29 "AWS.IoTManagedIntegrations.GetManagedThingCertificate",
30 (
31 thing: ManagedThing,
32 ) => Effect.Effect<
33 () => Effect.Effect<mi.GetManagedThingCertificateResponse, mi.GetManagedThingCertificateError>
34 >
35 > {}
36 export const GetManagedThingCertificate = Binding.Service<GetManagedThingCertificate>(
37 "AWS.IoTManagedIntegrations.GetManagedThingCertificate",
38 );