Get Bucket Lifecycle
s3_get_bucket_lifecycle | R Documentation |
For an updated version of this API, see GetBucketLifecycleConfiguration¶
Description¶
For an updated version of this API, see
get_bucket_lifecycle_configuration
. If you configured a bucket
lifecycle using the filter
element, you should see the updated version
of this topic. This topic is provided for backward compatibility.
This operation is not supported by directory buckets.
Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.
To use this operation, you must have permission to perform the
s3:GetLifecycleConfiguration
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.
get_bucket_lifecycle
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 operations are related to get_bucket_lifecycle
:
-
get_bucket_lifecycle_configuration
-
put_bucket_lifecycle
-
delete_bucket_lifecycle
Usage¶
Arguments¶
Bucket
[required] The name of the bucket for which to get the lifecycle information.
ExpectedBucketOwner
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).
Value¶
A list with the following syntax:
list(
Rules = list(
list(
Expiration = list(
Date = as.POSIXct(
"2015-01-01"
),
Days = 123,
ExpiredObjectDeleteMarker = TRUE|FALSE
),
ID = "string",
Prefix = "string",
Status = "Enabled"|"Disabled",
Transition = list(
Date = as.POSIXct(
"2015-01-01"
),
Days = 123,
StorageClass = "GLACIER"|"STANDARD_IA"|"ONEZONE_IA"|"INTELLIGENT_TIERING"|"DEEP_ARCHIVE"|"GLACIER_IR"
),
NoncurrentVersionTransition = list(
NoncurrentDays = 123,
StorageClass = "GLACIER"|"STANDARD_IA"|"ONEZONE_IA"|"INTELLIGENT_TIERING"|"DEEP_ARCHIVE"|"GLACIER_IR",
NewerNoncurrentVersions = 123
),
NoncurrentVersionExpiration = list(
NoncurrentDays = 123,
NewerNoncurrentVersions = 123
),
AbortIncompleteMultipartUpload = list(
DaysAfterInitiation = 123
)
)
)
)