@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.309Z") @Stability(value=Stable) public class Match extends software.amazon.jsii.JsiiObject implements IResolvable
Example:
Rule rule = Rule.Builder.create(this, "rule")
.eventPattern(EventPattern.builder()
.detail(Map.of(
"object", Map.of(
// Matchers may appear at any level
"size", Match.greaterThan(1024)),
// 'OR' condition
"source-storage-class", Match.anyOf(Match.prefix("GLACIER"), Match.exactString("DEEP_ARCHIVE"))))
// If you prefer, you can use a low level array of strings, as directly consumed by EventBridge
.source(List.of("aws.s3"))
.region(Match.anythingButPrefix("us-gov"))
.build())
.build();
software.amazon.jsii.JsiiObject.InitializationModeIResolvable.Jsii$Default, IResolvable.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Match(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Match(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
allOf(Object... matchers)
Matches an event if any of the provided matchers do.
|
static List<String> |
anyOf(Object... matchers)
Matches an event if any of the provided matchers does.
|
static List<String> |
anythingBut(Object... values)
Matches anything except what's provided in the rule.
|
static List<String> |
anythingButPrefix(String prefix)
Matches any string that doesn't start with the given prefix.
|
List<String> |
asList()
A representation of this matcher as a list of strings.
|
static List<String> |
cidr(String range)
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
|
static List<String> |
doesNotExist()
Matches when the field is present in the JSON of the event.
|
static List<String> |
equal(Number value)
Matches numbers equal to the provided value.
|
static List<String> |
exactString(String value)
Matches a string, exactly, in the JSON of the event.
|
static List<String> |
exists()
Matches when the field is absent from the JSON of the event.
|
List<String> |
getCreationStack()
The creation stack of this resolvable which will be appended to errors thrown during resolution.
|
static List<String> |
greaterThan(Number value)
Matches numbers greater than the provided value.
|
static List<String> |
greaterThanOrEqual(Number value)
Matches numbers greater than, or equal to, the provided value.
|
static List<String> |
interval(Number lower,
Number upper)
Matches numbers inside a closed numeric interval.
|
static List<String> |
ipAddressRange(String range)
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
|
static List<String> |
lessThan(Number value)
Matches numbers less than the provided value.
|
static List<String> |
lessThanOrEqual(Number value)
Matches numbers less than, or equal to, the provided value.
|
static List<String> |
nullValue()
Matches a null value in the JSON of the event.
|
static List<String> |
prefix(String value)
Matches strings with the given prefix in the JSON of the event.
|
Object |
resolve(IResolveContext context)
Produce the Token's value at resolution time.
|
String |
toString()
Return a string representation of this resolvable object.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Match(software.amazon.jsii.JsiiObjectRef objRef)
protected Match(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static List<String> allOf(@NotNull Object... matchers)
Only numeric matchers are accepted.
matchers - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> anyOf(@NotNull Object... matchers)
matchers - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> anythingBut(@NotNull Object... values)
The list of provided values must contain only strings or only numbers.
values - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> anythingButPrefix(@NotNull String prefix)
prefix - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> cidr(@NotNull String range)
range - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> doesNotExist()
@Stability(value=Stable) @NotNull public static List<String> equal(@NotNull Number value)
value - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> exactString(@NotNull String value)
value - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> exists()
@Stability(value=Stable) @NotNull public static List<String> greaterThan(@NotNull Number value)
value - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> greaterThanOrEqual(@NotNull Number value)
value - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> interval(@NotNull Number lower, @NotNull Number upper)
Match.allOf(Match.greaterThanOrEqual(lower), Match.lessThanOrEqual(upper))
lower - Lower bound (inclusive). This parameter is required.upper - Upper bound (inclusive). This parameter is required.@Stability(value=Stable) @NotNull public static List<String> ipAddressRange(@NotNull String range)
Alias of cidr().
range - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> lessThan(@NotNull Number value)
value - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> lessThanOrEqual(@NotNull Number value)
value - This parameter is required.@Stability(value=Stable) @NotNull public static List<String> nullValue()
@Stability(value=Stable) @NotNull public static List<String> prefix(@NotNull String value)
value - This parameter is required.@Stability(value=Stable) @NotNull public List<String> asList()
@Stability(value=Stable) @NotNull public Object resolve(@NotNull IResolveContext context)
resolve in interface IResolvablecontext - This parameter is required.@Stability(value=Stable) @NotNull public String toString()
Returns a reversible string representation.
toString in interface IResolvabletoString in class Object@Stability(value=Stable) @NotNull public List<String> getCreationStack()
This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.
getCreationStack in interface IResolvableCopyright © 2022. All rights reserved.