Class EvaluateExpression
A Step Functions Task to evaluate an expression.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EvaluateExpression : TaskStateBase, IChainable, INextable
Syntax (vb)
Public Class EvaluateExpression
Inherits TaskStateBase
Implements IChainable, INextable
Remarks
OUTPUT: the output of this task is the evaluated expression.
ExampleMetadata: infused
Examples
var convertToSeconds = new EvaluateExpression(this, "Convert to seconds", new EvaluateExpressionProps {
Expression = "$.waitMilliseconds / 1000",
ResultPath = "$.waitSeconds"
});
var createMessage = new EvaluateExpression(this, "Create message", new EvaluateExpressionProps {
// Note: this is a string inside a string.
Expression = "`Now waiting ${$.waitSeconds} seconds...`",
Runtime = Runtime.NODEJS_LATEST,
ResultPath = "$.message"
});
var publishMessage = new SnsPublish(this, "Publish message", new SnsPublishProps {
Topic = new Topic(this, "cool-topic"),
Message = TaskInput.FromJsonPathAt("$.message"),
ResultPath = "$.sns"
});
var wait = new Wait(this, "Wait", new WaitProps {
Time = WaitTime.SecondsPath("$.waitSeconds")
});
new StateMachine(this, "StateMachine", new StateMachineProps {
Definition = convertToSeconds.Next(createMessage).Next(publishMessage).Next(wait)
});
Synopsis
Constructors
EvaluateExpression(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
EvaluateExpression(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
EvaluateExpression(Construct, String, IEvaluateExpressionProps) |
Properties
TaskMetrics | |
TaskPolicies |
Constructors
EvaluateExpression(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EvaluateExpression(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
EvaluateExpression(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EvaluateExpression(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
EvaluateExpression(Construct, String, IEvaluateExpressionProps)
public EvaluateExpression(Construct scope, string id, IEvaluateExpressionProps props)
Parameters
- scope Constructs.Construct
- id System.String
Descriptive identifier for this chainable.
- props IEvaluateExpressionProps
Properties
TaskMetrics
protected override ITaskMetricsConfig TaskMetrics { get; }
Property Value
Overrides
TaskPolicies
protected override PolicyStatement[] TaskPolicies { get; }
Property Value