Class: AWSCDK::S3::CfnBucket::ReplicationRuleFilterProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::ReplicationRuleFilterProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
A filter that identifies the subset of objects to which the replication rule applies.
A Filter must specify exactly one Prefix , TagFilter , or an And child element.
Instance Attribute Summary collapse
-
#_and ⇒ AWSCDK::IResolvable, ...
readonly
A container for specifying rule filters.
-
#prefix ⇒ String?
readonly
An object key name prefix that identifies the subset of objects to which the rule applies.
-
#tag_filter ⇒ AWSCDK::IResolvable, ...
readonly
A container for specifying a tag key and value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(_and: nil, prefix: nil, tag_filter: nil) ⇒ ReplicationRuleFilterProperty
constructor
A new instance of ReplicationRuleFilterProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(_and: nil, prefix: nil, tag_filter: nil) ⇒ ReplicationRuleFilterProperty
Returns a new instance of ReplicationRuleFilterProperty.
3546 3547 3548 3549 3550 3551 3552 3553 |
# File 's3/cfn_bucket.rb', line 3546 def initialize(_and: nil, prefix: nil, tag_filter: nil) @_and = _and.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::ReplicationRuleAndOperatorProperty.new(**_and.transform_keys(&:to_sym)) : _and Jsii::Type.check_type(@_and, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuUmVwbGljYXRpb25SdWxlQW5kT3BlcmF0b3JQcm9wZXJ0eSJ9XX19")), "and") unless @_and.nil? @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? @tag_filter = tag_filter.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::TagFilterProperty.new(**tag_filter.transform_keys(&:to_sym)) : tag_filter Jsii::Type.check_type(@tag_filter, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuVGFnRmlsdGVyUHJvcGVydHkifV19fQ==")), "tagFilter") unless @tag_filter.nil? end |
Instance Attribute Details
#_and ⇒ AWSCDK::IResolvable, ... (readonly)
A container for specifying rule filters.
The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:
- If you specify both a
Prefixand aTagFilter, wrap these filters in anAndtag. - If you specify a filter based on multiple tags, wrap the
TagFilterelements in anAndtag.
3564 3565 3566 |
# File 's3/cfn_bucket.rb', line 3564 def _and @_and end |
#prefix ⇒ String? (readonly)
An object key name prefix that identifies the subset of objects to which the 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 .
3571 3572 3573 |
# File 's3/cfn_bucket.rb', line 3571 def prefix @prefix end |
#tag_filter ⇒ AWSCDK::IResolvable, ... (readonly)
A container for specifying a tag key and value.
The rule applies only to objects that have the tag in their tag set.
3578 3579 3580 |
# File 's3/cfn_bucket.rb', line 3578 def tag_filter @tag_filter end |
Class Method Details
.jsii_properties ⇒ Object
3580 3581 3582 3583 3584 3585 3586 |
# File 's3/cfn_bucket.rb', line 3580 def self.jsii_properties { :_and => "and", :prefix => "prefix", :tag_filter => "tagFilter", } end |
Instance Method Details
#to_jsii ⇒ Object
3588 3589 3590 3591 3592 3593 3594 3595 3596 |
# File 's3/cfn_bucket.rb', line 3588 def to_jsii result = {} result.merge!({ "and" => @_and, "prefix" => @prefix, "tagFilter" => @tag_filter, }) result.compact end |