Skip to content

aws.s3control.get_bucket_lifecycle_configuration

Example SQL Queries

SELECT * FROM
aws.s3control.get_bucket_lifecycle_configuration
WHERE
"account_id" = 'VALUE'
AND "bucket" = 'VALUE';

Description

This action gets an Amazon S3 on Outposts bucket’s lifecycle configuration. To get an S3 bucket’s lifecycle configuration, see GetBucketLifecycleConfiguration in the Amazon S3 API Reference.

Returns the lifecycle configuration information set on the Outposts bucket. For more information, see Using Amazon S3 on Outposts and for information about lifecycle configuration, see Object Lifecycle Management in Amazon S3 User Guide.

To use this action, you must have permission to perform the s3-outposts:GetLifecycleConfiguration action. The Outposts 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.

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by using the access point ARN, see the Examples section.

GetBucketLifecycleConfiguration has the following special error:

  • Error code: NoSuchLifecycleConfiguration

    • Description: The lifecycle configuration does not exist.

    • HTTP Status Code: 404 Not Found

    • SOAP Fault Code Prefix: Client

The following actions are related to GetBucketLifecycleConfiguration:

Table Definition

Column NameColumn Data Type
account_id Required Input Column

The Amazon Web Services account ID of the Outposts bucket.

VARCHAR
bucket Required Input Column

The Amazon Resource Name (ARN) of the bucket.

For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.

For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/bucket/<my-bucket-name>. For example, to access the bucket reports through Outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports. The value must be URL encoded.

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.

rules

Container for the lifecycle rule of the Outposts bucket.

STRUCT(
"expiration" STRUCT(
"date" TIMESTAMP_S,
"days" BIGINT,
"expired_object_delete_marker" BOOLEAN
),
"id" VARCHAR,
"filter" STRUCT(
"prefix" VARCHAR,
"tag" STRUCT(
"key" VARCHAR,
"value" VARCHAR
),
"and" STRUCT(
"prefix" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"object_size_greater_than" BIGINT,
"object_size_less_than" BIGINT
),
"object_size_greater_than" BIGINT,
"object_size_less_than" BIGINT
),
"status" VARCHAR,
"transitions" STRUCT(
"date" TIMESTAMP_S,
"days" BIGINT,
"storage_class" VARCHAR
)[],
"noncurrent_version_transitions" STRUCT(
"noncurrent_days" BIGINT,
"storage_class" VARCHAR
)[],
"noncurrent_version_expiration" STRUCT(
"noncurrent_days" BIGINT,
"newer_noncurrent_versions" BIGINT
),
"abort_incomplete_multipart_upload" STRUCT(
"days_after_initiation" BIGINT
)
)[]
Show child fields
rules[]
Show child fields
rules[].abort_incomplete_multipart_upload

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 waits before permanently removing all parts of the upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in the Amazon S3 User Guide.

Show child fields
rules[].abort_incomplete_multipart_upload.days_after_initiation

Specifies the number of days after which Amazon S3 aborts an incomplete multipart upload to the Outposts bucket.

rules[].expiration

Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.

Show child fields
rules[].expiration.date

Indicates at what date the object is to be deleted. Should be in GMT ISO 8601 format.

rules[].expiration.days

Indicates the lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer.

rules[].expiration.expired_object_delete_marker

Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set to true, the delete marker will be expired. If set to false, the policy takes no action. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

rules[].filter

The container for the filter of lifecycle rule.

Show child fields
rules[].filter.and

The container for the AND condition for the lifecycle rule.

Show child fields
rules[].filter.and.object_size_greater_than

The non-inclusive minimum object size for the lifecycle rule. Setting this property to 7 means the rule applies to objects with a size that is greater than 7.

rules[].filter.and.object_size_less_than

The non-inclusive maximum object size for the lifecycle rule. Setting this property to 77 means the rule applies to objects with a size that is less than 77.

rules[].filter.and.prefix

Prefix identifying one or more objects to which the rule applies.

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

Key of the tag

rules[].filter.and.tags[].value

Value of the tag

rules[].filter.object_size_greater_than

Minimum object size to which the rule applies.

rules[].filter.object_size_less_than

Maximum object size to which the rule applies.

rules[].filter.prefix

Prefix identifying one or more objects to which the rule applies.

When you're using XML requests, you must replace special characters (such as carriage returns) in object keys with their equivalent XML entity codes. For more information, see XML-related object key constraints in the Amazon S3 User Guide.

rules[].filter.tag

A container for a key-value name pair.

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

Key of the tag

rules[].filter.tag.value

Value of the tag

rules[].id

Unique identifier for the rule. The value cannot be longer than 255 characters.

rules[].noncurrent_version_expiration

The noncurrent version expiration of the lifecycle rule.

Show child fields
rules[].noncurrent_version_expiration.newer_noncurrent_versions

Specifies how many noncurrent versions S3 on Outposts will retain. If there are this many more recent noncurrent versions, S3 on Outposts will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide.

rules[].noncurrent_version_expiration.noncurrent_days

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.

rules[].noncurrent_version_transitions[]
Show child fields
rules[].noncurrent_version_transitions[].noncurrent_days

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide.

rules[].noncurrent_version_transitions[].storage_class

The class of storage used to store the object.

rules[].status

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.

rules[].transitions[]
Show child fields
rules[].transitions[].date

Indicates when objects are transitioned to the specified storage class. The date value must be in ISO 8601 format. The time is always midnight UTC.

rules[].transitions[].days

Indicates the number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer.

rules[].transitions[].storage_class

The storage class to which you want the object to transition.