| 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 GetTemporaryGluePartitionCredentials}. |
| 7 | */ |
| 8 | export interface GetTemporaryGluePartitionCredentialsRequest |
| 9 | extends lf.GetTemporaryGluePartitionCredentialsRequest {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `lakeformation:GetDataAccess` (partition scope). |
| 13 | * |
| 14 | * Identical to {@link GetTemporaryGlueTableCredentials} but scoped down to a |
| 15 | * single partition's S3 prefix. The returned `SecretAccessKey` and |
| 16 | * `SessionToken` are `Redacted`. Provide the implementation with |
| 17 | * `Effect.provide(AWS.LakeFormation.GetTemporaryGluePartitionCredentialsHttp)`. |
| 18 | * ### Vending Data Access Credentials |
| 19 | * **Example:** Vend Partition-Scoped S3 Credentials |
| 20 | * ```typescript |
| 21 | * // init — account-level binding takes no resource |
| 22 | * const getPartitionCredentials = |
| 23 | * yield* AWS.LakeFormation.GetTemporaryGluePartitionCredentials(); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const credentials = yield* getPartitionCredentials({ |
| 27 | * TableArn: table.tableArn, |
| 28 | * Partition: { Values: ["2026-07-14"] }, |
| 29 | * Permissions: ["SELECT"], |
| 30 | * }); |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface GetTemporaryGluePartitionCredentials extends Binding.Service< |
| 36 | GetTemporaryGluePartitionCredentials, |
| 37 | "AWS.LakeFormation.GetTemporaryGluePartitionCredentials", |
| 38 | () => Effect.Effect< |
| 39 | ( |
| 40 | request: GetTemporaryGluePartitionCredentialsRequest, |
| 41 | ) => Effect.Effect< |
| 42 | lf.GetTemporaryGluePartitionCredentialsResponse, |
| 43 | lf.GetTemporaryGluePartitionCredentialsError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | |
| 48 | export const GetTemporaryGluePartitionCredentials = |
| 49 | Binding.Service<GetTemporaryGluePartitionCredentials>( |
| 50 | "AWS.LakeFormation.GetTemporaryGluePartitionCredentials", |
| 51 | ); |