Class Match
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.assertions.Match
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:39:56.970Z")
@Stability(Stable)
public abstract class Match
extends software.amazon.jsii.JsiiObject
Partial and special matching during template assertions.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Matcherabsent()Use this matcher in the place of a field's value, if the field must not be present.static MatcheranyValue()Matches any non-null value at the target.static MatcherarrayEquals(List<? extends Object> pattern) Matches the specified pattern with the array found in the same relative path of the target.static MatcherMatches the specified pattern with the array found in the same relative path of the target.static MatcherDeep exact matching of the specified pattern to the target.static MatcherMatches any target which does NOT follow the specified pattern.static MatcherobjectEquals(Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.static MatcherobjectLike(Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.static MatcherserializedJson(Object pattern) Matches any string-encoded JSON and applies the specified pattern after parsing it.static MatcherstringLikeRegexp(String pattern) Matches targets according to a regular expression.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Match
protected Match(software.amazon.jsii.JsiiObjectRef objRef) -
Match
protected Match(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Match
@Stability(Stable) protected Match()
-
-
Method Details
-
absent
Use this matcher in the place of a field's value, if the field must not be present. -
anyValue
Matches any non-null value at the target. -
arrayEquals
@Stability(Stable) @NotNull public static Matcher arrayEquals(@NotNull List<? extends Object> pattern) Matches the specified pattern with the array found in the same relative path of the target.The set of elements (or matchers) must match exactly and in order.
- Parameters:
pattern- the pattern to match. This parameter is required.
-
arrayWith
@Stability(Stable) @NotNull public static Matcher arrayWith(@NotNull List<? extends Object> pattern) Matches the specified pattern with the array found in the same relative path of the target.The set of elements (or matchers) must be in the same order as would be found.
- Parameters:
pattern- the pattern to match. This parameter is required.
-
exact
Deep exact matching of the specified pattern to the target.- Parameters:
pattern- the pattern to match. This parameter is required.
-
not
Matches any target which does NOT follow the specified pattern.- Parameters:
pattern- the pattern to NOT match. This parameter is required.
-
objectEquals
@Stability(Stable) @NotNull public static Matcher objectEquals(@NotNull Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.The keys and their values (or matchers) must match exactly with the target.
- Parameters:
pattern- the pattern to match. This parameter is required.
-
objectLike
@Stability(Stable) @NotNull public static Matcher objectLike(@NotNull Map<String, ? extends Object> pattern) Matches the specified pattern to an object found in the same relative path of the target.The keys and their values (or matchers) must be present in the target but the target can be a superset.
- Parameters:
pattern- the pattern to match. This parameter is required.
-
serializedJson
Matches any string-encoded JSON and applies the specified pattern after parsing it.- Parameters:
pattern- the pattern to match after parsing the encoded JSON. This parameter is required.
-
stringLikeRegexp
Matches targets according to a regular expression.- Parameters:
pattern- This parameter is required.
-