{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-inspector/json-schema/amazon-inspector-list-on-demand-scans-response-schema.json",
  "title": "ListOnDemandScansResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-inspector-ondemand-api-openapi.yml#/components/schemas/ListOnDemandScansResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OnDemandScan"
      },
      "description": "The list of on-demand scans that match the request."
    },
    "nextToken": {
      "type": "string",
      "description": "A pagination token to use in a subsequent request to retrieve the next page of results. This field is absent when there are no more results."
    }
  },
  "required": [
    "items"
  ],
  "$defs": {
    "OnDemandScan": {
      "type": "object",
      "properties": {
        "scanId": {
          "type": "string",
          "description": "The unique identifier of the on-demand scan."
        },
        "resourceId": {
          "type": "string",
          "description": "The ID of the resource that was scanned."
        },
        "resourceType": {
          "type": "string",
          "enum": [
            "AMI"
          ],
          "description": "The type of the resource that was scanned."
        },
        "scanStatus": {
          "type": "string",
          "enum": [
            "IN_PROGRESS",
            "SUCCESSFUL",
            "FAILED"
          ],
          "description": "The current status of the on-demand scan."
        },
        "scanStatusReason": {
          "type": "string",
          "enum": [
            "ACCESS_DENIED",
            "INTERNAL_ERROR",
            "STORAGE_LIMIT_EXCEEDED",
            "EXTRACTION_COLLECTION_TIME_LIMIT_EXCEEDED",
            "UNSUPPORTED_OS",
            "RESOURCE_TERMINATED"
          ],
          "description": "The reason associated with the current on-demand scan status."
        },
        "startedAt": {
          "type": "string",
          "description": "The date and time, in ISO 8601 format, when the on-demand scan started."
        },
        "completedAt": {
          "type": "string",
          "description": "The date and time, in ISO 8601 format, when the on-demand scan completed. This field is absent if the scan has not completed."
        }
      },
      "required": [
        "scanId",
        "resourceId",
        "resourceType",
        "scanStatus",
        "startedAt"
      ]
    }
  }
}