Class TaskStateBase
- All Implemented Interfaces:
IChainable
,INextable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
AthenaGetQueryExecution
,AthenaGetQueryResults
,AthenaStartQueryExecution
,AthenaStopQueryExecution
,BatchSubmitJob
,BedrockInvokeModel
,CallApiGatewayHttpApiEndpoint
,CallApiGatewayRestApiEndpoint
,CallAwsService
,CallAwsServiceCrossRegion
,CodeBuildStartBuild
,CodeBuildStartBuildBatch
,DynamoDeleteItem
,DynamoGetItem
,DynamoPutItem
,DynamoUpdateItem
,EcsRunTask
,EksCall
,EmrAddStep
,EmrCancelStep
,EmrContainersCreateVirtualCluster
,EmrContainersDeleteVirtualCluster
,EmrContainersStartJobRun
,EmrCreateCluster
,EmrModifyInstanceFleetByName
,EmrModifyInstanceGroupByName
,EmrSetClusterTerminationProtection
,EmrTerminateCluster
,EvaluateExpression
,EventBridgePutEvents
,GlueDataBrewStartJobRun
,GlueStartCrawlerRun
,GlueStartJobRun
,HttpInvoke
,LambdaInvoke
,MediaConvertCreateJob
,SageMakerCreateEndpoint
,SageMakerCreateEndpointConfig
,SageMakerCreateModel
,SageMakerCreateTrainingJob
,SageMakerCreateTransformJob
,SageMakerUpdateEndpoint
,SnsPublish
,SqsSendMessage
,StepFunctionsInvokeActivity
,StepFunctionsStartExecution
Reaching a Task state causes some work to be executed, represented by the Task's resource property. Task constructs represent a generic Amazon States Language Task.
For some resource types, more specific subclasses of Task may be available which are more convenient to use.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.IChainable
IChainable.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.INextable
INextable.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
TaskStateBase
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TaskStateBase
(software.amazon.jsii.JsiiObjectRef objRef) protected
TaskStateBase
(software.constructs.Construct scope, String id, TaskStateBaseProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddCatch
(IChainable handler) Add a recovery handler for this state.addCatch
(IChainable handler, CatchProps props) Add a recovery handler for this state.addRetry()
Add retry configuration for this state.addRetry
(RetryProps props) Add retry configuration for this state.Continuable states of this Chainable.protected abstract TaskMetricsConfig
protected abstract List<PolicyStatement>
Return the given named metric for this Task.metric
(String metricName, MetricOptions props) Return the given named metric for this Task.Metric for the number of times this activity fails.metricFailed
(MetricOptions props) Metric for the number of times this activity fails.Metric for the number of times the heartbeat times out for this activity.Metric for the number of times the heartbeat times out for this activity.The interval, in milliseconds, between the time the Task starts and the time it closes.metricRunTime
(MetricOptions props) The interval, in milliseconds, between the time the Task starts and the time it closes.Metric for the number of times this activity is scheduled.metricScheduled
(MetricOptions props) Metric for the number of times this activity is scheduled.The interval, in milliseconds, for which the activity stays in the schedule state.metricScheduleTime
(MetricOptions props) The interval, in milliseconds, for which the activity stays in the schedule state.Metric for the number of times this activity is started.metricStarted
(MetricOptions props) Metric for the number of times this activity is started.Metric for the number of times this activity succeeds.metricSucceeded
(MetricOptions props) Metric for the number of times this activity succeeds.The interval, in milliseconds, between the time the activity is scheduled and the time it closes.metricTime
(MetricOptions props) The interval, in milliseconds, between the time the activity is scheduled and the time it closes.Metric for the number of times this activity times out.metricTimedOut
(MetricOptions props) Metric for the number of times this activity times out.next
(IChainable next) Continue normal execution with the given state.com.fasterxml.jackson.databind.node.ObjectNode
Return the Amazon States Language object for this state.protected void
whenBoundToGraph
(StateGraph graph) Called whenever this state is bound to a graph.Methods inherited from class software.amazon.awscdk.services.stepfunctions.State
addBranch, addChoice, addChoice, addItemProcessor, addItemProcessor, addIterator, addPrefix, bindToGraph, filterNextables, findReachableEndStates, findReachableEndStates, findReachableStates, findReachableStates, getBranches, getComment, getDefaultChoice, getId, getInputPath, getIteration, getOutputPath, getParameters, getProcessor, getProcessorConfig, getProcessorMode, getResultPath, getResultSelector, getStartState, getStateId, getStateName, makeDefault, makeNext, prefixStates, renderBranches, renderChoices, renderInputOutput, renderItemProcessor, renderIterator, renderNextEnd, renderResultSelector, renderRetryCatch, setDefaultChoice, setIteration, setProcessor, setProcessorConfig, setProcessorMode, validateState
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TaskStateBase
protected TaskStateBase(software.amazon.jsii.JsiiObjectRef objRef) -
TaskStateBase
protected TaskStateBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TaskStateBase
@Stability(Stable) protected TaskStateBase(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TaskStateBaseProps props) - Parameters:
scope
- This parameter is required.id
- Descriptive identifier for this chainable. This parameter is required.props
- This parameter is required.
-
-
Method Details
-
addCatch
@Stability(Stable) @NotNull public TaskStateBase addCatch(@NotNull IChainable handler, @Nullable CatchProps props) Add a recovery handler for this state.When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.
- Parameters:
handler
- This parameter is required.props
-
-
addCatch
Add a recovery handler for this state.When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.
- Parameters:
handler
- This parameter is required.
-
addRetry
Add retry configuration for this state.This controls if and how the execution will be retried if a particular error occurs.
- Parameters:
props
-
-
addRetry
Add retry configuration for this state.This controls if and how the execution will be retried if a particular error occurs.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Task.Default: - sum over 5 minutes
- Parameters:
metricName
- This parameter is required.props
-
-
metric
Return the given named metric for this Task.Default: - sum over 5 minutes
- Parameters:
metricName
- This parameter is required.
-
metricFailed
Metric for the number of times this activity fails.Default: - sum over 5 minutes
- Parameters:
props
-
-
metricFailed
Metric for the number of times this activity fails.Default: - sum over 5 minutes
-
metricHeartbeatTimedOut
Metric for the number of times the heartbeat times out for this activity.Default: - sum over 5 minutes
- Parameters:
props
-
-
metricHeartbeatTimedOut
Metric for the number of times the heartbeat times out for this activity.Default: - sum over 5 minutes
-
metricRunTime
The interval, in milliseconds, between the time the Task starts and the time it closes.Default: - average over 5 minutes
- Parameters:
props
-
-
metricRunTime
The interval, in milliseconds, between the time the Task starts and the time it closes.Default: - average over 5 minutes
-
metricScheduled
Metric for the number of times this activity is scheduled.Default: - sum over 5 minutes
- Parameters:
props
-
-
metricScheduled
Metric for the number of times this activity is scheduled.Default: - sum over 5 minutes
-
metricScheduleTime
The interval, in milliseconds, for which the activity stays in the schedule state.Default: - average over 5 minutes
- Parameters:
props
-
-
metricScheduleTime
The interval, in milliseconds, for which the activity stays in the schedule state.Default: - average over 5 minutes
-
metricStarted
Metric for the number of times this activity is started.Default: - sum over 5 minutes
- Parameters:
props
-
-
metricStarted
Metric for the number of times this activity is started.Default: - sum over 5 minutes
-
metricSucceeded
Metric for the number of times this activity succeeds.Default: - sum over 5 minutes
- Parameters:
props
-
-
metricSucceeded
Metric for the number of times this activity succeeds.Default: - sum over 5 minutes
-
metricTime
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.Default: - average over 5 minutes
- Parameters:
props
-
-
metricTime
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.Default: - average over 5 minutes
-
metricTimedOut
Metric for the number of times this activity times out.Default: - sum over 5 minutes
- Parameters:
props
-
-
metricTimedOut
Metric for the number of times this activity times out.Default: - sum over 5 minutes
-
next
Continue normal execution with the given state. -
toStateJson
@Stability(Stable) @NotNull public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()Return the Amazon States Language object for this state.- Specified by:
toStateJson
in classState
-
whenBoundToGraph
Called whenever this state is bound to a graph.Can be overridden by subclasses.
- Overrides:
whenBoundToGraph
in classState
- Parameters:
graph
- This parameter is required.
-
getEndStates
Continuable states of this Chainable.- Specified by:
getEndStates
in interfaceIChainable
- Specified by:
getEndStates
in classState
-
getTaskMetrics
-
getTaskPolicies
-