Class: AWSCDK::S3::CfnBucket::RuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::RuleProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
Specifies lifecycle rules for an Amazon S3 bucket.
For more information, see Put Bucket Lifecycle Configuration in the Amazon S3 API Reference .
You must specify at least one of the following properties: AbortIncompleteMultipartUpload , ExpirationDate , ExpirationInDays , NoncurrentVersionExpirationInDays , NoncurrentVersionTransition , NoncurrentVersionTransitions , Transition , or Transitions .
Instance Attribute Summary collapse
-
#abort_incomplete_multipart_upload ⇒ AWSCDK::IResolvable, ...
readonly
Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
-
#expiration_date ⇒ DateTime, ...
readonly
Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier.
-
#expiration_in_days ⇒ Numeric?
readonly
Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier.
-
#expired_object_delete_marker ⇒ Boolean, ...
readonly
Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions.
-
#id ⇒ String?
readonly
Unique identifier for the rule.
-
#noncurrent_version_expiration ⇒ AWSCDK::IResolvable, ...
readonly
Specifies when noncurrent object versions expire.
-
#noncurrent_version_expiration_in_days ⇒ Numeric?
readonly
(Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire.
-
#noncurrent_version_transition ⇒ AWSCDK::IResolvable, ...
readonly
(Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class.
-
#noncurrent_version_transitions ⇒ AWSCDK::IResolvable, ...
readonly
For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class.
-
#object_size_greater_than ⇒ Numeric?
readonly
Specifies the minimum object size in bytes for this rule to apply to.
-
#object_size_less_than ⇒ Numeric?
readonly
Specifies the maximum object size in bytes for this rule to apply to.
-
#prefix ⇒ String?
readonly
Object key prefix that identifies one or more objects to which this rule applies.
-
#status ⇒ String
readonly
If
Enabled, the rule is currently being applied. -
#tag_filters ⇒ AWSCDK::IResolvable, ...
readonly
Tags to use to identify a subset of objects to which the lifecycle rule applies.
-
#transition ⇒ AWSCDK::IResolvable, ...
readonly
(Deprecated.) Specifies when an object transitions to a specified storage class.
-
#transitions ⇒ AWSCDK::IResolvable, ...
readonly
One or more transition rules that specify when an object transitions to a specified storage class.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status:, abort_incomplete_multipart_upload: nil, expiration_date: nil, expiration_in_days: nil, expired_object_delete_marker: nil, id: nil, noncurrent_version_expiration: nil, noncurrent_version_expiration_in_days: nil, noncurrent_version_transition: nil, noncurrent_version_transitions: nil, object_size_greater_than: nil, object_size_less_than: nil, prefix: nil, tag_filters: nil, transition: nil, transitions: nil) ⇒ RuleProperty
constructor
A new instance of RuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(status:, abort_incomplete_multipart_upload: nil, expiration_date: nil, expiration_in_days: nil, expired_object_delete_marker: nil, id: nil, noncurrent_version_expiration: nil, noncurrent_version_expiration_in_days: nil, noncurrent_version_transition: nil, noncurrent_version_transitions: nil, object_size_greater_than: nil, object_size_less_than: nil, prefix: nil, tag_filters: nil, transition: nil, transitions: nil) ⇒ RuleProperty
Returns a new instance of RuleProperty.
3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 |
# File 's3/cfn_bucket.rb', line 3932 def initialize(status:, abort_incomplete_multipart_upload: nil, expiration_date: nil, expiration_in_days: nil, expired_object_delete_marker: nil, id: nil, noncurrent_version_expiration: nil, noncurrent_version_expiration_in_days: nil, noncurrent_version_transition: nil, noncurrent_version_transitions: nil, object_size_greater_than: nil, object_size_less_than: nil, prefix: nil, tag_filters: nil, transition: nil, transitions: nil) @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") @abort_incomplete_multipart_upload = abort_incomplete_multipart_upload.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::AbortIncompleteMultipartUploadProperty.new(**abort_incomplete_multipart_upload.transform_keys(&:to_sym)) : abort_incomplete_multipart_upload Jsii::Type.check_type(@abort_incomplete_multipart_upload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuQWJvcnRJbmNvbXBsZXRlTXVsdGlwYXJ0VXBsb2FkUHJvcGVydHkifV19fQ==")), "abortIncompleteMultipartUpload") unless @abort_incomplete_multipart_upload.nil? @expiration_date = expiration_date Jsii::Type.check_type(@expiration_date, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiZGF0ZSJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "expirationDate") unless @expiration_date.nil? @expiration_in_days = expiration_in_days Jsii::Type.check_type(@expiration_in_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "expirationInDays") unless @expiration_in_days.nil? @expired_object_delete_marker = expired_object_delete_marker Jsii::Type.check_type(@expired_object_delete_marker, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "expiredObjectDeleteMarker") unless @expired_object_delete_marker.nil? @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") unless @id.nil? @noncurrent_version_expiration = noncurrent_version_expiration.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::NoncurrentVersionExpirationProperty.new(**noncurrent_version_expiration.transform_keys(&:to_sym)) : noncurrent_version_expiration Jsii::Type.check_type(@noncurrent_version_expiration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuTm9uY3VycmVudFZlcnNpb25FeHBpcmF0aW9uUHJvcGVydHkifV19fQ==")), "noncurrentVersionExpiration") unless @noncurrent_version_expiration.nil? @noncurrent_version_expiration_in_days = noncurrent_version_expiration_in_days Jsii::Type.check_type(@noncurrent_version_expiration_in_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "noncurrentVersionExpirationInDays") unless @noncurrent_version_expiration_in_days.nil? @noncurrent_version_transition = noncurrent_version_transition.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::NoncurrentVersionTransitionProperty.new(**noncurrent_version_transition.transform_keys(&:to_sym)) : noncurrent_version_transition Jsii::Type.check_type(@noncurrent_version_transition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuTm9uY3VycmVudFZlcnNpb25UcmFuc2l0aW9uUHJvcGVydHkifV19fQ==")), "noncurrentVersionTransition") unless @noncurrent_version_transition.nil? @noncurrent_version_transitions = noncurrent_version_transitions Jsii::Type.check_type(@noncurrent_version_transitions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQ2ZuQnVja2V0Lk5vbmN1cnJlbnRWZXJzaW9uVHJhbnNpdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "noncurrentVersionTransitions") unless @noncurrent_version_transitions.nil? @object_size_greater_than = object_size_greater_than Jsii::Type.check_type(@object_size_greater_than, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "objectSizeGreaterThan") unless @object_size_greater_than.nil? @object_size_less_than = object_size_less_than Jsii::Type.check_type(@object_size_less_than, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "objectSizeLessThan") unless @object_size_less_than.nil? @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? @tag_filters = tag_filters Jsii::Type.check_type(@tag_filters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQ2ZuQnVja2V0LlRhZ0ZpbHRlclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "tagFilters") unless @tag_filters.nil? @transition = transition.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::TransitionProperty.new(**transition.transform_keys(&:to_sym)) : transition Jsii::Type.check_type(@transition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuVHJhbnNpdGlvblByb3BlcnR5In1dfX0=")), "transition") unless @transition.nil? @transitions = transitions Jsii::Type.check_type(@transitions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQ2ZuQnVja2V0LlRyYW5zaXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "transitions") unless @transitions.nil? end |
Instance Attribute Details
#abort_incomplete_multipart_upload ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
3978 3979 3980 |
# File 's3/cfn_bucket.rb', line 3978 def abort_incomplete_multipart_upload @abort_incomplete_multipart_upload end |
#expiration_date ⇒ DateTime, ... (readonly)
Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier.
The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
3985 3986 3987 |
# File 's3/cfn_bucket.rb', line 3985 def expiration_date @expiration_date end |
#expiration_in_days ⇒ Numeric? (readonly)
Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier.
If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
3992 3993 3994 |
# File 's3/cfn_bucket.rb', line 3992 def expiration_in_days @expiration_in_days end |
#expired_object_delete_marker ⇒ Boolean, ... (readonly)
Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions.
If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ExpirationInDays , ExpirationDate , or TagFilters .
3999 4000 4001 |
# File 's3/cfn_bucket.rb', line 3999 def expired_object_delete_marker @expired_object_delete_marker end |
#id ⇒ String? (readonly)
Unique identifier for the rule.
The value can't be longer than 255 characters.
4006 4007 4008 |
# File 's3/cfn_bucket.rb', line 4006 def id @id end |
#noncurrent_version_expiration ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies when noncurrent object versions expire.
Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object's lifetime.
4013 4014 4015 |
# File 's3/cfn_bucket.rb', line 4013 def noncurrent_version_expiration @noncurrent_version_expiration end |
#noncurrent_version_expiration_in_days ⇒ Numeric? (readonly)
(Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
4018 4019 4020 |
# File 's3/cfn_bucket.rb', line 4018 def noncurrent_version_expiration_in_days @noncurrent_version_expiration_in_days end |
#noncurrent_version_transition ⇒ AWSCDK::IResolvable, ... (readonly)
(Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the NoncurrentVersionTransitions property.
4023 4024 4025 |
# File 's3/cfn_bucket.rb', line 4023 def noncurrent_version_transition @noncurrent_version_transition end |
#noncurrent_version_transitions ⇒ AWSCDK::IResolvable, ... (readonly)
For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class.
If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the NoncurrentVersionTransition property.
4030 4031 4032 |
# File 's3/cfn_bucket.rb', line 4030 def noncurrent_version_transitions @noncurrent_version_transitions end |
#object_size_greater_than ⇒ Numeric? (readonly)
Specifies the minimum object size in bytes for this rule to apply to.
Objects must be larger than this value in bytes. For more information about size based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
4037 4038 4039 |
# File 's3/cfn_bucket.rb', line 4037 def object_size_greater_than @object_size_greater_than end |
#object_size_less_than ⇒ Numeric? (readonly)
Specifies the maximum object size in bytes for this rule to apply to.
Objects must be smaller than this value in bytes. For more information about sized based rules, see Lifecycle configuration using size-based rules in the Amazon S3 User Guide .
4044 4045 4046 |
# File 's3/cfn_bucket.rb', line 4044 def object_size_less_than @object_size_less_than end |
#prefix ⇒ String? (readonly)
Object key prefix that identifies one or more objects to which this rule applies.
Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints .
4051 4052 4053 |
# File 's3/cfn_bucket.rb', line 4051 def prefix @prefix end |
#status ⇒ String (readonly)
If Enabled , the rule is currently being applied.
If Disabled , the rule is not currently being applied.
3973 3974 3975 |
# File 's3/cfn_bucket.rb', line 3973 def status @status end |
#tag_filters ⇒ AWSCDK::IResolvable, ... (readonly)
Tags to use to identify a subset of objects to which the lifecycle rule applies.
4056 4057 4058 |
# File 's3/cfn_bucket.rb', line 4056 def tag_filters @tag_filters end |
#transition ⇒ AWSCDK::IResolvable, ... (readonly)
(Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the Transitions property.
4061 4062 4063 |
# File 's3/cfn_bucket.rb', line 4061 def transition @transition end |
#transitions ⇒ AWSCDK::IResolvable, ... (readonly)
One or more transition rules that specify when an object transitions to a specified storage class.
If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the Transition property.
4068 4069 4070 |
# File 's3/cfn_bucket.rb', line 4068 def transitions @transitions end |
Class Method Details
.jsii_properties ⇒ Object
4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 |
# File 's3/cfn_bucket.rb', line 4070 def self.jsii_properties { :status => "status", :abort_incomplete_multipart_upload => "abortIncompleteMultipartUpload", :expiration_date => "expirationDate", :expiration_in_days => "expirationInDays", :expired_object_delete_marker => "expiredObjectDeleteMarker", :id => "id", :noncurrent_version_expiration => "noncurrentVersionExpiration", :noncurrent_version_expiration_in_days => "noncurrentVersionExpirationInDays", :noncurrent_version_transition => "noncurrentVersionTransition", :noncurrent_version_transitions => "noncurrentVersionTransitions", :object_size_greater_than => "objectSizeGreaterThan", :object_size_less_than => "objectSizeLessThan", :prefix => "prefix", :tag_filters => "tagFilters", :transition => "transition", :transitions => "transitions", } end |
Instance Method Details
#to_jsii ⇒ Object
4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 |
# File 's3/cfn_bucket.rb', line 4091 def to_jsii result = {} result.merge!({ "status" => @status, "abortIncompleteMultipartUpload" => @abort_incomplete_multipart_upload, "expirationDate" => @expiration_date, "expirationInDays" => @expiration_in_days, "expiredObjectDeleteMarker" => @expired_object_delete_marker, "id" => @id, "noncurrentVersionExpiration" => @noncurrent_version_expiration, "noncurrentVersionExpirationInDays" => @noncurrent_version_expiration_in_days, "noncurrentVersionTransition" => @noncurrent_version_transition, "noncurrentVersionTransitions" => @noncurrent_version_transitions, "objectSizeGreaterThan" => @object_size_greater_than, "objectSizeLessThan" => @object_size_less_than, "prefix" => @prefix, "tagFilters" => @tag_filters, "transition" => @transition, "transitions" => @transitions, }) result.compact end |