Class Task
- All Implemented Interfaces:
IConstruct
,IDependable
,IChainable
,INextable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
- replaced by service integration specific classes (i.e. LambdaInvoke, SnsPublish)
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.stepfunctions.*; import software.amazon.awscdk.core.*; Object parameters; IStepFunctionsTask stepFunctionsTask; Task task = Task.Builder.create(this, "MyTask") .task(stepFunctionsTask) // the properties below are optional .comment("comment") .inputPath("inputPath") .outputPath("outputPath") .parameters(Map.of( "parametersKey", parameters)) .resultPath("resultPath") .timeout(Duration.minutes(30)) .build();
-
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.amazon.awscdk.core.IConstruct
IConstruct.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, INextable.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCatch
(IChainable handler) Deprecated.addCatch
(IChainable handler, CatchProps props) Deprecated.addRetry()
Deprecated.addRetry
(RetryProps props) Deprecated.Deprecated.Deprecated.metric
(String metricName, MetricOptions props) Deprecated.Deprecated.metricFailed
(MetricOptions props) Deprecated.Deprecated.Deprecated.Deprecated.metricRunTime
(MetricOptions props) Deprecated.Deprecated.metricScheduled
(MetricOptions props) Deprecated.Deprecated.metricScheduleTime
(MetricOptions props) Deprecated.Deprecated.metricStarted
(MetricOptions props) Deprecated.Deprecated.metricSucceeded
(MetricOptions props) Deprecated.Deprecated.metricTime
(MetricOptions props) Deprecated.Deprecated.metricTimedOut
(MetricOptions props) Deprecated.next
(IChainable next) Deprecated.com.fasterxml.jackson.databind.node.ObjectNode
Deprecated.protected void
whenBoundToGraph
(StateGraph graph) Deprecated.Methods inherited from class software.amazon.awscdk.services.stepfunctions.State
addBranch, addChoice, addIterator, addPrefix, bindToGraph, filterNextables, findReachableEndStates, findReachableEndStates, findReachableStates, findReachableStates, getBranches, getComment, getDefaultChoice, getId, getInputPath, getIteration, getOutputPath, getParameters, getResultPath, getResultSelector, getStartState, getStateId, makeDefault, makeNext, prefixStates, renderBranches, renderChoices, renderInputOutput, renderIterator, renderNextEnd, renderResultSelector, renderRetryCatch, setDefaultChoice, setIteration
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
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
-
Task
protected Task(software.amazon.jsii.JsiiObjectRef objRef) Deprecated. -
Task
protected Task(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) Deprecated. -
Task
@Stability(Deprecated) @Deprecated public Task(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TaskProps props) Deprecated.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
addCatch
@Stability(Deprecated) @Deprecated @NotNull public Task addCatch(@NotNull IChainable handler, @Nullable CatchProps props) Deprecated.(deprecated) 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
Deprecated.(deprecated) 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
Deprecated.(deprecated) Add retry configuration for this state.This controls if and how the execution will be retried if a particular error occurs.
- Parameters:
props
-
-
addRetry
Deprecated.(deprecated) Add retry configuration for this state.This controls if and how the execution will be retried if a particular error occurs.
-
metric
@Stability(Deprecated) @Deprecated @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Deprecated.(deprecated) Return the given named metric for this Task.Default: sum over 5 minutes
- Parameters:
metricName
- This parameter is required.props
-
-
metric
Deprecated.(deprecated) Return the given named metric for this Task.Default: sum over 5 minutes
- Parameters:
metricName
- This parameter is required.
-
metricFailed
@Stability(Deprecated) @Deprecated @NotNull public Metric metricFailed(@Nullable MetricOptions props) Deprecated.(deprecated) Metric for the number of times this activity fails.Default: sum over 5 minutes
- Parameters:
props
-
-
metricFailed
Deprecated.(deprecated) Metric for the number of times this activity fails.Default: sum over 5 minutes
-
metricHeartbeatTimedOut
@Stability(Deprecated) @Deprecated @NotNull public Metric metricHeartbeatTimedOut(@Nullable MetricOptions props) Deprecated.(deprecated) Metric for the number of times the heartbeat times out for this activity.Default: sum over 5 minutes
- Parameters:
props
-
-
metricHeartbeatTimedOut
Deprecated.(deprecated) Metric for the number of times the heartbeat times out for this activity.Default: sum over 5 minutes
-
metricRunTime
@Stability(Deprecated) @Deprecated @NotNull public Metric metricRunTime(@Nullable MetricOptions props) Deprecated.(deprecated) The interval, in milliseconds, between the time the Task starts and the time it closes.Default: average over 5 minutes
- Parameters:
props
-
-
metricRunTime
Deprecated.(deprecated) The interval, in milliseconds, between the time the Task starts and the time it closes.Default: average over 5 minutes
-
metricScheduled
@Stability(Deprecated) @Deprecated @NotNull public Metric metricScheduled(@Nullable MetricOptions props) Deprecated.(deprecated) Metric for the number of times this activity is scheduled.Default: sum over 5 minutes
- Parameters:
props
-
-
metricScheduled
Deprecated.(deprecated) Metric for the number of times this activity is scheduled.Default: sum over 5 minutes
-
metricScheduleTime
@Stability(Deprecated) @Deprecated @NotNull public Metric metricScheduleTime(@Nullable MetricOptions props) Deprecated.(deprecated) The interval, in milliseconds, for which the activity stays in the schedule state.Default: average over 5 minutes
- Parameters:
props
-
-
metricScheduleTime
Deprecated.(deprecated) The interval, in milliseconds, for which the activity stays in the schedule state.Default: average over 5 minutes
-
metricStarted
@Stability(Deprecated) @Deprecated @NotNull public Metric metricStarted(@Nullable MetricOptions props) Deprecated.(deprecated) Metric for the number of times this activity is started.Default: sum over 5 minutes
- Parameters:
props
-
-
metricStarted
Deprecated.(deprecated) Metric for the number of times this activity is started.Default: sum over 5 minutes
-
metricSucceeded
@Stability(Deprecated) @Deprecated @NotNull public Metric metricSucceeded(@Nullable MetricOptions props) Deprecated.(deprecated) Metric for the number of times this activity succeeds.Default: sum over 5 minutes
- Parameters:
props
-
-
metricSucceeded
Deprecated.(deprecated) Metric for the number of times this activity succeeds.Default: sum over 5 minutes
-
metricTime
Deprecated.(deprecated) The interval, in milliseconds, between the time the activity is scheduled and the time it closes.Default: average over 5 minutes
- Parameters:
props
-
-
metricTime
Deprecated.(deprecated) The interval, in milliseconds, between the time the activity is scheduled and the time it closes.Default: average over 5 minutes
-
metricTimedOut
@Stability(Deprecated) @Deprecated @NotNull public Metric metricTimedOut(@Nullable MetricOptions props) Deprecated.(deprecated) Metric for the number of times this activity times out.Default: sum over 5 minutes
- Parameters:
props
-
-
metricTimedOut
Deprecated.(deprecated) Metric for the number of times this activity times out.Default: sum over 5 minutes
-
next
Deprecated.(deprecated) Continue normal execution with the given state. -
toStateJson
@Stability(Deprecated) @Deprecated @NotNull public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()Deprecated.(deprecated) Return the Amazon States Language object for this state.- Specified by:
toStateJson
in classState
-
whenBoundToGraph
Deprecated.(deprecated) 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
Deprecated.(deprecated) Continuable states of this Chainable.- Specified by:
getEndStates
in interfaceIChainable
- Specified by:
getEndStates
in classState
-