{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-inspector/json-schema/amazon-inspector-list-finding-aggregations-request-schema.json",
  "title": "ListFindingAggregationsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-inspector-findings-api-openapi.yml#/components/schemas/ListFindingAggregationsRequest",
  "type": "object",
  "properties": {
    "aggregationType": {
      "type": "string",
      "description": "The type of the aggregation request."
    },
    "nextToken": {
      "type": "string",
      "description": "A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page."
    },
    "maxResults": {
      "type": "integer",
      "description": "The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results."
    },
    "accountIds": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StringFilter"
      },
      "description": "The Amazon Web Services account IDs to retrieve finding aggregation data for."
    },
    "aggregationRequest": {
      "$ref": "#/$defs/AggregationRequest"
    }
  },
  "required": [
    "aggregationType"
  ],
  "$defs": {
    "AccountAggregation": {
      "type": "object",
      "properties": {
        "findingType": {
          "type": "string",
          "description": "The type of finding."
        },
        "resourceType": {
          "type": "string",
          "description": "The type of resource."
        },
        "sortOrder": {
          "type": "string",
          "description": "The sort order (ascending or descending)."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort by."
        }
      }
    },
    "AggregationRequest": {
      "type": "object",
      "properties": {
        "accountAggregation": {
          "$ref": "#/$defs/AccountAggregation"
        },
        "amiAggregation": {
          "$ref": "#/$defs/AmiAggregation"
        },
        "awsEcrContainerAggregation": {
          "$ref": "#/$defs/AwsEcrContainerAggregation"
        },
        "ec2InstanceAggregation": {
          "$ref": "#/$defs/Ec2InstanceAggregation"
        },
        "findingTypeAggregation": {
          "$ref": "#/$defs/FindingTypeAggregation"
        },
        "imageLayerAggregation": {
          "$ref": "#/$defs/ImageLayerAggregation"
        },
        "packageAggregation": {
          "$ref": "#/$defs/PackageAggregation"
        },
        "repositoryAggregation": {
          "$ref": "#/$defs/RepositoryAggregation"
        },
        "titleAggregation": {
          "$ref": "#/$defs/TitleAggregation"
        },
        "lambdaLayerAggregation": {
          "$ref": "#/$defs/LambdaLayerAggregation"
        },
        "lambdaFunctionAggregation": {
          "$ref": "#/$defs/LambdaFunctionAggregation"
        },
        "codeRepositoryAggregation": {
          "$ref": "#/$defs/CodeRepositoryAggregation"
        },
        "vmInstanceAggregation": {
          "$ref": "#/$defs/VmInstanceAggregation"
        },
        "containerImageAggregation": {
          "$ref": "#/$defs/ContainerImageAggregation"
        },
        "serverlessFunctionAggregation": {
          "$ref": "#/$defs/ServerlessFunctionAggregation"
        }
      },
      "description": "Exactly one member is set."
    },
    "AmiAggregation": {
      "type": "object",
      "properties": {
        "amis": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The IDs of AMIs to aggregate findings for."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        },
        "scanSources": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The scan sources to filter the aggregation results by."
        }
      }
    },
    "AwsEcrContainerAggregation": {
      "type": "object",
      "properties": {
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The container resource IDs."
        },
        "imageShas": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image SHA values."
        },
        "repositories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The container repositories."
        },
        "architectures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The architecture of the containers."
        },
        "imageTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image tags."
        },
        "sortOrder": {
          "type": "string",
          "description": "The sort order (ascending or descending)."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort by."
        },
        "lastInUseAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "The last time an Amazon ECR image was used in an Amazon ECS task or Amazon EKS pod."
        },
        "inUseCount": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberFilter"
          },
          "description": "The number of Amazon ECS tasks or Amazon EKS pods where the Amazon ECR container image is in use."
        }
      }
    },
    "CodeRepositoryAggregation": {
      "type": "object",
      "properties": {
        "projectNames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The project names to include in the aggregation results."
        },
        "providerTypes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The repository provider types to include in the aggregation results."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by (ascending or descending) in the code repository aggregation."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by in the code repository aggregation."
        },
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The resource IDs to include in the aggregation results."
        }
      }
    },
    "ContainerImageAggregation": {
      "type": "object",
      "properties": {
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The resource IDs to aggregate findings for."
        },
        "imageDigests": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image digests to aggregate findings for."
        },
        "repositories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image repositories to aggregate findings for."
        },
        "registries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image registries to aggregate findings for."
        },
        "architectures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image architectures to aggregate findings for."
        },
        "imageTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The image tags to aggregate findings for."
        },
        "cloudProviders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud providers to aggregate findings for. Valid values: AWS – Findings from Amazon Web Services resources. AZURE – Findings from Microsoft Azure resources."
        },
        "cloudPartitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud partitions to aggregate findings for. Valid values: aws – Amazon Web Services commercial Regions. aws-cn – Amazon Web Services China Regions. aws-us-gov – Amazon Web Services GovCloud (US) Regions. AzureCloud – Azure commercial Regions."
        },
        "cloudRegions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud regions to aggregate findings for. The value format depends on the cloud provider: An Amazon Web Services Region, such as us-east-1. An Azure region, such as eastus."
        },
        "cloudOrgIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud organization IDs to aggregate findings for."
        },
        "cloudAccountIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud account IDs to aggregate findings for."
        },
        "lastInUseAt": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateFilter"
          },
          "description": "The last in-use timestamps to aggregate findings for."
        },
        "inUseCount": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NumberFilter"
          },
          "description": "The in-use counts to aggregate findings for."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by. Valid values are ASC and DESC."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by. Specify a field name from the aggregation response, such as CRITICAL, HIGH, or ALL."
        }
      }
    },
    "DateFilter": {
      "type": "object",
      "properties": {
        "startInclusive": {
          "type": "string",
          "description": "A timestamp representing the start of the time period filtered on."
        },
        "endInclusive": {
          "type": "string",
          "description": "A timestamp representing the end of the time period filtered on."
        }
      }
    },
    "Ec2InstanceAggregation": {
      "type": "object",
      "properties": {
        "amis": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The AMI IDs associated with the Amazon EC2 instances to aggregate findings for."
        },
        "operatingSystems": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The operating system types to aggregate findings for. Valid values must be uppercase and underscore separated, examples are ORACLE_LINUX_7 and ALPINE_LINUX_3_8."
        },
        "instanceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon EC2 instance IDs to aggregate findings for."
        },
        "instanceTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "The Amazon EC2 instance tags to aggregate findings for."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        }
      }
    },
    "FindingTypeAggregation": {
      "type": "object",
      "properties": {
        "findingType": {
          "type": "string",
          "description": "The finding type to aggregate."
        },
        "resourceType": {
          "type": "string",
          "description": "The resource type to aggregate."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        }
      }
    },
    "ImageLayerAggregation": {
      "type": "object",
      "properties": {
        "repositories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The repository associated with the container image hosting the layers."
        },
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The ID of the container image layer."
        },
        "layerHashes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The hashes associated with the layers."
        },
        "cloudProviders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud providers to aggregate findings for. Valid values: AWS – Findings from Amazon Web Services resources. AZURE – Findings from Microsoft Azure resources."
        },
        "cloudAccountIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud account IDs to aggregate findings for."
        },
        "cloudOrgIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud organization IDs to aggregate findings for."
        },
        "cloudRegions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud regions to aggregate findings for. The value format depends on the cloud provider: An Amazon Web Services Region, such as us-east-1. An Azure region, such as eastus."
        },
        "cloudPartitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud partitions to aggregate findings for. Valid values: aws – Amazon Web Services commercial Regions. aws-cn – Amazon Web Services China Regions. aws-us-gov – Amazon Web Services GovCloud (US) Regions. AzureCloud – Azure commercial Regions."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        }
      }
    },
    "LambdaFunctionAggregation": {
      "type": "object",
      "properties": {
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The resource IDs to include in the aggregation results."
        },
        "functionNames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon Web Services Lambda function names to include in the aggregation results."
        },
        "runtimes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "Returns findings aggregated by Amazon Web Services Lambda function runtime environments."
        },
        "functionTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "The tags to include in the aggregation results."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to use for sorting the results."
        },
        "sortBy": {
          "type": "string",
          "description": "The finding severity to use for sorting the results."
        }
      }
    },
    "LambdaLayerAggregation": {
      "type": "object",
      "properties": {
        "functionNames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The names of the Amazon Web Services Lambda functions associated with the layers."
        },
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The resource IDs for the Amazon Web Services Lambda function layers."
        },
        "layerArns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The Amazon Resource Name (ARN) of the Amazon Web Services Lambda function layer."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to use for sorting the results."
        },
        "sortBy": {
          "type": "string",
          "description": "The finding severity to use for sorting the results."
        }
      }
    },
    "MapFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "description": "The operator to use when comparing values in the filter."
        },
        "key": {
          "type": "string",
          "description": "The tag key used in the filter."
        },
        "value": {
          "type": "string",
          "description": "The tag value used in the filter."
        }
      },
      "required": [
        "comparison",
        "key"
      ]
    },
    "NumberFilter": {
      "type": "object",
      "properties": {
        "upperInclusive": {
          "type": "number",
          "description": "The highest number to be included in the filter."
        },
        "lowerInclusive": {
          "type": "number",
          "description": "The lowest number to be included in the filter."
        }
      }
    },
    "PackageAggregation": {
      "type": "object",
      "properties": {
        "packageNames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The names of packages to aggregate findings on."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        }
      }
    },
    "RepositoryAggregation": {
      "type": "object",
      "properties": {
        "repositories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The names of repositories to aggregate findings on."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        }
      }
    },
    "ServerlessFunctionAggregation": {
      "type": "object",
      "properties": {
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The resource IDs to aggregate findings for."
        },
        "functionNames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The function names to aggregate findings for."
        },
        "runtimes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The runtimes to aggregate findings for."
        },
        "functionTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "The function tags to aggregate findings for."
        },
        "cloudProviders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud providers to aggregate findings for. Valid values: AWS – Findings from Amazon Web Services resources. AZURE – Findings from Microsoft Azure resources."
        },
        "cloudPartitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud partitions to aggregate findings for. Valid values: aws – Amazon Web Services commercial Regions. aws-cn – Amazon Web Services China Regions. aws-us-gov – Amazon Web Services GovCloud (US) Regions. AzureCloud – Azure commercial Regions."
        },
        "cloudRegions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud regions to aggregate findings for. The value format depends on the cloud provider: An Amazon Web Services Region, such as us-east-1. An Azure region, such as eastus."
        },
        "cloudOrgIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud organization IDs to aggregate findings for."
        },
        "cloudAccountIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud account IDs to aggregate findings for."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by. Valid values are ASC and DESC."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by. Specify a field name from the aggregation response, such as CRITICAL, HIGH, or ALL."
        }
      }
    },
    "StringFilter": {
      "type": "object",
      "properties": {
        "comparison": {
          "type": "string",
          "description": "The operator to use when comparing values in the filter."
        },
        "value": {
          "type": "string",
          "description": "The value to filter on."
        }
      },
      "required": [
        "comparison",
        "value"
      ]
    },
    "TitleAggregation": {
      "type": "object",
      "properties": {
        "titles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The finding titles to aggregate on."
        },
        "vulnerabilityIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The vulnerability IDs of the findings."
        },
        "resourceType": {
          "type": "string",
          "description": "The resource type to aggregate on."
        },
        "findingType": {
          "type": "string",
          "description": "The type of finding to aggregate on."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by."
        }
      }
    },
    "VmInstanceAggregation": {
      "type": "object",
      "properties": {
        "resourceIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The resource IDs to aggregate findings for."
        },
        "operatingSystems": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The operating systems to aggregate findings for."
        },
        "instanceTags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MapFilter"
          },
          "description": "The instance tags to aggregate findings for."
        },
        "vmImageReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The VM image references to aggregate findings for."
        },
        "cloudProviders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud providers to aggregate findings for. Valid values: AWS – Findings from Amazon Web Services resources. AZURE – Findings from Microsoft Azure resources."
        },
        "cloudPartitions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud partitions to aggregate findings for. Valid values: aws – Amazon Web Services commercial Regions. aws-cn – Amazon Web Services China Regions. aws-us-gov – Amazon Web Services GovCloud (US) Regions. AzureCloud – Azure commercial Regions."
        },
        "cloudRegions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud regions to aggregate findings for. The value format depends on the cloud provider: An Amazon Web Services Region, such as us-east-1. An Azure region, such as eastus."
        },
        "cloudOrgIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud organization IDs to aggregate findings for."
        },
        "cloudAccountIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StringFilter"
          },
          "description": "The cloud account IDs to aggregate findings for."
        },
        "sortOrder": {
          "type": "string",
          "description": "The order to sort results by. Valid values are ASC and DESC."
        },
        "sortBy": {
          "type": "string",
          "description": "The value to sort results by. Specify a field name from the aggregation response, such as CRITICAL, HIGH, ALL, or NETWORK_FINDINGS."
        }
      }
    }
  }
}