Skip to content

aws.inspector2.list_coverage_statistics

Example SQL Queries

SELECT * FROM
aws.inspector2.list_coverage_statistics;

Description

Lists Amazon Inspector coverage statistics for your environment.

Table Definition

Column NameColumn Data Type
filter_criteria Input Column

An object that contains details on the filters to apply to the coverage data for your environment.

STRUCT(
"account_id" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"ec2_instance_tags" STRUCT(
"comparison" VARCHAR,
"key" VARCHAR,
"value" VARCHAR
)[],
"ecr_image_tags" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"ecr_repository_name" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"image_pulled_at" STRUCT(
"end_inclusive" TIMESTAMP_S,
"start_inclusive" TIMESTAMP_S
)[],
"lambda_function_name" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"lambda_function_runtime" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"lambda_function_tags" STRUCT(
"comparison" VARCHAR,
"key" VARCHAR,
"value" VARCHAR
)[],
"last_scanned_at" STRUCT(
"end_inclusive" TIMESTAMP_S,
"start_inclusive" TIMESTAMP_S
)[],
"resource_id" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"resource_type" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_mode" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_status_code" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_status_reason" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_type" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[]
)
Show child fields
filter_criteria.account_id[]
Show child fields
filter_criteria.account_id[].comparison

The operator to compare strings on.

filter_criteria.account_id[].value

The value to compare strings on.

filter_criteria.ec2_instance_tags[]
Show child fields
filter_criteria.ec2_instance_tags[].comparison

The operator to compare coverage on.

filter_criteria.ec2_instance_tags[].key

The tag key associated with the coverage map filter.

filter_criteria.ec2_instance_tags[].value

The tag value associated with the coverage map filter.

filter_criteria.ecr_image_tags[]
Show child fields
filter_criteria.ecr_image_tags[].comparison

The operator to compare strings on.

filter_criteria.ecr_image_tags[].value

The value to compare strings on.

filter_criteria.ecr_repository_name[]
Show child fields
filter_criteria.ecr_repository_name[].comparison

The operator to compare strings on.

filter_criteria.ecr_repository_name[].value

The value to compare strings on.

filter_criteria.image_pulled_at[]
Show child fields
filter_criteria.image_pulled_at[].end_inclusive

A timestamp representing the end of the time period to filter results by.

filter_criteria.image_pulled_at[].start_inclusive

A timestamp representing the start of the time period to filter results by.

filter_criteria.lambda_function_name[]
Show child fields
filter_criteria.lambda_function_name[].comparison

The operator to compare strings on.

filter_criteria.lambda_function_name[].value

The value to compare strings on.

filter_criteria.lambda_function_runtime[]
Show child fields
filter_criteria.lambda_function_runtime[].comparison

The operator to compare strings on.

filter_criteria.lambda_function_runtime[].value

The value to compare strings on.

filter_criteria.lambda_function_tags[]
Show child fields
filter_criteria.lambda_function_tags[].comparison

The operator to compare coverage on.

filter_criteria.lambda_function_tags[].key

The tag key associated with the coverage map filter.

filter_criteria.lambda_function_tags[].value

The tag value associated with the coverage map filter.

filter_criteria.last_scanned_at[]
Show child fields
filter_criteria.last_scanned_at[].end_inclusive

A timestamp representing the end of the time period to filter results by.

filter_criteria.last_scanned_at[].start_inclusive

A timestamp representing the start of the time period to filter results by.

filter_criteria.resource_id[]
Show child fields
filter_criteria.resource_id[].comparison

The operator to compare strings on.

filter_criteria.resource_id[].value

The value to compare strings on.

filter_criteria.resource_type[]
Show child fields
filter_criteria.resource_type[].comparison

The operator to compare strings on.

filter_criteria.resource_type[].value

The value to compare strings on.

filter_criteria.scan_mode[]
Show child fields
filter_criteria.scan_mode[].comparison

The operator to compare strings on.

filter_criteria.scan_mode[].value

The value to compare strings on.

filter_criteria.scan_status_code[]
Show child fields
filter_criteria.scan_status_code[].comparison

The operator to compare strings on.

filter_criteria.scan_status_code[].value

The value to compare strings on.

filter_criteria.scan_status_reason[]
Show child fields
filter_criteria.scan_status_reason[].comparison

The operator to compare strings on.

filter_criteria.scan_status_reason[].value

The value to compare strings on.

filter_criteria.scan_type[]
Show child fields
filter_criteria.scan_type[].comparison

The operator to compare strings on.

filter_criteria.scan_type[].value

The value to compare strings on.

group_by Input Column

The value to group the results by.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
counts_by_group

An array with the number for each group.

STRUCT(
"count" BIGINT,
"group_key" VARCHAR
)[]
Show child fields
counts_by_group[]
Show child fields
counts_by_group[].count

The number of resources.

counts_by_group[].group_key

The key associated with this group

total_counts

The total number for all groups.

BIGINT