Class: AWSCDK::Events::Match
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Events::Match
- Includes:
- IResolvable
- Defined in:
- events/match.rb
Overview
An event pattern matcher.
Class Method Summary collapse
-
.all_of(*matchers) ⇒ Array<String>
Matches an event if any of the provided matchers do.
-
.any_of(*matchers) ⇒ Array<String>
Matches an event if any of the provided matchers does.
-
.anything_but(*values) ⇒ Array<String>
Matches anything except what's provided in the rule.
-
.anything_but_equals_ignore_case(*values) ⇒ Array<String>
Matches any string that doesn't match with the given value regardless of character casing.
-
.anything_but_prefix(*values) ⇒ Array<String>
Matches any string that doesn't start with the given prefix.
-
.anything_but_suffix(*values) ⇒ Array<String>
Matches any string that doesn't end with the given suffix.
-
.anything_but_wildcard(*values) ⇒ Array<String>
Matches any string that doesn't match with the given wildcard pattern.
-
.cidr(range) ⇒ Array<String>
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
-
.does_not_exist ⇒ Array<String>
Matches when the field is absent from the JSON of the event.
-
.equal(value) ⇒ Array<String>
Matches numbers equal to the provided value.
-
.equals_ignore_case(value) ⇒ Array<String>
Matches a string, regardless of case, in the JSON of the event.
-
.exact_string(value) ⇒ Array<String>
Matches a string, exactly, in the JSON of the event.
-
.exists ⇒ Array<String>
Matches when the field is present in the JSON of the event.
-
.greater_than(value) ⇒ Array<String>
Matches numbers greater than the provided value.
-
.greater_than_or_equal(value) ⇒ Array<String>
Matches numbers greater than, or equal to, the provided value.
-
.interval(lower, upper) ⇒ Array<String>
Matches numbers inside a closed numeric interval.
-
.ip_address_range(range) ⇒ Array<String>
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
- .jsii_overridable_methods ⇒ Object
-
.less_than(value) ⇒ Array<String>
Matches numbers less than the provided value.
-
.less_than_or_equal(value) ⇒ Array<String>
Matches numbers less than, or equal to, the provided value.
-
.null_value ⇒ Array<String>
Matches a null value in the JSON of the event.
-
.prefix(value) ⇒ Array<String>
Matches strings with the given prefix in the JSON of the event.
-
.prefix_equals_ignore_case(value) ⇒ Array<String>
Matches strings with the given prefix in the JSON of the event regardless of the casing.
-
.suffix(value) ⇒ Array<String>
Matches strings with the given suffix in the JSON of the event.
-
.suffix_equals_ignore_case(value) ⇒ Array<String>
Matches strings with the given suffix in the JSON of the event regardless of the casing.
-
.wildcard(value) ⇒ Array<String>
Matches strings with the given wildcard pattern in the JSON of the event.
Instance Method Summary collapse
-
#as_list ⇒ Array<String>
A representation of this matcher as a list of strings.
-
#creation_stack ⇒ Array<String>
The creation stack of this resolvable which will be appended to errors thrown during resolution.
-
#initialize(*args) ⇒ Match
constructor
A new instance of Match.
-
#resolve(context) ⇒ Object
Produce the Token's value at resolution time.
-
#to_string ⇒ String
Return a string representation of this resolvable object.
Constructor Details
#initialize(*args) ⇒ Match
Returns a new instance of Match.
9 10 11 |
# File 'events/match.rb', line 9 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_events.Match does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.all_of(*matchers) ⇒ Array<String>
Matches an event if any of the provided matchers do.
Only numeric matchers are accepted.
28 29 30 31 32 33 |
# File 'events/match.rb', line 28 def self.all_of(*matchers) matchers.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "matchers[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "allOf", [*matchers]) end |
.any_of(*matchers) ⇒ Array<String>
Matches an event if any of the provided matchers does.
39 40 41 42 43 44 |
# File 'events/match.rb', line 39 def self.any_of(*matchers) matchers.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "matchers[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "anyOf", [*matchers]) end |
.anything_but(*values) ⇒ Array<String>
Matches anything except what's provided in the rule.
The list of provided values must contain only strings or only numbers.
53 54 55 56 57 58 |
# File 'events/match.rb', line 53 def self.anything_but(*values) values.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "values[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "anythingBut", [*values]) end |
.anything_but_equals_ignore_case(*values) ⇒ Array<String>
Matches any string that doesn't match with the given value regardless of character casing.
64 65 66 67 68 69 |
# File 'events/match.rb', line 64 def self.anything_but_equals_ignore_case(*values) values.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "values[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "anythingButEqualsIgnoreCase", [*values]) end |
.anything_but_prefix(*values) ⇒ Array<String>
Matches any string that doesn't start with the given prefix.
75 76 77 78 79 80 |
# File 'events/match.rb', line 75 def self.anything_but_prefix(*values) values.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "values[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "anythingButPrefix", [*values]) end |
.anything_but_suffix(*values) ⇒ Array<String>
Matches any string that doesn't end with the given suffix.
86 87 88 89 90 91 |
# File 'events/match.rb', line 86 def self.anything_but_suffix(*values) values.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "values[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "anythingButSuffix", [*values]) end |
.anything_but_wildcard(*values) ⇒ Array<String>
Matches any string that doesn't match with the given wildcard pattern.
97 98 99 100 101 102 |
# File 'events/match.rb', line 97 def self.anything_but_wildcard(*values) values.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "values[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "anythingButWildcard", [*values]) end |
.cidr(range) ⇒ Array<String>
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
108 109 110 111 |
# File 'events/match.rb', line 108 def self.cidr(range) Jsii::Type.check_type(range, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "range") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "cidr", [range]) end |
.does_not_exist ⇒ Array<String>
Matches when the field is absent from the JSON of the event.
116 117 118 |
# File 'events/match.rb', line 116 def self.does_not_exist() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "doesNotExist", []) end |
.equal(value) ⇒ Array<String>
Matches numbers equal to the provided value.
124 125 126 127 |
# File 'events/match.rb', line 124 def self.equal(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "equal", [value]) end |
.equals_ignore_case(value) ⇒ Array<String>
Matches a string, regardless of case, in the JSON of the event.
133 134 135 136 |
# File 'events/match.rb', line 133 def self.equals_ignore_case(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "equalsIgnoreCase", [value]) end |
.exact_string(value) ⇒ Array<String>
Matches a string, exactly, in the JSON of the event.
142 143 144 145 |
# File 'events/match.rb', line 142 def self.exact_string(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "exactString", [value]) end |
.exists ⇒ Array<String>
Matches when the field is present in the JSON of the event.
150 151 152 |
# File 'events/match.rb', line 150 def self.exists() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "exists", []) end |
.greater_than(value) ⇒ Array<String>
Matches numbers greater than the provided value.
158 159 160 161 |
# File 'events/match.rb', line 158 def self.greater_than(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "greaterThan", [value]) end |
.greater_than_or_equal(value) ⇒ Array<String>
Matches numbers greater than, or equal to, the provided value.
167 168 169 170 |
# File 'events/match.rb', line 167 def self.greater_than_or_equal(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "greaterThanOrEqual", [value]) end |
.interval(lower, upper) ⇒ Array<String>
Matches numbers inside a closed numeric interval. Equivalent to:.
Match.allOf(Match.greaterThanOrEqual(lower), Match.lessThanOrEqual(upper))
179 180 181 182 183 |
# File 'events/match.rb', line 179 def self.interval(lower, upper) Jsii::Type.check_type(lower, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "lower") Jsii::Type.check_type(upper, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "upper") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "interval", [lower, upper]) end |
.ip_address_range(range) ⇒ Array<String>
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
Alias of cidr().
191 192 193 194 |
# File 'events/match.rb', line 191 def self.ip_address_range(range) Jsii::Type.check_type(range, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "range") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "ipAddressRange", [range]) end |
.jsii_overridable_methods ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'events/match.rb', line 13 def self.jsii_overridable_methods { :creation_stack => { kind: :property, name: "creationStack", is_optional: false }, :as_list => { kind: :method, name: "asList", is_optional: false }, :resolve => { kind: :method, name: "resolve", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, } end |
.less_than(value) ⇒ Array<String>
Matches numbers less than the provided value.
200 201 202 203 |
# File 'events/match.rb', line 200 def self.less_than(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "lessThan", [value]) end |
.less_than_or_equal(value) ⇒ Array<String>
Matches numbers less than, or equal to, the provided value.
209 210 211 212 |
# File 'events/match.rb', line 209 def self.less_than_or_equal(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "lessThanOrEqual", [value]) end |
.null_value ⇒ Array<String>
Matches a null value in the JSON of the event.
217 218 219 |
# File 'events/match.rb', line 217 def self.null_value() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "nullValue", []) end |
.prefix(value) ⇒ Array<String>
Matches strings with the given prefix in the JSON of the event.
225 226 227 228 |
# File 'events/match.rb', line 225 def self.prefix(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "prefix", [value]) end |
.prefix_equals_ignore_case(value) ⇒ Array<String>
Matches strings with the given prefix in the JSON of the event regardless of the casing.
234 235 236 237 |
# File 'events/match.rb', line 234 def self.prefix_equals_ignore_case(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "prefixEqualsIgnoreCase", [value]) end |
.suffix(value) ⇒ Array<String>
Matches strings with the given suffix in the JSON of the event.
243 244 245 246 |
# File 'events/match.rb', line 243 def self.suffix(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "suffix", [value]) end |
.suffix_equals_ignore_case(value) ⇒ Array<String>
Matches strings with the given suffix in the JSON of the event regardless of the casing.
252 253 254 255 |
# File 'events/match.rb', line 252 def self.suffix_equals_ignore_case(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "suffixEqualsIgnoreCase", [value]) end |
.wildcard(value) ⇒ Array<String>
Matches strings with the given wildcard pattern in the JSON of the event.
261 262 263 264 |
# File 'events/match.rb', line 261 def self.wildcard(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Match", "wildcard", [value]) end |
Instance Method Details
#as_list ⇒ Array<String>
A representation of this matcher as a list of strings.
279 280 281 |
# File 'events/match.rb', line 279 def as_list() jsii_call_method("asList", []) end |
#creation_stack ⇒ Array<String>
The creation stack of this resolvable which will be appended to errors thrown during resolution.
This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.
272 273 274 |
# File 'events/match.rb', line 272 def creation_stack() jsii_get_property("creationStack") end |
#resolve(context) ⇒ Object
Produce the Token's value at resolution time.
287 288 289 290 |
# File 'events/match.rb', line 287 def resolve(context) Jsii::Type.check_type(context, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2ZUNvbnRleHQifQ==")), "context") jsii_call_method("resolve", [context]) end |
#to_string ⇒ String
Return a string representation of this resolvable object.
Returns a reversible string representation.
297 298 299 |
# File 'events/match.rb', line 297 def to_string() jsii_call_method("toString", []) end |