Class: Aws::S3::Types::PutBucketLifecycleConfigurationRequest
- Inherits:
-
Struct
- Object
- Struct
- Aws::S3::Types::PutBucketLifecycleConfigurationRequest
- Includes:
- Aws::Structure
- Defined in:
- lib/aws-sdk-s3/types.rb
Overview
When making an API call, you may pass PutBucketLifecycleConfigurationRequest data as a hash:
{
bucket: "BucketName", # required
checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
lifecycle_configuration: {
rules: [ # required
{
expiration: {
date: Time.now,
days: 1,
expired_object_delete_marker: false,
},
id: "ID",
prefix: "Prefix",
filter: {
prefix: "Prefix",
tag: {
key: "ObjectKey", # required
value: "Value", # required
},
object_size_greater_than: 1,
object_size_less_than: 1,
and: {
prefix: "Prefix",
tags: [
{
key: "ObjectKey", # required
value: "Value", # required
},
],
object_size_greater_than: 1,
object_size_less_than: 1,
},
},
status: "Enabled", # required, accepts Enabled, Disabled
transitions: [
{
date: Time.now,
days: 1,
storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
},
],
noncurrent_version_transitions: [
{
noncurrent_days: 1,
storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
newer_noncurrent_versions: 1,
},
],
noncurrent_version_expiration: {
noncurrent_days: 1,
newer_noncurrent_versions: 1,
},
abort_incomplete_multipart_upload: {
days_after_initiation: 1,
},
},
],
},
expected_bucket_owner: "AccountId",
}
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#bucket ⇒ String
The name of the bucket for which to set the configuration.
-
#checksum_algorithm ⇒ String
Indicates the algorithm used to create the checksum for the object when using the SDK.
-
#expected_bucket_owner ⇒ String
The account ID of the expected bucket owner.
-
#lifecycle_configuration ⇒ Types::BucketLifecycleConfiguration
Container for lifecycle rules.
Instance Attribute Details
#bucket ⇒ String
The name of the bucket for which to set the configuration.
11876 11877 11878 11879 11880 11881 11882 11883 |
# File 'lib/aws-sdk-s3/types.rb', line 11876 class PutBucketLifecycleConfigurationRequest < Struct.new( :bucket, :checksum_algorithm, :lifecycle_configuration, :expected_bucket_owner) SENSITIVE = [] include Aws::Structure end |
#checksum_algorithm ⇒ String
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding ‘x-amz-checksum` or `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request with the HTTP status code `400 Bad Request`. For more information, see [Checking object integrity] in the *Amazon S3 User Guide*.
If you provide an individual checksum, Amazon S3 ignores any provided ‘ChecksumAlgorithm` parameter.
[1]: docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
11876 11877 11878 11879 11880 11881 11882 11883 |
# File 'lib/aws-sdk-s3/types.rb', line 11876 class PutBucketLifecycleConfigurationRequest < Struct.new( :bucket, :checksum_algorithm, :lifecycle_configuration, :expected_bucket_owner) SENSITIVE = [] include Aws::Structure end |
#expected_bucket_owner ⇒ String
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code ‘403 Forbidden` (access denied).
11876 11877 11878 11879 11880 11881 11882 11883 |
# File 'lib/aws-sdk-s3/types.rb', line 11876 class PutBucketLifecycleConfigurationRequest < Struct.new( :bucket, :checksum_algorithm, :lifecycle_configuration, :expected_bucket_owner) SENSITIVE = [] include Aws::Structure end |
#lifecycle_configuration ⇒ Types::BucketLifecycleConfiguration
Container for lifecycle rules. You can add as many as 1,000 rules.
11876 11877 11878 11879 11880 11881 11882 11883 |
# File 'lib/aws-sdk-s3/types.rb', line 11876 class PutBucketLifecycleConfigurationRequest < Struct.new( :bucket, :checksum_algorithm, :lifecycle_configuration, :expected_bucket_owner) SENSITIVE = [] include Aws::Structure end |