sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Glacier/ DescribeVault.ts

import type * as glacier from "@distilled.cloud/aws/glacier";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Vault } from "./Vault.ts";

/**
 * Runtime binding for the `DescribeVault` operation (IAM action
 * `glacier:DescribeVault` on the vault ARN).
 *
 * Reads the bound {@link Vault}'s description — archive count, total size
 * in bytes, and last inventory date (both as of the last nightly
 * inventory).
 * Provide the implementation with
 * `Effect.provide(AWS.Glacier.DescribeVaultHttp)`.
 * ### Inspecting Vaults
 * **Example:** Read the vault's stats
 * ```typescript
 * const describeVault = yield* AWS.Glacier.DescribeVault(vault);
 *
 * const { NumberOfArchives, SizeInBytes } = yield* describeVault();
 * ```
 *
 * @binding
 */
export interface DescribeVault extends Binding.Service<
  DescribeVault,
  "AWS.Glacier.DescribeVault",
  (
    vault: Vault,
  ) => Effect.Effect<() => Effect.Effect<glacier.DescribeVaultOutput, glacier.DescribeVaultError>>
> {}
export const DescribeVault = Binding.Service<DescribeVault>("AWS.Glacier.DescribeVault");