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

main
ts 36 lines 1.01 KB
Raw
1 import type * as fms from "@distilled.cloud/aws/fms";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Request for {@link GetPolicy}.
7 */
8 export interface GetPolicyRequest extends fms.GetPolicyRequest {}
9
10 /**
11 * Runtime binding for `fms:GetPolicy`.
12 *
13 * Returns the specified Firewall Manager policy. Provide the
14 * implementation with `Effect.provide(AWS.FMS.GetPolicyHttp)`.
15 * ### Reading Policies
16 * **Example:** Read a Policy
17 * ```typescript
18 * // init — account-level binding takes no resource
19 * const getPolicy = yield* AWS.FMS.GetPolicy();
20 *
21 * // runtime
22 * const result = yield* getPolicy({ PolicyId: policyId });
23 * console.log(result.Policy?.PolicyName);
24 * ```
25 *
26 * @binding
27 */
28 export interface GetPolicy extends Binding.Service<
29 GetPolicy,
30 "AWS.FMS.GetPolicy",
31 () => Effect.Effect<
32 (request: GetPolicyRequest) => Effect.Effect<fms.GetPolicyResponse, fms.GetPolicyError>
33 >
34 > {}
35
36 export const GetPolicy = Binding.Service<GetPolicy>("AWS.FMS.GetPolicy");