sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Redshift/ DeleteClusterSnapshot.ts

import type * as redshift from "@distilled.cloud/aws/redshift";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for the `DeleteClusterSnapshot` operation (IAM action
 * `redshift:DeleteClusterSnapshot`).
 *
 * Deletes a manual cluster snapshot by identifier — the cleanup half of a
 * snapshot-rotation job (automated snapshots cannot be deleted; they expire
 * with the retention period). Provide the implementation with
 * `Effect.provide(AWS.Redshift.DeleteClusterSnapshotHttp)`.
 * ### Managing Snapshots
 * **Example:** Delete an Expired Manual Snapshot
 * ```typescript
 * const deleteClusterSnapshot = yield* AWS.Redshift.DeleteClusterSnapshot();
 *
 * yield* deleteClusterSnapshot({
 *   SnapshotIdentifier: expired.SnapshotIdentifier!,
 * });
 * ```
 *
 * @binding
 */
export interface DeleteClusterSnapshot extends Binding.Service<
  DeleteClusterSnapshot,
  "AWS.Redshift.DeleteClusterSnapshot",
  () => Effect.Effect<
    (
      request: redshift.DeleteClusterSnapshotMessage,
    ) => Effect.Effect<redshift.DeleteClusterSnapshotResult, redshift.DeleteClusterSnapshotError>
  >
> {}
export const DeleteClusterSnapshot = Binding.Service<DeleteClusterSnapshot>(
  "AWS.Redshift.DeleteClusterSnapshot",
);