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

main
ts 40 lines 1.42 KB
Raw
1 import type * as iam from "@distilled.cloud/aws/iam";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `iam:GetContextKeysForCustomPolicy` — list the condition
7 * context keys (`aws:username`, `aws:SourceIp`, …) referenced by a set of
8 * candidate policy documents, so a simulation can be primed with the right
9 * `ContextEntries`.
10 *
11 * The policies are supplied as strings per request, so the binding takes no
12 * arguments and grants `iam:GetContextKeysForCustomPolicy` on `*`. Provide the
13 * implementation with `Effect.provide(AWS.IAM.GetContextKeysForCustomPolicyHttp)`.
14 *
15 * ### Simulating Policies
16 * **Example:** Discover a Policy's Context Keys
17 * ```typescript
18 * // init
19 * const getContextKeys = yield* IAM.GetContextKeysForCustomPolicy();
20 *
21 * // runtime
22 * const { ContextKeyNames } = yield* getContextKeys({
23 * PolicyInputList: [policyJson],
24 * });
25 * ```
26 *
27 * @binding
28 */
29 export interface GetContextKeysForCustomPolicy extends Binding.Service<
30 GetContextKeysForCustomPolicy,
31 "AWS.IAM.GetContextKeysForCustomPolicy",
32 () => Effect.Effect<
33 (
34 request: iam.GetContextKeysForCustomPolicyRequest,
35 ) => Effect.Effect<iam.GetContextKeysForPolicyResponse, iam.GetContextKeysForCustomPolicyError>
36 >
37 > {}
38 export const GetContextKeysForCustomPolicy = Binding.Service<GetContextKeysForCustomPolicy>(
39 "AWS.IAM.GetContextKeysForCustomPolicy",
40 );