Class Condition
A Condition for use in a Choice state branch.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.AWS.StepFunctions.dll
Syntax (csharp)
public abstract class Condition : DeputyBase
Syntax (vb)
Public MustInherit Class Condition
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda;
Function submitLambda;
Function getStatusLambda;
var submitJob = new LambdaInvoke(this, "Submit Job", new LambdaInvokeProps {
LambdaFunction = submitLambda,
// Lambda's result is in the attribute `Payload`
OutputPath = "$.Payload"
});
var waitX = new Wait(this, "Wait X Seconds", new WaitProps {
Time = WaitTime.SecondsPath("$.waitSeconds")
});
var getStatus = new LambdaInvoke(this, "Get Job Status", new LambdaInvokeProps {
LambdaFunction = getStatusLambda,
// Pass just the field named "guid" into the Lambda, put the
// Lambda's result in a field called "status" in the response
InputPath = "$.guid",
OutputPath = "$.Payload"
});
var jobFailed = new Fail(this, "Job Failed", new FailProps {
Cause = "AWS Batch Job Failed",
Error = "DescribeJob returned FAILED"
});
var finalStatus = new LambdaInvoke(this, "Get Final Job Status", new LambdaInvokeProps {
LambdaFunction = getStatusLambda,
// Use "guid" field as input
InputPath = "$.guid",
OutputPath = "$.Payload"
});
var definition = submitJob.Next(waitX).Next(getStatus).Next(new Choice(this, "Job Complete?").When(Condition.StringEquals("$.status", "FAILED"), jobFailed).When(Condition.StringEquals("$.status", "SUCCEEDED"), finalStatus).Otherwise(waitX));
new StateMachine(this, "StateMachine", new StateMachineProps {
Definition = definition,
Timeout = Duration.Minutes(5)
});
Synopsis
Constructors
Condition() | |
Condition(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Condition(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
And(Condition[]) | Combine two or more conditions with a logical AND. |
BooleanEquals(String, Boolean) | Matches if a boolean field has the given value. |
BooleanEqualsJsonPath(String, String) | Matches if a boolean field equals to a value at a given mapping path. |
IsBoolean(String) | Matches if variable is boolean. |
IsNotBoolean(String) | Matches if variable is not boolean. |
IsNotNull(String) | Matches if variable is not null. |
IsNotNumeric(String) | Matches if variable is not numeric. |
IsNotPresent(String) | Matches if variable is not present. |
IsNotString(String) | Matches if variable is not a string. |
IsNotTimestamp(String) | Matches if variable is not a timestamp. |
IsNull(String) | Matches if variable is Null. |
IsNumeric(String) | Matches if variable is numeric. |
IsPresent(String) | Matches if variable is present. |
IsString(String) | Matches if variable is a string. |
IsTimestamp(String) | Matches if variable is a timestamp. |
Not(Condition) | Negate a condition. |
NumberEquals(String, Double) | Matches if a numeric field has the given value. |
NumberEqualsJsonPath(String, String) | Matches if a numeric field has the value in a given mapping path. |
NumberGreaterThan(String, Double) | Matches if a numeric field is greater than the given value. |
NumberGreaterThanEquals(String, Double) | Matches if a numeric field is greater than or equal to the given value. |
NumberGreaterThanEqualsJsonPath(String, String) | Matches if a numeric field is greater than or equal to the value at a given mapping path. |
NumberGreaterThanJsonPath(String, String) | Matches if a numeric field is greater than the value at a given mapping path. |
NumberLessThan(String, Double) | Matches if a numeric field is less than the given value. |
NumberLessThanEquals(String, Double) | Matches if a numeric field is less than or equal to the given value. |
NumberLessThanEqualsJsonPath(String, String) | Matches if a numeric field is less than or equal to the numeric value at given mapping path. |
NumberLessThanJsonPath(String, String) | Matches if a numeric field is less than the value at the given mapping path. |
Or(Condition[]) | Combine two or more conditions with a logical OR. |
RenderCondition() | Render Amazon States Language JSON for the condition. |
StringEquals(String, String) | Matches if a string field has the given value. |
StringEqualsJsonPath(String, String) | Matches if a string field equals to a value at a given mapping path. |
StringGreaterThan(String, String) | Matches if a string field sorts after a given value. |
StringGreaterThanEquals(String, String) | Matches if a string field sorts after or equal to a given value. |
StringGreaterThanEqualsJsonPath(String, String) | Matches if a string field sorts after or equal to value at a given mapping path. |
StringGreaterThanJsonPath(String, String) | Matches if a string field sorts after a value at a given mapping path. |
StringLessThan(String, String) | Matches if a string field sorts before a given value. |
StringLessThanEquals(String, String) | Matches if a string field sorts equal to or before a given value. |
StringLessThanEqualsJsonPath(String, String) | Matches if a string field sorts equal to or before a given mapping. |
StringLessThanJsonPath(String, String) | Matches if a string field sorts before a given value at a particular mapping. |
StringMatches(String, String) | 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: \. |
TimestampEquals(String, String) | Matches if a timestamp field is the same time as the given timestamp. |
TimestampEqualsJsonPath(String, String) | Matches if a timestamp field is the same time as the timestamp at a given mapping path. |
TimestampGreaterThan(String, String) | Matches if a timestamp field is after the given timestamp. |
TimestampGreaterThanEquals(String, String) | Matches if a timestamp field is after or equal to the given timestamp. |
TimestampGreaterThanEqualsJsonPath(String, String) | Matches if a timestamp field is after or equal to the timestamp at a given mapping path. |
TimestampGreaterThanJsonPath(String, String) | Matches if a timestamp field is after the timestamp at a given mapping path. |
TimestampLessThan(String, String) | Matches if a timestamp field is before the given timestamp. |
TimestampLessThanEquals(String, String) | Matches if a timestamp field is before or equal to the given timestamp. |
TimestampLessThanEqualsJsonPath(String, String) | Matches if a timestamp field is before or equal to the timestamp at a given mapping path. |
TimestampLessThanJsonPath(String, String) | Matches if a timestamp field is before the timestamp at a given mapping path. |
Constructors
Condition()
protected Condition()
Condition(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Condition(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Condition(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Condition(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
And(Condition[])
Combine two or more conditions with a logical AND.
public static Condition And(params Condition[] conditions)
Parameters
- conditions Condition[]
Returns
BooleanEquals(String, Boolean)
Matches if a boolean field has the given value.
public static Condition BooleanEquals(string variable, bool value)
Parameters
- variable System.String
- value System.Boolean
Returns
BooleanEqualsJsonPath(String, String)
Matches if a boolean field equals to a value at a given mapping path.
public static Condition BooleanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
IsBoolean(String)
Matches if variable is boolean.
public static Condition IsBoolean(string variable)
Parameters
- variable System.String
Returns
IsNotBoolean(String)
Matches if variable is not boolean.
public static Condition IsNotBoolean(string variable)
Parameters
- variable System.String
Returns
IsNotNull(String)
Matches if variable is not null.
public static Condition IsNotNull(string variable)
Parameters
- variable System.String
Returns
IsNotNumeric(String)
Matches if variable is not numeric.
public static Condition IsNotNumeric(string variable)
Parameters
- variable System.String
Returns
IsNotPresent(String)
Matches if variable is not present.
public static Condition IsNotPresent(string variable)
Parameters
- variable System.String
Returns
IsNotString(String)
Matches if variable is not a string.
public static Condition IsNotString(string variable)
Parameters
- variable System.String
Returns
IsNotTimestamp(String)
Matches if variable is not a timestamp.
public static Condition IsNotTimestamp(string variable)
Parameters
- variable System.String
Returns
IsNull(String)
Matches if variable is Null.
public static Condition IsNull(string variable)
Parameters
- variable System.String
Returns
IsNumeric(String)
Matches if variable is numeric.
public static Condition IsNumeric(string variable)
Parameters
- variable System.String
Returns
IsPresent(String)
Matches if variable is present.
public static Condition IsPresent(string variable)
Parameters
- variable System.String
Returns
IsString(String)
Matches if variable is a string.
public static Condition IsString(string variable)
Parameters
- variable System.String
Returns
IsTimestamp(String)
Matches if variable is a timestamp.
public static Condition IsTimestamp(string variable)
Parameters
- variable System.String
Returns
Not(Condition)
Negate a condition.
public static Condition Not(Condition condition)
Parameters
- condition Condition
Returns
NumberEquals(String, Double)
Matches if a numeric field has the given value.
public static Condition NumberEquals(string variable, double value)
Parameters
- variable System.String
- value System.Double
Returns
NumberEqualsJsonPath(String, String)
Matches if a numeric field has the value in a given mapping path.
public static Condition NumberEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
NumberGreaterThan(String, Double)
Matches if a numeric field is greater than the given value.
public static Condition NumberGreaterThan(string variable, double value)
Parameters
- variable System.String
- value System.Double
Returns
NumberGreaterThanEquals(String, Double)
Matches if a numeric field is greater than or equal to the given value.
public static Condition NumberGreaterThanEquals(string variable, double value)
Parameters
- variable System.String
- value System.Double
Returns
NumberGreaterThanEqualsJsonPath(String, String)
Matches if a numeric field is greater than or equal to the value at a given mapping path.
public static Condition NumberGreaterThanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
NumberGreaterThanJsonPath(String, String)
Matches if a numeric field is greater than the value at a given mapping path.
public static Condition NumberGreaterThanJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
NumberLessThan(String, Double)
Matches if a numeric field is less than the given value.
public static Condition NumberLessThan(string variable, double value)
Parameters
- variable System.String
- value System.Double
Returns
NumberLessThanEquals(String, Double)
Matches if a numeric field is less than or equal to the given value.
public static Condition NumberLessThanEquals(string variable, double value)
Parameters
- variable System.String
- value System.Double
Returns
NumberLessThanEqualsJsonPath(String, String)
Matches if a numeric field is less than or equal to the numeric value at given mapping path.
public static Condition NumberLessThanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
NumberLessThanJsonPath(String, String)
Matches if a numeric field is less than the value at the given mapping path.
public static Condition NumberLessThanJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
Or(Condition[])
Combine two or more conditions with a logical OR.
public static Condition Or(params Condition[] conditions)
Parameters
- conditions Condition[]
Returns
RenderCondition()
Render Amazon States Language JSON for the condition.
public abstract object RenderCondition()
Returns
System.Object
StringEquals(String, String)
Matches if a string field has the given value.
public static Condition StringEquals(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringEqualsJsonPath(String, String)
Matches if a string field equals to a value at a given mapping path.
public static Condition StringEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringGreaterThan(String, String)
Matches if a string field sorts after a given value.
public static Condition StringGreaterThan(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringGreaterThanEquals(String, String)
Matches if a string field sorts after or equal to a given value.
public static Condition StringGreaterThanEquals(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringGreaterThanEqualsJsonPath(String, String)
Matches if a string field sorts after or equal to value at a given mapping path.
public static Condition StringGreaterThanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringGreaterThanJsonPath(String, String)
Matches if a string field sorts after a value at a given mapping path.
public static Condition StringGreaterThanJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringLessThan(String, String)
Matches if a string field sorts before a given value.
public static Condition StringLessThan(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringLessThanEquals(String, String)
Matches if a string field sorts equal to or before a given value.
public static Condition StringLessThanEquals(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringLessThanEqualsJsonPath(String, String)
Matches if a string field sorts equal to or before a given mapping.
public static Condition StringLessThanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringLessThanJsonPath(String, String)
Matches if a string field sorts before a given value at a particular mapping.
public static Condition StringLessThanJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
StringMatches(String, String)
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: \.
public static Condition StringMatches(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampEquals(String, String)
Matches if a timestamp field is the same time as the given timestamp.
public static Condition TimestampEquals(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampEqualsJsonPath(String, String)
Matches if a timestamp field is the same time as the timestamp at a given mapping path.
public static Condition TimestampEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampGreaterThan(String, String)
Matches if a timestamp field is after the given timestamp.
public static Condition TimestampGreaterThan(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampGreaterThanEquals(String, String)
Matches if a timestamp field is after or equal to the given timestamp.
public static Condition TimestampGreaterThanEquals(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampGreaterThanEqualsJsonPath(String, String)
Matches if a timestamp field is after or equal to the timestamp at a given mapping path.
public static Condition TimestampGreaterThanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampGreaterThanJsonPath(String, String)
Matches if a timestamp field is after the timestamp at a given mapping path.
public static Condition TimestampGreaterThanJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampLessThan(String, String)
Matches if a timestamp field is before the given timestamp.
public static Condition TimestampLessThan(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampLessThanEquals(String, String)
Matches if a timestamp field is before or equal to the given timestamp.
public static Condition TimestampLessThanEquals(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampLessThanEqualsJsonPath(String, String)
Matches if a timestamp field is before or equal to the timestamp at a given mapping path.
public static Condition TimestampLessThanEqualsJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns
TimestampLessThanJsonPath(String, String)
Matches if a timestamp field is before the timestamp at a given mapping path.
public static Condition TimestampLessThanJsonPath(string variable, string value)
Parameters
- variable System.String
- value System.String
Returns