public final class StepFunctionBuilder extends Object
StateMachine
object.Modifier and Type | Method and Description |
---|---|
static AndCondition.Builder |
and(Condition.Builder... conditionBuilders)
Represents the logical AND of multiple conditions.
|
static Branch.Builder |
branch()
A single branch of parallel execution in a state machine.
|
static Catcher.Builder |
catcher()
Catches an error from a
ParallelState or a TaskState and transitions into the specified recovery state. |
static Choice.Builder |
choice()
Class representing a choice rule to be included in a
ChoiceState . |
static ChoiceState.Builder |
choiceState()
A Choice state adds branching logic to a state machine.
|
static Transition.Builder |
end()
Transition indicating the state machine should terminate execution.
|
static BooleanEqualsCondition.Builder |
eq(String variable,
boolean expectedValue)
Binary condition for Boolean equality comparison.
|
static TimestampEqualsCondition.Builder |
eq(String variable,
Date expectedValue)
Binary condition for Timestamp equality comparison.
|
static NumericEqualsCondition.Builder |
eq(String variable,
double expectedValue)
Binary condition for Numeric equality comparison.
|
static NumericEqualsCondition.Builder |
eq(String variable,
long expectedValue)
Binary condition for Numeric equality comparison.
|
static StringEqualsCondition.Builder |
eq(String variable,
String expectedValue)
Binary condition for String equality comparison.
|
static FailState.Builder |
failState()
Terminal state that terminates the state machine and marks it as a failure.
|
static TimestampGreaterThanCondition.Builder |
gt(String variable,
Date expectedValue)
Binary condition for Timestamp greater than comparison.
|
static NumericGreaterThanCondition.Builder |
gt(String variable,
double expectedValue)
Binary condition for Numeric greater than comparison.
|
static NumericGreaterThanCondition.Builder |
gt(String variable,
long expectedValue)
Binary condition for Numeric greater than comparison.
|
static StringGreaterThanCondition.Builder |
gt(String variable,
String expectedValue)
Binary condition for String greater than comparison.
|
static TimestampGreaterThanOrEqualCondition.Builder |
gte(String variable,
Date expectedValue)
Binary condition for Timestamp greater than or equal to comparison.
|
static NumericGreaterThanOrEqualCondition.Builder |
gte(String variable,
double expectedValue)
Binary condition for Numeric greater than comparison.
|
static NumericGreaterThanOrEqualCondition.Builder |
gte(String variable,
long expectedValue)
Binary condition for Numeric greater than comparison.
|
static StringGreaterThanOrEqualCondition.Builder |
gte(String variable,
String expectedValue)
Binary condition for String greater than or equal to comparison.
|
static TimestampLessThanCondition.Builder |
lt(String variable,
Date expectedValue)
Binary condition for Timestamp less than comparison.
|
static NumericLessThanCondition.Builder |
lt(String variable,
double expectedValue)
Binary condition for Numeric less than comparison.
|
static NumericLessThanCondition.Builder |
lt(String variable,
long expectedValue)
Binary condition for Numeric less than comparison.
|
static StringLessThanCondition.Builder |
lt(String variable,
String expectedValue)
Binary condition for String less than comparison.
|
static TimestampLessThanOrEqualCondition.Builder |
lte(String variable,
Date expectedValue)
Binary condition for Timestamp less than or equal to comparison.
|
static NumericLessThanOrEqualCondition.Builder |
lte(String variable,
double expectedValue)
Binary condition for Numeric less than or equal to comparison.
|
static NumericLessThanOrEqualCondition.Builder |
lte(String variable,
long expectedValue)
Binary condition for Numeric less than or equal to comparison.
|
static StringLessThanOrEqualCondition.Builder |
lte(String variable,
String expectedValue)
Binary condition for String less than or equal to comparison.
|
static NextStateTransition.Builder |
next(String nextStateName)
A transition to another state in the state machine.
|
static NotCondition.Builder |
not(Condition.Builder conditionBuilder)
Represents the logical NOT of a single condition.
|
static OrCondition.Builder |
or(Condition.Builder... conditionBuilders)
Represents the logical OR of multiple conditions.
|
static ParallelState.Builder |
parallelState()
State that allows for parallel execution of
Branch s. |
static PassState.Builder |
passState()
The Pass State simply passes its input to its output, performing no work.
|
static Retrier.Builder |
retrier()
Describes retry behavior for a state.
|
static WaitFor.Builder |
seconds(int seconds)
|
static WaitFor.Builder |
secondsPath(String secondsPath)
|
static StateMachine.Builder |
stateMachine()
Represents a StepFunctions state machine.
|
static SucceedState.Builder |
succeedState()
The Succeed State terminates a state machine successfully.
|
static TaskState.Builder |
taskState()
The Task State causes the interpreter to execute the work identified by the state’s “Resource” field.
|
static WaitFor.Builder |
timestamp(Date timestamp)
|
static WaitFor.Builder |
timestampPath(String timestampPath)
|
static WaitState.Builder |
waitState()
A Wait state causes the interpreter to delay the machine from continuing for a specified time.
|
public static StateMachine.Builder stateMachine()
StateMachine
.public static ParallelState.Builder parallelState()
Branch
s. A Parallel state causes the interpreter to execute each
branch starting with the state named in its “StartAt” field, as concurrently as possible, and wait until each branch
terminates
(reaches a terminal state) before processing the Parallel state's “Next” field.ParallelState
.public static Branch.Builder branch()
ParallelState
.Branch
.public static PassState.Builder passState()
A Pass State MAY have a field named “Result”. If present, its value is treated as the output of a virtual task, and placed as prescribed by the “ResultPath” field, if any, to be passed on to the next state.
PassState
.public static SucceedState.Builder succeedState()
SucceedState
.public static FailState.Builder failState()
FailState
.public static WaitState.Builder waitState()
WaitState
.public static TaskState.Builder taskState()
Currently allowed resources include Lambda functions and States activities.
TaskState
.public static ChoiceState.Builder choiceState()
ChoiceState
.public static Choice.Builder choice()
ChoiceState
. A choice consists of a condition and a state
that the state machine will transition to if the condition evaluates to true.Choice
.public static Retrier.Builder retrier()
Retrier
.public static Catcher.Builder catcher()
ParallelState
or a TaskState
and transitions into the specified recovery state.
The
recovery state will receive the error output as input unless otherwise specified by a ResultPath.Catcher
.public static StringEqualsCondition.Builder eq(String variable, String expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericEqualsCondition.Builder eq(String variable, long expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericEqualsCondition.Builder eq(String variable, double expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static BooleanEqualsCondition.Builder eq(String variable, boolean expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static TimestampEqualsCondition.Builder eq(String variable, Date expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static StringGreaterThanCondition.Builder gt(String variable, String expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericGreaterThanCondition.Builder gt(String variable, long expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericGreaterThanCondition.Builder gt(String variable, double expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static TimestampGreaterThanCondition.Builder gt(String variable, Date expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static StringGreaterThanOrEqualCondition.Builder gte(String variable, String expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericGreaterThanOrEqualCondition.Builder gte(String variable, long expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericGreaterThanOrEqualCondition.Builder gte(String variable, double expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static TimestampGreaterThanOrEqualCondition.Builder gte(String variable, Date expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static StringLessThanCondition.Builder lt(String variable, String expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericLessThanCondition.Builder lt(String variable, long expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericLessThanCondition.Builder lt(String variable, double expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static TimestampLessThanCondition.Builder lt(String variable, Date expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static StringLessThanOrEqualCondition.Builder lte(String variable, String expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericLessThanOrEqualCondition.Builder lte(String variable, long expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NumericLessThanOrEqualCondition.Builder lte(String variable, double expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static TimestampLessThanOrEqualCondition.Builder lte(String variable, Date expectedValue)
variable
- The JSONPath expression that determines which piece of the input document is used for the comparison.expectedValue
- The expected value for this condition.Choice
public static NotCondition.Builder not(Condition.Builder conditionBuilder)
ChoiceState
.conditionBuilder
- The condition to be negated. May be another composite condition or a simple condition.NotCondition
.public static AndCondition.Builder and(Condition.Builder... conditionBuilders)
ChoiceState
.conditionBuilders
- The conditions to AND together. May be another composite condition or a simple condition.AndCondition
.public static OrCondition.Builder or(Condition.Builder... conditionBuilders)
ChoiceState
.conditionBuilders
- The conditions to OR together. May be another composite condition or a simple condition.OrCondition
.public static NextStateTransition.Builder next(String nextStateName)
nextStateName
- Name of state to transition to.public static Transition.Builder end()
public static WaitFor.Builder seconds(int seconds)
WaitFor
that can be used in a WaitState
. Instructs the WaitState
to wait for the
given number of seconds.seconds
- Number of seconds to wait. Must be positive.public static WaitFor.Builder secondsPath(String secondsPath)
WaitFor
that can be used in a WaitState
. Instructs the WaitState
to wait for the
number of seconds specified at the reference path in the input to the state.secondsPath
- Reference path to the location in the input data containing the number of seconds to wait.public static WaitFor.Builder timestamp(Date timestamp)
timestamp
- Date to wait until before proceeding.public static WaitFor.Builder timestampPath(String timestampPath)
WaitFor
that can be used in a WaitState
. Instructs the WaitState
to wait until
the date specified at the reference path in the input to the state.timestampPath
- Reference path to the location in the input data containing the date to wait until.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.