Skip to content

GetAccessPointPolicy

Source: src/AWS/S3Control/GetAccessPointPolicy.ts

Runtime binding for s3:GetAccessPointPolicy.

Reads the resource policy attached to the bound AccessPoint. An access point without a policy fails with the typed NoSuchAccessPointPolicy tag. Provide the implementation with Effect.provide(AWS.S3Control.GetAccessPointPolicyHttp).

// init — bind the operation to the access point
const getPolicy = yield* AWS.S3Control.GetAccessPointPolicy(accessPoint);
// runtime
const policy = yield* getPolicy().pipe(
Effect.catchTag("NoSuchAccessPointPolicy", () =>
Effect.succeed({ Policy: undefined }),
),
);