| 1 | import type * as lf from "@distilled.cloud/aws/lakeformation"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link GetEffectivePermissionsForPath}. |
| 7 | */ |
| 8 | export interface GetEffectivePermissionsForPathRequest |
| 9 | extends lf.GetEffectivePermissionsForPathRequest {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `lakeformation:GetEffectivePermissionsForPath`. |
| 13 | * |
| 14 | * Returns the Lake Formation permissions in effect for the databases and |
| 15 | * tables stored under a registered S3 path — an authorization audit for a |
| 16 | * data location. Provide the implementation with |
| 17 | * `Effect.provide(AWS.LakeFormation.GetEffectivePermissionsForPathHttp)`. |
| 18 | * ### Auditing Permissions |
| 19 | * **Example:** Audit Permissions on a Registered Location |
| 20 | * ```typescript |
| 21 | * // init — account-level binding takes no resource |
| 22 | * const getEffectivePermissions = |
| 23 | * yield* AWS.LakeFormation.GetEffectivePermissionsForPath(); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const { Permissions } = yield* getEffectivePermissions({ |
| 27 | * ResourceArn: location.resourceArn, |
| 28 | * }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface GetEffectivePermissionsForPath extends Binding.Service< |
| 34 | GetEffectivePermissionsForPath, |
| 35 | "AWS.LakeFormation.GetEffectivePermissionsForPath", |
| 36 | () => Effect.Effect< |
| 37 | ( |
| 38 | request: GetEffectivePermissionsForPathRequest, |
| 39 | ) => Effect.Effect< |
| 40 | lf.GetEffectivePermissionsForPathResponse, |
| 41 | lf.GetEffectivePermissionsForPathError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const GetEffectivePermissionsForPath = |
| 47 | Binding.Service<GetEffectivePermissionsForPath>( |
| 48 | "AWS.LakeFormation.GetEffectivePermissionsForPath", |
| 49 | ); |