WaitProps
- class aws_cdk.aws_stepfunctions.WaitProps(*, time, comment=None, state_name=None)
Bases:
object
Properties for defining a Wait state.
- Parameters:
time (
WaitTime
) – Wait duration.comment (
Optional
[str
]) – An optional description for this state. Default: No commentstate_name (
Optional
[str
]) – Optional name for this state. Default: - The construct ID will be used as state name
- ExampleMetadata:
infused
Example:
convert_to_seconds = tasks.EvaluateExpression(self, "Convert to seconds", expression="$.waitMilliseconds / 1000", result_path="$.waitSeconds" ) create_message = tasks.EvaluateExpression(self, "Create message", # Note: this is a string inside a string. expression="`Now waiting ${$.waitSeconds} seconds...`", runtime=lambda_.Runtime.NODEJS_LATEST, result_path="$.message" ) publish_message = tasks.SnsPublish(self, "Publish message", topic=sns.Topic(self, "cool-topic"), message=sfn.TaskInput.from_json_path_at("$.message"), result_path="$.sns" ) wait = sfn.Wait(self, "Wait", time=sfn.WaitTime.seconds_path("$.waitSeconds") ) sfn.StateMachine(self, "StateMachine", definition=convert_to_seconds.next(create_message).next(publish_message).next(wait) )
Attributes
- comment
An optional description for this state.
- Default:
No comment
- state_name
Optional name for this state.
- Default:
The construct ID will be used as state name
- time
Wait duration.