---
title: "POST /coverage/statistics/list"
method: POST
path: "/coverage/statistics/list"
---

# POST /coverage/statistics/list

`POST /coverage/statistics/list`

Lists Amazon Inspector coverage statistics for your environment.

## Request body

- object
  - `filterCriteria` object — A structure that identifies filter criteria for <code>GetCoverageStatistics</code>.
    - `scanStatusCode` CoverageStringFilter[] — The scan status code to filter on. Valid values are: <code>ValidationException</code>, <code>InternalServerException</code>, <code>ResourceNotFoundException</code>, <code>BadRequestException</code>, and <code>ThrottlingException</code>.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `scanStatusReason` CoverageStringFilter[] — The scan status reason to filter on.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `accountId` CoverageStringFilter[] — An array of Amazon Web Services account IDs to return coverage statistics for.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `resourceId` CoverageStringFilter[] — An array of Amazon Web Services resource IDs to return coverage statistics for.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `resourceType` CoverageStringFilter[] — An array of Amazon Web Services resource types to return coverage statistics for. The values can be <code>AWS_EC2_INSTANCE</code>, <code>AWS_LAMBDA_FUNCTION</code>, <code>AWS_ECR_CONTAINER_IMAGE</code>, <code>AWS_ECR_REPOSITORY</code> or <code>AWS_ACCOUNT</code>.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `scanType` CoverageStringFilter[] — An array of Amazon Inspector scan types to return coverage statistics for.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `ecrRepositoryName` CoverageStringFilter[] — The Amazon ECR repository name to filter on.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `ecrImageTags` CoverageStringFilter[] — The Amazon ECR image tags to filter on.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `ec2InstanceTags` CoverageMapFilter[] — The Amazon EC2 instance tags to filter on.
      - `comparison` 'EQUALS', required — The operator to compare coverage on.
      - `key` string, required — The tag key associated with the coverage map filter.
      - `value` string — The tag value associated with the coverage map filter.
    - `lambdaFunctionName` CoverageStringFilter[] — Returns coverage statistics for Amazon Web Services Lambda functions filtered by function names.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `lambdaFunctionTags` CoverageMapFilter[] — Returns coverage statistics for Amazon Web Services Lambda functions filtered by tag.
      - `comparison` 'EQUALS', required — The operator to compare coverage on.
      - `key` string, required — The tag key associated with the coverage map filter.
      - `value` string — The tag value associated with the coverage map filter.
    - `lambdaFunctionRuntime` CoverageStringFilter[] — Returns coverage statistics for Amazon Web Services Lambda functions filtered by runtime.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `lastScannedAt` CoverageDateFilter[] — Filters Amazon Web Services resources based on whether Amazon Inspector has checked them for vulnerabilities within the specified time range.
      - `startInclusive` string, date-time — A timestamp representing the start of the time period to filter results by.
      - `endInclusive` string, date-time — A timestamp representing the end of the time period to filter results by.
    - `scanMode` CoverageStringFilter[] — The filter to search for Amazon EC2 instance coverage by scan mode. Valid values are <code>EC2_SSM_AGENT_BASED</code>, <code>EC2_AGENTLESS</code>, and <code>EC2_INSPECTOR_AGENT_BASED</code>.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `imagePulledAt` CoverageDateFilter[] — The date an image was last pulled at.
      - `startInclusive` string, date-time — A timestamp representing the start of the time period to filter results by.
      - `endInclusive` string, date-time — A timestamp representing the end of the time period to filter results by.
    - `ecrImageLastInUseAt` CoverageDateFilter[] — The Amazon ECR image that was last in use.
      - `startInclusive` string, date-time — A timestamp representing the start of the time period to filter results by.
      - `endInclusive` string, date-time — A timestamp representing the end of the time period to filter results by.
    - `ecrImageInUseCount` CoverageNumberFilter[] — The number of Amazon ECR images in use.
      - `upperInclusive` integer — The upper inclusive for the coverage number.&gt;
      - `lowerInclusive` integer — The lower inclusive for the coverage number.
    - `codeRepositoryProjectName` CoverageStringFilter[] — Filter criteria for code repositories based on project name.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `codeRepositoryProviderType` CoverageStringFilter[] — Filter criteria for code repositories based on provider type (such as GitHub, GitLab, etc.).
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `codeRepositoryProviderTypeVisibility` CoverageStringFilter[] — Filter criteria for code repositories based on visibility setting (public or private).
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `lastScannedCommitId` CoverageStringFilter[] — Filter criteria for code repositories based on the ID of the last scanned commit.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudProvider` CoverageStringFilter[] — The cloud provider to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudProviderAccountId` CoverageStringFilter[] — The cloud provider account ID to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudProviderRegion` CoverageStringFilter[] — The cloud provider region to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudVmInstanceTags` CoverageMapFilter[] — The cloud VM instance tags to filter coverage results by.
      - `comparison` 'EQUALS', required — The operator to compare coverage on.
      - `key` string, required — The tag key associated with the coverage map filter.
      - `value` string — The tag value associated with the coverage map filter.
    - `cloudContainerImageTags` CoverageStringFilter[] — The cloud container image tags to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudContainerRepositoryName` CoverageStringFilter[] — The cloud container repository name to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudContainerRegistryName` CoverageStringFilter[] — The cloud container registry name to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudServerlessFunctionName` CoverageStringFilter[] — The cloud serverless function name to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudServerlessFunctionRuntime` CoverageStringFilter[] — The cloud serverless function runtime to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
    - `cloudServerlessFunctionTags` CoverageMapFilter[] — The cloud serverless function tags to filter coverage results by.
      - `comparison` 'EQUALS', required — The operator to compare coverage on.
      - `key` string, required — The tag key associated with the coverage map filter.
      - `value` string — The tag value associated with the coverage map filter.
    - `cloudProviderOrgId` CoverageStringFilter[] — The cloud provider organization ID to filter coverage results by.
      - `comparison` 'EQUALS' | 'NOT_EQUALS', required — The operator to compare strings on.
      - `value` string, required — The value to compare strings on.
  - `groupBy` 'SCAN_STATUS_CODE' | 'SCAN_STATUS_REASON' | 'ACCOUNT_ID' | 'RESOURCE_TYPE' | 'ECR_REPOSITORY_NAME' | 'PROVIDER' | 'PROVIDER_ACCOUNT_ID' | 'PROVIDER_REGION' | 'PROVIDER_ORG_ID' — The value to group the results by.
  - `nextToken` string — 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. For subsequent calls, use the <code>NextToken</code> value returned from the previous request to continue listing results after the first page.

## Response `200`

Success

- ListCoverageStatisticsResponse
  - `countsByGroup` Counts[] — An array with the number for each group.
    - `count` integer — The number of resources.
    - `groupKey` 'SCAN_STATUS_CODE' | 'SCAN_STATUS_REASON' | 'ACCOUNT_ID' | 'RESOURCE_TYPE' | 'ECR_REPOSITORY_NAME' | 'PROVIDER' | 'PROVIDER_ACCOUNT_ID' | 'PROVIDER_REGION' | 'PROVIDER_ORG_ID' — The key associated with this group
  - `totalCounts` integer, required — The total number for all groups.
  - `nextToken` string — 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. For subsequent calls, use the <code>NextToken</code> value returned from the previous request to continue listing results after the first page.

## Other responses

- `480` — ValidationException
- `481` — ThrottlingException
- `482` — InternalServerException

---

[API](https://skmtc.net/aws/apis/inspector2.md) · [All operations](https://skmtc.net/aws/apis/inspector2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/inspector2/versions/c51110c7cd43/schema)
