1import type * as s3control from "@distilled.cloud/aws/s3-control";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { AccessPoint } from "./AccessPoint.ts";
5
6/**
7 * Runtime binding for `s3:GetAccessPointPolicyStatus`.
8 *
9 * Indicates whether the bound {@link AccessPoint}'s policy currently allows
10 * public access — e.g. a compliance auditor Lambda that alerts on publicly
11 * exposed access points. An access point without a policy fails with the
12 * typed `NoSuchAccessPointPolicy` tag. Provide the implementation with
13 * `Effect.provide(AWS.S3Control.GetAccessPointPolicyStatusHttp)`.
14 * ### Observing an Access Point
15 * **Example:** Check Whether the Access Point Is Public
16 * ```typescript
17 * // init — bind the operation to the access point
18 * const getPolicyStatus =
19 * yield* AWS.S3Control.GetAccessPointPolicyStatus(accessPoint);
20 *
21 * // runtime
22 * const status = yield* getPolicyStatus();
23 * // status.PolicyStatus?.IsPublic === false
24 * ```
25 *
26 * @binding
27 */
28export interface GetAccessPointPolicyStatus extends Binding.Service<
29 GetAccessPointPolicyStatus,
30 "AWS.S3Control.GetAccessPointPolicyStatus",
31 (
32 accessPoint: AccessPoint,
33 ) => Effect.Effect<
34 () => Effect.Effect<
35 s3control.GetAccessPointPolicyStatusResult,
36 s3control.GetAccessPointPolicyStatusError
37 >
38 >
39> {}
40export const GetAccessPointPolicyStatus =
41 Binding.Service<GetAccessPointPolicyStatus>(
42 "AWS.S3Control.GetAccessPointPolicyStatus",
43 );