{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-guardduty/json-schema/amazon-guardduty-update-malware-scan-settings-request-schema.json",
  "title": "UpdateMalwareScanSettingsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-guardduty-operations-api-openapi.yml#/components/schemas/UpdateMalwareScanSettingsRequest",
  "type": "object",
  "properties": {
    "DetectorId": {
      "type": "string",
      "description": "The unique ID of the detector that specifies the GuardDuty service where you want to update scan settings. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API."
    },
    "ScanResourceCriteria": {
      "$ref": "#/$defs/ScanResourceCriteria"
    },
    "EbsSnapshotPreservation": {
      "type": "string",
      "enum": [
        "NO_RETENTION",
        "RETENTION_WITH_FINDING"
      ],
      "description": "An enum value representing possible snapshot preservation settings."
    }
  },
  "required": [
    "DetectorId"
  ],
  "$defs": {
    "ScanCondition": {
      "type": "object",
      "properties": {
        "MapEquals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScanConditionPair"
          },
          "description": "Represents an mapEqual condition to be applied to a single field when triggering for malware scan."
        }
      },
      "required": [
        "MapEquals"
      ]
    },
    "ScanConditionPair": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "Represents the key in the map condition."
        },
        "Value": {
          "type": "string",
          "description": "Represents optional value in the map condition. If not specified, only the key will be matched."
        }
      },
      "required": [
        "Key"
      ]
    },
    "ScanResourceCriteria": {
      "type": "object",
      "properties": {
        "Include": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ScanCondition"
          },
          "description": "Represents condition that when matched will allow a malware scan for a certain resource."
        },
        "Exclude": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ScanCondition"
          },
          "description": "Represents condition that when matched will prevent a malware scan for a certain resource."
        }
      }
    }
  }
}