Skip to content

aws.s3.get_bucket_metrics_configuration

Example SQL Queries

SELECT * FROM
aws.s3.get_bucket_metrics_configuration
WHERE
"bucket" = 'VALUE'
AND "id" = 'VALUE';

Description

This operation is not supported by directory buckets.

Gets a metrics configuration (specified by the metrics configuration ID) from the bucket. Note that this doesn’t include the daily storage metrics.

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 information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with Amazon CloudWatch.

Table Definition

Column NameColumn Data Type
bucket Required Input Column

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

VARCHAR
id Required Input Column

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.

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.

metrics_configuration

Specifies the metrics configuration.

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.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.filter.access_point_arn

The access point ARN used when evaluating a metrics filter.

metrics_configuration.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.filter.and.access_point_arn

The access point ARN used when evaluating an AND predicate.

metrics_configuration.filter.and.prefix

The prefix used when evaluating an AND predicate.

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

Name of the object key.

metrics_configuration.filter.and.tags[].value

Value of the tag.

metrics_configuration.filter.prefix

The prefix used when evaluating a metrics filter.

metrics_configuration.filter.tag

The tag used when evaluating a metrics filter.

Show child fields
metrics_configuration.filter.tag.key

Name of the object key.

metrics_configuration.filter.tag.value

Value of the tag.

metrics_configuration.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.