Class: AWSCDK::S3::CfnBucket::ReplicationRuleFilterProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_and: nil, prefix: nil, tag_filter: nil) ⇒ ReplicationRuleFilterProperty

Returns a new instance of ReplicationRuleFilterProperty.

Parameters:



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

#_andAWSCDK::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 Prefix and a TagFilter , wrap these filters in an And tag.
  • If you specify a filter based on multiple tags, wrap the TagFilter elements in an And tag.


3564
3565
3566
# File 's3/cfn_bucket.rb', line 3564

def _and
  @_and
end

#prefixString? (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_filterAWSCDK::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_propertiesObject



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_jsiiObject



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