sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ GuardDuty/ UpdateMalwareScanSettings.ts

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

/**
 * Runtime binding for `guardduty:UpdateMalwareScanSettings`.
 *
 * Updates the detector's EC2 malware scan settings (scan inclusion/exclusion tags, snapshot retention).
 * The detector id is injected from the bound {@link Detector}.
 * Provide the implementation with
 * `Effect.provide(AWS.GuardDuty.UpdateMalwareScanSettingsHttp)`.
 * ### Malware Protection
 * **Example:** Retain Snapshots with Findings
 * ```typescript
 * // init
 * const updateMalwareScanSettings = yield* AWS.GuardDuty.UpdateMalwareScanSettings(detector);
 *
 * // runtime
 * yield* updateMalwareScanSettings({
 *   EbsSnapshotPreservation: "RETENTION_WITH_FINDING",
 * });
 * ```
 *
 * @binding
 */
export interface UpdateMalwareScanSettings extends Binding.Service<
  UpdateMalwareScanSettings,
  "AWS.GuardDuty.UpdateMalwareScanSettings",
  (
    detector: Detector,
  ) => Effect.Effect<
    (
      request?: Omit<guardduty.UpdateMalwareScanSettingsRequest, "DetectorId">,
    ) => Effect.Effect<
      guardduty.UpdateMalwareScanSettingsResponse,
      guardduty.UpdateMalwareScanSettingsError
    >
  >
> {}
export const UpdateMalwareScanSettings = Binding.Service<UpdateMalwareScanSettings>(
  "AWS.GuardDuty.UpdateMalwareScanSettings",
);