@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 43 lines 1.47 KB
Raw
1 import type * as SSM from "@distilled.cloud/aws/ssm";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Parameter } from "./Parameter.ts";
5
6 export interface LabelParameterVersionRequest extends Omit<
7 SSM.LabelParameterVersionRequest,
8 "Name"
9 > {}
10
11 /**
12 * Runtime binding for `ssm:LabelParameterVersion`.
13 *
14 * Bind this operation to a `Parameter` inside a function runtime to get a
15 * callable that attaches labels (e.g. `current`, `stable`) to a version of
16 * the bound parameter. Omitting `ParameterVersion` labels the latest version.
17 * Labels enable versioned rollouts: readers pass `Name:label` selectors to
18 * `GetParameter` while writers move the label between versions.
19 * ### Labeling Parameter Versions
20 * **Example:** Mark the Latest Version as Current
21 * ```typescript
22 * const label = yield* SSM.LabelParameterVersion(config);
23 *
24 * const result = yield* label({ Labels: ["current"] });
25 * yield* Effect.log(`labeled version ${result.ParameterVersion}`);
26 * ```
27 *
28 * @binding
29 */
30 export interface LabelParameterVersion extends Binding.Service<
31 LabelParameterVersion,
32 "AWS.SSM.LabelParameterVersion",
33 <P extends Parameter>(
34 parameter: P,
35 ) => Effect.Effect<
36 (
37 request: LabelParameterVersionRequest,
38 ) => Effect.Effect<SSM.LabelParameterVersionResult, SSM.LabelParameterVersionError>
39 >
40 > {}
41 export const LabelParameterVersion = Binding.Service<LabelParameterVersion>(
42 "AWS.SSM.LabelParameterVersion",
43 );