@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, 04:45 UTC

main
ts 38 lines 1.21 KB
Raw
1 import type * as kms from "@distilled.cloud/aws/kms";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { AliasName } from "./Alias.ts";
5 import type { Key } from "./Key.ts";
6
7 export interface DescribeKeyRequest extends Omit<kms.DescribeKeyRequest, "KeyId"> {}
8
9 /**
10 * Runtime binding for `kms:DescribeKey`.
11 *
12 * Bind this operation to a KMS {@link Key} (or the `alias/...` name of a
13 * pre-existing key) to get a callable that automatically injects the
14 * `KeyId`. Useful at runtime to discover a key's state, spec, and supported
15 * algorithms before choosing a cryptographic operation.
16 *
17 * ### Key Metadata
18 * **Example:** Inspect the Bound Key
19 * ```typescript
20 * const describeKey = yield* AWS.KMS.DescribeKey(key);
21 *
22 * const { KeyMetadata } = yield* describeKey();
23 * // KeyMetadata.KeyState, KeyMetadata.KeySpec, ...
24 * ```
25 *
26 * @binding
27 */
28 export interface DescribeKey extends Binding.Service<
29 DescribeKey,
30 "AWS.KMS.DescribeKey",
31 (
32 key: Key | AliasName,
33 ) => Effect.Effect<
34 (request?: DescribeKeyRequest) => Effect.Effect<kms.DescribeKeyResponse, kms.DescribeKeyError>
35 >
36 > {}
37
38 export const DescribeKey = Binding.Service<DescribeKey>("AWS.KMS.DescribeKey");