| 1 | import type * as kendra from "@distilled.cloud/aws/kendra"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Index } from "./SearchIndex.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `DescribeAccessControlConfiguration` request with `IndexId` injected from the bound index. |
| 8 | */ |
| 9 | export interface DescribeAccessControlConfigurationRequest extends Omit< |
| 10 | kendra.DescribeAccessControlConfigurationRequest, |
| 11 | "IndexId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for the `DescribeAccessControlConfiguration` operation (IAM action |
| 16 | * `kendra:DescribeAccessControlConfiguration`), scoped to one {@link Index}. |
| 17 | * |
| 18 | * Reads one access-control configuration of the index. |
| 19 | * Provide the implementation with |
| 20 | * `Effect.provide(AWS.Kendra.DescribeAccessControlConfigurationHttp)`. |
| 21 | * |
| 22 | * ### Access Control Configurations |
| 23 | * **Example:** Describe a Runtime ACL |
| 24 | * ```typescript |
| 25 | * const describeAcl = |
| 26 | * yield* AWS.Kendra.DescribeAccessControlConfiguration(index); |
| 27 | * |
| 28 | * const acl = yield* describeAcl({ Id: configurationId }); |
| 29 | * console.log(acl.Name, acl.AccessControlList); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface DescribeAccessControlConfiguration extends Binding.Service< |
| 35 | DescribeAccessControlConfiguration, |
| 36 | "AWS.Kendra.DescribeAccessControlConfiguration", |
| 37 | ( |
| 38 | index: Index, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request: DescribeAccessControlConfigurationRequest, |
| 42 | ) => Effect.Effect< |
| 43 | kendra.DescribeAccessControlConfigurationResponse, |
| 44 | kendra.DescribeAccessControlConfigurationError |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | export const DescribeAccessControlConfiguration = |
| 49 | Binding.Service<DescribeAccessControlConfiguration>( |
| 50 | "AWS.Kendra.DescribeAccessControlConfiguration", |
| 51 | ); |