Last chance! 50% off unlimited learning
Sale ends in
Sets lifecycle configuration for your bucket. If a lifecycle configuration exists, it replaces it.
s3_put_bucket_lifecycle_configuration(Bucket, LifecycleConfiguration)
[required]
svc$put_bucket_lifecycle_configuration( Bucket = "string", LifecycleConfiguration = list( Rules = list( list( Expiration = list( Date = as.POSIXct( "2015-01-01" ), Days = 123, ExpiredObjectDeleteMarker = TRUE|FALSE ), ID = "string", Prefix = "string", Filter = list( Prefix = "string", Tag = list( Key = "string", Value = "string" ), And = list( Prefix = "string", Tags = list( list( Key = "string", Value = "string" ) ) ) ), Status = "Enabled"|"Disabled", Transitions = list( list( Date = as.POSIXct( "2015-01-01" ), Days = 123, StorageClass = "GLACIER"|"STANDARD_IA"|"ONEZONE_IA"|"INTELLIGENT_TIERING"|"DEEP_ARCHIVE" ) ), NoncurrentVersionTransitions = list( list( NoncurrentDays = 123, StorageClass = "GLACIER"|"STANDARD_IA"|"ONEZONE_IA"|"INTELLIGENT_TIERING"|"DEEP_ARCHIVE" ) ), NoncurrentVersionExpiration = list( NoncurrentDays = 123 ), AbortIncompleteMultipartUpload = list( DaysAfterInitiation = 123 ) ) ) ) )
# NOT RUN {
# The following example replaces existing lifecycle configuration, if any,
# on the specified bucket.
# }
# NOT RUN {
svc$put_bucket_lifecycle_configuration(
Bucket = "examplebucket",
LifecycleConfiguration = list(
Rules = list(
list(
Expiration = list(
Days = 3650L
),
Filter = list(
Prefix = "documents/"
),
ID = "TestOnly",
Status = "Enabled",
Transitions = list(
list(
Days = 365L,
StorageClass = "GLACIER"
)
)
)
)
)
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab