{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ses/json-schema/amazon-ses-start-archive-export-request-schema.json",
  "title": "StartArchiveExportRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ses-archive-export-api-openapi.yml#/components/schemas/StartArchiveExportRequest",
  "type": "object",
  "properties": {
    "ArchiveId": {
      "type": "string",
      "description": "The identifier of the archive to export emails from."
    },
    "Filters": {
      "$ref": "#/$defs/ArchiveFilters"
    },
    "FromTimestamp": {
      "type": "string",
      "description": "The start of the timestamp range to include emails from."
    },
    "ToTimestamp": {
      "type": "string",
      "description": "The end of the timestamp range to include emails from."
    },
    "MaxResults": {
      "type": "integer",
      "description": "The maximum number of email items to include in the export."
    },
    "ExportDestinationConfiguration": {
      "$ref": "#/$defs/ExportDestinationConfiguration"
    },
    "IncludeMetadata": {
      "type": "boolean",
      "description": "Whether to include message metadata as JSON files in the export."
    }
  },
  "required": [
    "ArchiveId",
    "FromTimestamp",
    "ToTimestamp",
    "ExportDestinationConfiguration"
  ],
  "$defs": {
    "ArchiveBooleanExpression": {
      "type": "object",
      "properties": {
        "Evaluate": {
          "$ref": "#/$defs/ArchiveBooleanToEvaluate"
        },
        "Operator": {
          "type": "string",
          "enum": [
            "IS_TRUE",
            "IS_FALSE"
          ],
          "description": "The boolean operator to use for evaluation."
        }
      },
      "required": [
        "Evaluate",
        "Operator"
      ]
    },
    "ArchiveBooleanToEvaluate": {
      "type": "object",
      "properties": {
        "Attribute": {
          "type": "string",
          "enum": [
            "HAS_ATTACHMENTS"
          ],
          "description": "The name of the email attribute to evaluate."
        }
      },
      "description": "Exactly one member is set."
    },
    "ArchiveFilterCondition": {
      "type": "object",
      "properties": {
        "StringExpression": {
          "$ref": "#/$defs/ArchiveStringExpression"
        },
        "BooleanExpression": {
          "$ref": "#/$defs/ArchiveBooleanExpression"
        }
      },
      "description": "Exactly one member is set."
    },
    "ArchiveFilters": {
      "type": "object",
      "properties": {
        "Include": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArchiveFilterCondition"
          },
          "description": "The filter conditions for emails to include."
        },
        "Unless": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArchiveFilterCondition"
          },
          "description": "The filter conditions for emails to exclude."
        }
      }
    },
    "ArchiveStringExpression": {
      "type": "object",
      "properties": {
        "Evaluate": {
          "$ref": "#/$defs/ArchiveStringToEvaluate"
        },
        "Operator": {
          "type": "string",
          "enum": [
            "CONTAINS"
          ],
          "description": "The operator to use when evaluating the string values."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of string values to evaluate the email attribute against."
        }
      },
      "required": [
        "Evaluate",
        "Operator",
        "Values"
      ]
    },
    "ArchiveStringToEvaluate": {
      "type": "object",
      "properties": {
        "Attribute": {
          "type": "string",
          "enum": [
            "TO",
            "FROM",
            "CC",
            "SUBJECT",
            "ENVELOPE_TO",
            "ENVELOPE_FROM"
          ],
          "description": "The name of the email attribute to evaluate."
        }
      },
      "description": "Exactly one member is set."
    },
    "ExportDestinationConfiguration": {
      "type": "object",
      "properties": {
        "S3": {
          "$ref": "#/$defs/S3ExportDestinationConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "S3ExportDestinationConfiguration": {
      "type": "object",
      "properties": {
        "S3Location": {
          "type": "string",
          "description": "The S3 location to deliver the exported email data."
        }
      }
    }
  }
}