| 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 | * `DeletePrincipalMapping` request with `IndexId` injected from the bound index. |
| 8 | */ |
| 9 | export interface DeletePrincipalMappingRequest extends Omit< |
| 10 | kendra.DeletePrincipalMappingRequest, |
| 11 | "IndexId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for the `DeletePrincipalMapping` operation (IAM action |
| 16 | * `kendra:DeletePrincipalMapping`), scoped to one {@link Index}. |
| 17 | * |
| 18 | * Deletes a group's user-to-group mapping created with |
| 19 | * {@link PutPrincipalMapping}. |
| 20 | * Provide the implementation with |
| 21 | * `Effect.provide(AWS.Kendra.DeletePrincipalMappingHttp)`. |
| 22 | * |
| 23 | * ### Principal Mapping |
| 24 | * **Example:** Remove a Group Mapping |
| 25 | * ```typescript |
| 26 | * const deleteMapping = yield* AWS.Kendra.DeletePrincipalMapping(index); |
| 27 | * |
| 28 | * yield* deleteMapping({ GroupId: "engineering" }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface DeletePrincipalMapping extends Binding.Service< |
| 34 | DeletePrincipalMapping, |
| 35 | "AWS.Kendra.DeletePrincipalMapping", |
| 36 | ( |
| 37 | index: Index, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: DeletePrincipalMappingRequest, |
| 41 | ) => Effect.Effect< |
| 42 | kendra.DeletePrincipalMappingResponse, |
| 43 | kendra.DeletePrincipalMappingError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const DeletePrincipalMapping = Binding.Service<DeletePrincipalMapping>( |
| 48 | "AWS.Kendra.DeletePrincipalMapping", |
| 49 | ); |