sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ DataExchange/ RevokeRevision.ts

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

/**
 * Runtime binding for `dataexchange:RevokeRevision`.
 *
 * Revokes the bound revision from subscribers with a required
 * revocation comment — the remediation path when bad or sensitive data
 * was published. The data set and revision ids are injected from the
 * binding.
 * Provide the implementation with
 * `Effect.provide(AWS.DataExchange.RevokeRevisionHttp)`.
 * ### Managing Assets
 * **Example:** Revoke A Published Revision
 * ```typescript
 * const revokeRevision = yield* AWS.DataExchange.RevokeRevision(revision);
 *
 * // runtime
 * yield* revokeRevision({
 *   RevocationComment: "Published with corrupted price data",
 * });
 * ```
 *
 * @binding
 */
export interface RevokeRevision extends Binding.Service<
  RevokeRevision,
  "AWS.DataExchange.RevokeRevision",
  (
    revision: Revision,
  ) => Effect.Effect<
    (
      request: Omit<dataexchange.RevokeRevisionRequest, "DataSetId" | "RevisionId">,
    ) => Effect.Effect<dataexchange.RevokeRevisionResponse, dataexchange.RevokeRevisionError>
  >
> {}
export const RevokeRevision = Binding.Service<RevokeRevision>("AWS.DataExchange.RevokeRevision");