@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 40 lines 1.33 KB
Raw
1 import type * as cloudhsm from "@distilled.cloud/aws/cloudhsm-v2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for the `DescribeClusters` operation (IAM action
7 * `cloudhsm:DescribeClusters`).
8 *
9 * Lists the account's CloudHSM clusters (optionally filtered by cluster id,
10 * VPC or state) with each cluster's HSMs embedded — the building block of
11 * cluster-health monitoring and automatic-HSM-replacement automation.
12 * Provide the implementation with
13 * `Effect.provide(AWS.CloudHSMV2.DescribeClustersHttp)`.
14 * ### Monitoring Clusters
15 * **Example:** Check A Cluster's HSM Health
16 * ```typescript
17 * const describeClusters = yield* AWS.CloudHSMV2.DescribeClusters();
18 *
19 * const page = yield* describeClusters({
20 * Filters: { clusterIds: [clusterId] },
21 * });
22 * const active = page.Clusters?.[0]?.Hsms?.filter(
23 * (hsm) => hsm.State === "ACTIVE",
24 * );
25 * ```
26 *
27 * @binding
28 */
29 export interface DescribeClusters extends Binding.Service<
30 DescribeClusters,
31 "AWS.CloudHSMV2.DescribeClusters",
32 () => Effect.Effect<
33 (
34 request?: cloudhsm.DescribeClustersRequest,
35 ) => Effect.Effect<cloudhsm.DescribeClustersResponse, cloudhsm.DescribeClustersError>
36 >
37 > {}
38 export const DescribeClusters = Binding.Service<DescribeClusters>(
39 "AWS.CloudHSMV2.DescribeClusters",
40 );