Class: AWSCDK::S3::CfnBucket::FilterRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3/cfn_bucket.rb

Overview

Specifies the Amazon S3 object key name to filter on.

An object key name is the name assigned to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of the object key name. A prefix is a specific string of characters at the beginning of an object key name, which you can use to organize objects. For example, you can start the key names of related objects with a prefix, such as 2023- or engineering/ . Then, you can use FilterRule to find objects in a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it is at the end of the object key name instead of at the beginning.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ FilterRuleProperty

Returns a new instance of FilterRuleProperty.

Parameters:

  • name (String)

    The object key name prefix or suffix identifying one or more objects to which the filtering rule applies.

  • value (String)

    The value that the filter searches for in object key names.



1733
1734
1735
1736
1737
1738
# File 's3/cfn_bucket.rb', line 1733

def initialize(name:, value:)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#nameString (readonly)

The object key name prefix or suffix identifying one or more objects to which the filtering rule applies.

The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon S3 User Guide .



1746
1747
1748
# File 's3/cfn_bucket.rb', line 1746

def name
  @name
end

#valueString (readonly)

The value that the filter searches for in object key names.



1751
1752
1753
# File 's3/cfn_bucket.rb', line 1751

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1753
1754
1755
1756
1757
1758
# File 's3/cfn_bucket.rb', line 1753

def self.jsii_properties
  {
    :name => "name",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1760
1761
1762
1763
1764
1765
1766
1767
# File 's3/cfn_bucket.rb', line 1760

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "value" => @value,
  })
  result.compact
end