Skip to content

aws.s3.list_bucket_metrics_configurations

Example SQL Queries

SELECT * FROM
aws.s3.list_bucket_metrics_configurations
WHERE
"bucket" = 'VALUE';

Description

This operation is not supported by directory buckets.

Lists the metrics configurations for the bucket. The metrics configurations are only for the request metrics of the bucket and do not provide information on daily storage metrics. You can have up to 1,000 configurations per bucket.

This action supports list pagination and does not return more than 100 configurations at a time. Always check the IsTruncated element in the response. If there are no more configurations to list, IsTruncated is set to false. If there are more configurations to list, IsTruncated is set to true, and there is a value in NextContinuationToken. You use the NextContinuationToken value to continue the pagination of the list by passing the value in continuation-token in the request to GET the next page.

To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

For more information about metrics configurations and CloudWatch request metrics, see Monitoring Metrics with Amazon CloudWatch.

Table Definition

Column NameColumn Data Type
bucket Required Input Column

The name of the bucket containing the metrics configurations to retrieve.

VARCHAR
continuation_token Input Column

The marker that is used as a starting point for this metrics configuration list response. This value is present if it was sent in the request.

VARCHAR
expected_bucket_owner Input Column

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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.

is_truncated

Indicates whether the returned list of metrics configurations is complete. A value of true indicates that the list is not complete and the NextContinuationToken will be provided for a subsequent request.

BOOLEAN
metrics_configuration_list

The list of metrics configurations for a bucket.

STRUCT(
"id" VARCHAR,
"filter" STRUCT(
"prefix" VARCHAR,
"tag" STRUCT(
"key" VARCHAR,
"value" VARCHAR
),
"access_point_arn" VARCHAR,
"and" STRUCT(
"prefix" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"access_point_arn" VARCHAR
)
)
)[]
Show child fields
metrics_configuration_list[]
Show child fields
metrics_configuration_list[].filter

Specifies a metrics configuration filter. The metrics configuration will only include objects that meet the filter's criteria. A filter must be a prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator).

Show child fields
metrics_configuration_list[].filter.access_point_arn

The access point ARN used when evaluating a metrics filter.

metrics_configuration_list[].filter.and

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.

Show child fields
metrics_configuration_list[].filter.and.access_point_arn

The access point ARN used when evaluating an AND predicate.

metrics_configuration_list[].filter.and.prefix

The prefix used when evaluating an AND predicate.

metrics_configuration_list[].filter.and.tags[]
Show child fields
metrics_configuration_list[].filter.and.tags[].key

Name of the object key.

metrics_configuration_list[].filter.and.tags[].value

Value of the tag.

metrics_configuration_list[].filter.prefix

The prefix used when evaluating a metrics filter.

metrics_configuration_list[].filter.tag

The tag used when evaluating a metrics filter.

Show child fields
metrics_configuration_list[].filter.tag.key

Name of the object key.

metrics_configuration_list[].filter.tag.value

Value of the tag.

metrics_configuration_list[].id

The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.

next_continuation_token

The marker used to continue a metrics configuration listing that has been truncated. Use the NextContinuationToken from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.

VARCHAR