| 1 | import type * as glacier from "@distilled.cloud/aws/glacier"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Vault } from "./Vault.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `DeleteArchive` request with `accountId` and `vaultName` injected from the bound |
| 8 | * {@link Vault}. |
| 9 | */ |
| 10 | export interface DeleteArchiveRequest extends Omit< |
| 11 | glacier.DeleteArchiveInput, |
| 12 | "accountId" | "vaultName" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for the `DeleteArchive` operation (IAM action |
| 17 | * `glacier:DeleteArchive` on the vault ARN). |
| 18 | * |
| 19 | * Deletes an archive from the bound {@link Vault}. The operation is |
| 20 | * idempotent — deleting an already-deleted archive is not an error. |
| 21 | * Provide the implementation with |
| 22 | * `Effect.provide(AWS.Glacier.DeleteArchiveHttp)`. |
| 23 | * ### Deleting Archives |
| 24 | * **Example:** Delete an archive by ID |
| 25 | * ```typescript |
| 26 | * const deleteArchive = yield* AWS.Glacier.DeleteArchive(vault); |
| 27 | * |
| 28 | * yield* deleteArchive({ archiveId }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface DeleteArchive extends Binding.Service< |
| 34 | DeleteArchive, |
| 35 | "AWS.Glacier.DeleteArchive", |
| 36 | ( |
| 37 | vault: Vault, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: DeleteArchiveRequest, |
| 41 | ) => Effect.Effect< |
| 42 | glacier.DeleteArchiveResponse, |
| 43 | glacier.DeleteArchiveError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const DeleteArchive = Binding.Service<DeleteArchive>( |
| 48 | "AWS.Glacier.DeleteArchive", |
| 49 | ); |