Class: AWSCDK::SNS::StringConditions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sns/string_conditions.rb

Overview

Conditions that can be applied to string attributes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowlist: nil, denylist: nil, match_prefixes: nil, match_suffixes: nil) ⇒ StringConditions

Returns a new instance of StringConditions.

Parameters:

  • allowlist (Array<String>, nil) (defaults to: nil)

    Match one or more values.

  • denylist (Array<String>, nil) (defaults to: nil)

    Match any value that doesn't include any of the specified values.

  • match_prefixes (Array<String>, nil) (defaults to: nil)

    Matches values that begins with the specified prefixes.

  • match_suffixes (Array<String>, nil) (defaults to: nil)

    Matches values that end with the specified suffixes.



11
12
13
14
15
16
17
18
19
20
# File 'sns/string_conditions.rb', line 11

def initialize(allowlist: nil, denylist: nil, match_prefixes: nil, match_suffixes: nil)
  @allowlist = allowlist
  Jsii::Type.check_type(@allowlist, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowlist") unless @allowlist.nil?
  @denylist = denylist
  Jsii::Type.check_type(@denylist, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "denylist") unless @denylist.nil?
  @match_prefixes = match_prefixes
  Jsii::Type.check_type(@match_prefixes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "matchPrefixes") unless @match_prefixes.nil?
  @match_suffixes = match_suffixes
  Jsii::Type.check_type(@match_suffixes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "matchSuffixes") unless @match_suffixes.nil?
end

Instance Attribute Details

#allowlistArray<String>? (readonly)

Note:

Default: - None

Match one or more values.

Returns:

  • (Array<String>, nil)


26
27
28
# File 'sns/string_conditions.rb', line 26

def allowlist
  @allowlist
end

#denylistArray<String>? (readonly)

Note:

Default: - None

Match any value that doesn't include any of the specified values.

Returns:

  • (Array<String>, nil)


31
32
33
# File 'sns/string_conditions.rb', line 31

def denylist
  @denylist
end

#match_prefixesArray<String>? (readonly)

Note:

Default: - None

Matches values that begins with the specified prefixes.

Returns:

  • (Array<String>, nil)


36
37
38
# File 'sns/string_conditions.rb', line 36

def match_prefixes
  @match_prefixes
end

#match_suffixesArray<String>? (readonly)

Note:

Default: - None

Matches values that end with the specified suffixes.

Returns:

  • (Array<String>, nil)


41
42
43
# File 'sns/string_conditions.rb', line 41

def match_suffixes
  @match_suffixes
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'sns/string_conditions.rb', line 43

def self.jsii_properties
  {
    :allowlist => "allowlist",
    :denylist => "denylist",
    :match_prefixes => "matchPrefixes",
    :match_suffixes => "matchSuffixes",
  }
end

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'sns/string_conditions.rb', line 52

def to_jsii
  result = {}
  result.merge!({
    "allowlist" => @allowlist,
    "denylist" => @denylist,
    "matchPrefixes" => @match_prefixes,
    "matchSuffixes" => @match_suffixes,
  })
  result.compact
end