sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ DocDBElastic/ ApplyPendingMaintenanceAction.ts

import type * as docdbelastic from "@distilled.cloud/aws/docdb-elastic";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for the `ApplyPendingMaintenanceAction` operation (IAM
 * action `docdb-elastic:ApplyPendingMaintenanceAction`).
 *
 * Opts a resource in to (or out of) a pending maintenance action — apply an
 * engine update immediately, at the next maintenance window, or undo an
 * earlier opt-in. Provide the implementation with
 * `Effect.provide(AWS.DocDBElastic.ApplyPendingMaintenanceActionHttp)`.
 * ### Scheduling Maintenance
 * **Example:** Apply Maintenance at the Next Window
 * ```typescript
 * const applyPending = yield* DocDBElastic.ApplyPendingMaintenanceAction();
 *
 * yield* applyPending({
 *   resourceArn: cluster.clusterArn,
 *   applyAction: "ENGINE_UPDATE",
 *   optInType: "NEXT_MAINTENANCE",
 * });
 * ```
 *
 * @binding
 */
export interface ApplyPendingMaintenanceAction extends Binding.Service<
  ApplyPendingMaintenanceAction,
  "AWS.DocDBElastic.ApplyPendingMaintenanceAction",
  () => Effect.Effect<
    (
      request: docdbelastic.ApplyPendingMaintenanceActionInput,
    ) => Effect.Effect<
      docdbelastic.ApplyPendingMaintenanceActionOutput,
      docdbelastic.ApplyPendingMaintenanceActionError
    >
  >
> {}
export const ApplyPendingMaintenanceAction = Binding.Service<ApplyPendingMaintenanceAction>(
  "AWS.DocDBElastic.ApplyPendingMaintenanceAction",
);