1import type * as fms from "@distilled.cloud/aws/fms";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Request for {@link GetPolicy}.
7 */
8export 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 */
28export interface GetPolicy extends Binding.Service<
29 GetPolicy,
30 "AWS.FMS.GetPolicy",
31 () => Effect.Effect<
32 (
33 request: GetPolicyRequest,
34 ) => Effect.Effect<fms.GetPolicyResponse, fms.GetPolicyError>
35 >
36> {}
37
38export const GetPolicy = Binding.Service<GetPolicy>("AWS.FMS.GetPolicy");