{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-inspector/json-schema/amazon-inspector-list-cis-scan-results-aggregated-by-target-resource-request-schema.json",
  "title": "ListCisScanResultsAggregatedByTargetResourceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-inspector-cis-api-openapi.yml#/components/schemas/ListCisScanResultsAggregatedByTargetResourceRequest",
  "type": "object",
  "properties": {
    "scanArn": {
      "type": "string",
      "description": "The scan ARN."
    },
    "filterCriteria": {
      "$ref": "#/$defs/CisScanResultsAggregatedByTargetResourceFilterCriteria"
    },
    "sortBy": {
      "type": "string",
      "enum": [
        "RESOURCE_ID",
        "FAILED_COUNTS",
        "ACCOUNT_ID",
        "PLATFORM",
        "TARGET_STATUS",
        "TARGET_STATUS_REASON"
      ],
      "description": "The sort by order."
    },
    "sortOrder": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "description": "The sort order."
    },
    "nextToken": {
      "type": "string",
      "description": "The pagination token from a previous request that's used to retrieve the next page of results."
    },
    "maxResults": {
      "type": "integer",
      "description": "The maximum number of scan results aggregated by a target resource to be returned in a single page of results."
    }
  },
  "required": [
    "scanArn"
  ],
  "$defs": {
    "CisNumberFilter": {
      "type": "object",
      "properties": {
        "upperInclusive": {
          "type": "integer",
          "description": "The CIS number filter's upper inclusive."
        },
        "lowerInclusive": {
          "type": "integer",
          "description": "The CIS number filter's lower inclusive."
        }
      }
    },
    "CisResultStatusFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "enum": [
            "EQUALS"
          ],
          "description": "The comparison value of the CIS result status filter."
        },
        "value": {
          "type": "string",
          "enum": [
            "PASSED",
            "FAILED",
            "SKIPPED"
          ],
          "description": "The value of the CIS result status filter."
        }
      },
      "required": [
        "comparison",
        "value"
      ]
    },
    "CisScanResultsAggregatedByTargetResourceFilterCriteria": {
      "type": "object",
      "properties": {
        "accountIdFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisStringFilter"
          },
          "description": "The criteria's account ID filters."
        },
        "statusFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisResultStatusFilter"
          },
          "description": "The criteria's status filter."
        },
        "checkIdFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisStringFilter"
          },
          "description": "The criteria's check ID filters."
        },
        "targetResourceIdFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisStringFilter"
          },
          "description": "The criteria's target resource ID filters."
        },
        "targetResourceTagFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagFilter"
          },
          "description": "The criteria's target resource tag filters."
        },
        "platformFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisStringFilter"
          },
          "description": "The criteria's platform filters."
        },
        "targetStatusFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisTargetStatusFilter"
          },
          "description": "The criteria's target status filters."
        },
        "targetStatusReasonFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisTargetStatusReasonFilter"
          },
          "description": "The criteria's target status reason filters."
        },
        "failedChecksFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CisNumberFilter"
          },
          "description": "The criteria's failed checks filters."
        }
      }
    },
    "CisStringFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "enum": [
            "EQUALS",
            "PREFIX",
            "NOT_EQUALS"
          ],
          "description": "The comparison value of the CIS string filter."
        },
        "value": {
          "type": "string",
          "description": "The value of the CIS string filter."
        }
      },
      "required": [
        "comparison",
        "value"
      ]
    },
    "CisTargetStatusFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "enum": [
            "EQUALS"
          ],
          "description": "The comparison value of the CIS target status filter."
        },
        "value": {
          "type": "string",
          "enum": [
            "TIMED_OUT",
            "CANCELLED",
            "COMPLETED"
          ],
          "description": "The value of the CIS target status filter."
        }
      },
      "required": [
        "comparison",
        "value"
      ]
    },
    "CisTargetStatusReasonFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "enum": [
            "EQUALS"
          ],
          "description": "The comparison value of the CIS target status reason filter."
        },
        "value": {
          "type": "string",
          "enum": [
            "SCAN_IN_PROGRESS",
            "UNSUPPORTED_OS",
            "SSM_UNMANAGED"
          ],
          "description": "The value of the CIS target status reason filter."
        }
      },
      "required": [
        "comparison",
        "value"
      ]
    },
    "TagFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "enum": [
            "EQUALS"
          ],
          "description": "The tag filter comparison value."
        },
        "key": {
          "type": "string",
          "description": "The tag filter key."
        },
        "value": {
          "type": "string",
          "description": "The tag filter value."
        }
      },
      "required": [
        "comparison",
        "key",
        "value"
      ]
    }
  }
}