java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.stepfunctions.Condition
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:24.293Z") @Stability(Stable) public abstract class Condition extends software.amazon.jsii.JsiiObject
A Condition for use in a Choice state branch.

Example:

 Map map = Map.Builder.create(this, "Map State")
         .maxConcurrency(1)
         .itemsPath(JsonPath.stringAt("$.inputForMap"))
         .itemSelector(Map.of(
                 "item", JsonPath.stringAt("$.Map.Item.Value")))
         .resultPath("$.mapOutput")
         .build();
 // The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
 // Below example is with a Choice and Pass step
 Choice choice = new Choice(this, "Choice");
 Condition condition1 = Condition.stringEquals("$.item.status", "SUCCESS");
 Pass step1 = new Pass(this, "Step1");
 Pass step2 = new Pass(this, "Step2");
 Pass finish = new Pass(this, "Finish");
 Chain definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish);
 map.itemProcessor(definition);
 
  • Constructor Details

    • Condition

      protected Condition(software.amazon.jsii.JsiiObjectRef objRef)
    • Condition

      protected Condition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Condition

      @Stability(Stable) protected Condition()
  • Method Details

    • and

      @Stability(Stable) @NotNull public static Condition and(@NotNull @NotNull Condition... conditions)
      Combine two or more conditions with a logical AND.

      Parameters:
      conditions - This parameter is required.
    • booleanEquals

      @Stability(Stable) @NotNull public static Condition booleanEquals(@NotNull String variable, @NotNull Boolean value)
      Matches if a boolean field has the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • booleanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition booleanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a boolean field equals to a value at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • isBoolean

      @Stability(Stable) @NotNull public static Condition isBoolean(@NotNull String variable)
      Matches if variable is boolean.

      Parameters:
      variable - This parameter is required.
    • isNotBoolean

      @Stability(Stable) @NotNull public static Condition isNotBoolean(@NotNull String variable)
      Matches if variable is not boolean.

      Parameters:
      variable - This parameter is required.
    • isNotNull

      @Stability(Stable) @NotNull public static Condition isNotNull(@NotNull String variable)
      Matches if variable is not null.

      Parameters:
      variable - This parameter is required.
    • isNotNumeric

      @Stability(Stable) @NotNull public static Condition isNotNumeric(@NotNull String variable)
      Matches if variable is not numeric.

      Parameters:
      variable - This parameter is required.
    • isNotPresent

      @Stability(Stable) @NotNull public static Condition isNotPresent(@NotNull String variable)
      Matches if variable is not present.

      Parameters:
      variable - This parameter is required.
    • isNotString

      @Stability(Stable) @NotNull public static Condition isNotString(@NotNull String variable)
      Matches if variable is not a string.

      Parameters:
      variable - This parameter is required.
    • isNotTimestamp

      @Stability(Stable) @NotNull public static Condition isNotTimestamp(@NotNull String variable)
      Matches if variable is not a timestamp.

      Parameters:
      variable - This parameter is required.
    • isNull

      @Stability(Stable) @NotNull public static Condition isNull(@NotNull String variable)
      Matches if variable is Null.

      Parameters:
      variable - This parameter is required.
    • isNumeric

      @Stability(Stable) @NotNull public static Condition isNumeric(@NotNull String variable)
      Matches if variable is numeric.

      Parameters:
      variable - This parameter is required.
    • isPresent

      @Stability(Stable) @NotNull public static Condition isPresent(@NotNull String variable)
      Matches if variable is present.

      Parameters:
      variable - This parameter is required.
    • isString

      @Stability(Stable) @NotNull public static Condition isString(@NotNull String variable)
      Matches if variable is a string.

      Parameters:
      variable - This parameter is required.
    • isTimestamp

      @Stability(Stable) @NotNull public static Condition isTimestamp(@NotNull String variable)
      Matches if variable is a timestamp.

      Parameters:
      variable - This parameter is required.
    • not

      @Stability(Stable) @NotNull public static Condition not(@NotNull Condition condition)
      Negate a condition.

      Parameters:
      condition - This parameter is required.
    • numberEquals

      @Stability(Stable) @NotNull public static Condition numberEquals(@NotNull String variable, @NotNull Number value)
      Matches if a numeric field has the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition numberEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a numeric field has the value in a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberGreaterThan

      @Stability(Stable) @NotNull public static Condition numberGreaterThan(@NotNull String variable, @NotNull Number value)
      Matches if a numeric field is greater than the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberGreaterThanEquals

      @Stability(Stable) @NotNull public static Condition numberGreaterThanEquals(@NotNull String variable, @NotNull Number value)
      Matches if a numeric field is greater than or equal to the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberGreaterThanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition numberGreaterThanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a numeric field is greater than or equal to the value at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberGreaterThanJsonPath

      @Stability(Stable) @NotNull public static Condition numberGreaterThanJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a numeric field is greater than the value at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberLessThan

      @Stability(Stable) @NotNull public static Condition numberLessThan(@NotNull String variable, @NotNull Number value)
      Matches if a numeric field is less than the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberLessThanEquals

      @Stability(Stable) @NotNull public static Condition numberLessThanEquals(@NotNull String variable, @NotNull Number value)
      Matches if a numeric field is less than or equal to the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberLessThanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition numberLessThanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a numeric field is less than or equal to the numeric value at given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • numberLessThanJsonPath

      @Stability(Stable) @NotNull public static Condition numberLessThanJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a numeric field is less than the value at the given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • or

      @Stability(Stable) @NotNull public static Condition or(@NotNull @NotNull Condition... conditions)
      Combine two or more conditions with a logical OR.

      Parameters:
      conditions - This parameter is required.
    • stringEquals

      @Stability(Stable) @NotNull public static Condition stringEquals(@NotNull String variable, @NotNull String value)
      Matches if a string field has the given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition stringEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a string field equals to a value at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringGreaterThan

      @Stability(Stable) @NotNull public static Condition stringGreaterThan(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts after a given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringGreaterThanEquals

      @Stability(Stable) @NotNull public static Condition stringGreaterThanEquals(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts after or equal to a given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringGreaterThanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition stringGreaterThanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts after or equal to value at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringGreaterThanJsonPath

      @Stability(Stable) @NotNull public static Condition stringGreaterThanJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts after a value at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringLessThan

      @Stability(Stable) @NotNull public static Condition stringLessThan(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts before a given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringLessThanEquals

      @Stability(Stable) @NotNull public static Condition stringLessThanEquals(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts equal to or before a given value.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringLessThanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition stringLessThanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts equal to or before a given mapping.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringLessThanJsonPath

      @Stability(Stable) @NotNull public static Condition stringLessThanJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a string field sorts before a given value at a particular mapping.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • stringMatches

      @Stability(Stable) @NotNull public static Condition stringMatches(@NotNull String variable, @NotNull String value)
      Matches if a field matches a string pattern that can contain a wild card () e.g: log-.txt or LATEST. No other characters other than "" have any special meaning - * can be escaped: \.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampEquals

      @Stability(Stable) @NotNull public static Condition timestampEquals(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is the same time as the given timestamp.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition timestampEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is the same time as the timestamp at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampGreaterThan

      @Stability(Stable) @NotNull public static Condition timestampGreaterThan(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is after the given timestamp.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampGreaterThanEquals

      @Stability(Stable) @NotNull public static Condition timestampGreaterThanEquals(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is after or equal to the given timestamp.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampGreaterThanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition timestampGreaterThanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is after or equal to the timestamp at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampGreaterThanJsonPath

      @Stability(Stable) @NotNull public static Condition timestampGreaterThanJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is after the timestamp at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampLessThan

      @Stability(Stable) @NotNull public static Condition timestampLessThan(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is before the given timestamp.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampLessThanEquals

      @Stability(Stable) @NotNull public static Condition timestampLessThanEquals(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is before or equal to the given timestamp.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampLessThanEqualsJsonPath

      @Stability(Stable) @NotNull public static Condition timestampLessThanEqualsJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is before or equal to the timestamp at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • timestampLessThanJsonPath

      @Stability(Stable) @NotNull public static Condition timestampLessThanJsonPath(@NotNull String variable, @NotNull String value)
      Matches if a timestamp field is before the timestamp at a given mapping path.

      Parameters:
      variable - This parameter is required.
      value - This parameter is required.
    • renderCondition

      @Stability(Stable) @NotNull public abstract Object renderCondition()
      Render Amazon States Language JSON for the condition.