Skip to content

aws.s3.get_bucket_analytics_configuration

Example SQL Queries

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

Description

This operation is not supported by directory buckets.

This implementation of the GET action returns an analytics configuration (identified by the analytics configuration ID) from the bucket.

To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration 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 in the Amazon S3 User Guide.

For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class Analysis in the Amazon S3 User Guide.

Table Definition

Column NameColumn Data Type
bucket Required Input Column

The name of the bucket from which an analytics configuration is retrieved.

VARCHAR
id Required Input Column

The ID that identifies the analytics configuration.

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.

analytics_configuration

The configuration and any analyses for the analytics filter.

STRUCT(
"id" VARCHAR,
"filter" STRUCT(
"prefix" VARCHAR,
"tag" STRUCT(
"key" VARCHAR,
"value" VARCHAR
),
"and" STRUCT(
"prefix" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)
),
"storage_class_analysis" STRUCT(
"data_export" STRUCT(
"output_schema_version" VARCHAR,
"destination" STRUCT(
"s3_bucket_destination" STRUCT(
"format" VARCHAR,
"bucket_account_id" VARCHAR,
"bucket" VARCHAR,
"prefix" VARCHAR
)
)
)
)
)
Show child fields
analytics_configuration.filter

The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.

Show child fields
analytics_configuration.filter.and

A conjunction (logical AND) of predicates, which is used in evaluating an analytics filter. The operator must have at least two predicates.

Show child fields
analytics_configuration.filter.and.prefix

The prefix to use when evaluating an AND predicate: The prefix that an object must have to be included in the metrics results.

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

Name of the object key.

analytics_configuration.filter.and.tags[].value

Value of the tag.

analytics_configuration.filter.prefix

The prefix to use when evaluating an analytics filter.

analytics_configuration.filter.tag

The tag to use when evaluating an analytics filter.

Show child fields
analytics_configuration.filter.tag.key

Name of the object key.

analytics_configuration.filter.tag.value

Value of the tag.

analytics_configuration.id

The ID that identifies the analytics configuration.

analytics_configuration.storage_class_analysis

Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.

Show child fields
analytics_configuration.storage_class_analysis.data_export

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.

Show child fields
analytics_configuration.storage_class_analysis.data_export.destination

The place to store the data for an analysis.

Show child fields
analytics_configuration.storage_class_analysis.data_export.destination.s3_bucket_destination

A destination signifying output to an S3 bucket.

Show child fields
analytics_configuration.storage_class_analysis.data_export.destination.s3_bucket_destination.bucket

The Amazon Resource Name (ARN) of the bucket to which data is exported.

analytics_configuration.storage_class_analysis.data_export.destination.s3_bucket_destination.bucket_account_id

The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data.

Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.

analytics_configuration.storage_class_analysis.data_export.destination.s3_bucket_destination.format

Specifies the file format used when exporting data to Amazon S3.

analytics_configuration.storage_class_analysis.data_export.destination.s3_bucket_destination.prefix

The prefix to use when exporting data. The prefix is prepended to all results.

analytics_configuration.storage_class_analysis.data_export.output_schema_version

The version of the output schema to use when exporting data. Must be V_1.