Class: AWSCDK::S3::Filter
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::Filter
- Defined in:
- s3/filter.rb
Overview
A filter that identifies the subset of objects to which the replication rule applies.
Instance Attribute Summary collapse
-
#prefix ⇒ String?
readonly
An object key name prefix that identifies the object or objects to which the rule applies.
-
#tags ⇒ Array<AWSCDK::S3::Tag>?
readonly
The tag array used for tag filters.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(prefix: nil, tags: nil) ⇒ Filter
constructor
A new instance of Filter.
- #to_jsii ⇒ Object
Constructor Details
#initialize(prefix: nil, tags: nil) ⇒ Filter
Returns a new instance of Filter.
9 10 11 12 13 14 |
# File 's3/filter.rb', line 9 def initialize(prefix: nil, tags: nil) @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::S3::Tag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5UYWcifSwia2luZCI6ImFycmF5In19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#prefix ⇒ String? (readonly)
Note:
Default: - applies to all objects
An object key name prefix that identifies the object or objects to which the rule applies.
20 21 22 |
# File 's3/filter.rb', line 20 def prefix @prefix end |
#tags ⇒ Array<AWSCDK::S3::Tag>? (readonly)
Note:
Default: - applies to all objects
The tag array used for tag filters.
The rule applies only to objects that have the tag in this set.
27 28 29 |
# File 's3/filter.rb', line 27 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
29 30 31 32 33 34 |
# File 's3/filter.rb', line 29 def self.jsii_properties { :prefix => "prefix", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
36 37 38 39 40 41 42 43 |
# File 's3/filter.rb', line 36 def to_jsii result = {} result.merge!({ "prefix" => @prefix, "tags" => @tags, }) result.compact end |