Class TaskStateBase
Define a Task state in the state machine.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class TaskStateBase : State, IChainable, INextable
Syntax (vb)
Public MustInherit Class TaskStateBase
Inherits State
Implements IChainable, INextable
Remarks
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.
Synopsis
Constructors
TaskStateBase(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
TaskStateBase(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
TaskStateBase(Construct, String, ITaskStateBaseProps) |
Properties
EndStates | Continuable states of this Chainable. |
TaskMetrics | |
TaskPolicies |
Methods
AddCatch(IChainable, ICatchProps) | Add a recovery handler for this state. |
AddRetry(IRetryProps) | Add retry configuration for this state. |
Metric(String, IMetricOptions) | Return the given named metric for this Task. |
MetricFailed(IMetricOptions) | Metric for the number of times this activity fails. |
MetricHeartbeatTimedOut(IMetricOptions) | Metric for the number of times the heartbeat times out for this activity. |
MetricRunTime(IMetricOptions) | The interval, in milliseconds, between the time the Task starts and the time it closes. |
MetricScheduled(IMetricOptions) | Metric for the number of times this activity is scheduled. |
MetricScheduleTime(IMetricOptions) | The interval, in milliseconds, for which the activity stays in the schedule state. |
MetricStarted(IMetricOptions) | Metric for the number of times this activity is started. |
MetricSucceeded(IMetricOptions) | Metric for the number of times this activity succeeds. |
MetricTime(IMetricOptions) | The interval, in milliseconds, between the time the activity is scheduled and the time it closes. |
MetricTimedOut(IMetricOptions) | Metric for the number of times this activity times out. |
Next(IChainable) | Continue normal execution with the given state. |
ToStateJson() | Return the Amazon States Language object for this state. |
WhenBoundToGraph(StateGraph) | Called whenever this state is bound to a graph. |
Constructors
TaskStateBase(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected TaskStateBase(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
TaskStateBase(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected TaskStateBase(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
TaskStateBase(Construct, String, ITaskStateBaseProps)
protected TaskStateBase(Construct scope, string id, ITaskStateBaseProps props)
Parameters
- scope Constructs.Construct
- id System.String
Descriptive identifier for this chainable.
- props ITaskStateBaseProps
Properties
EndStates
Continuable states of this Chainable.
public override INextable[] EndStates { get; }
Property Value
Overrides
TaskMetrics
TaskPolicies
Methods
AddCatch(IChainable, ICatchProps)
Add a recovery handler for this state.
public virtual TaskStateBase AddCatch(IChainable handler, ICatchProps props = null)
Parameters
- handler IChainable
- props ICatchProps
Returns
Remarks
When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.
AddRetry(IRetryProps)
Add retry configuration for this state.
public virtual TaskStateBase AddRetry(IRetryProps props = null)
Parameters
- props IRetryProps
Returns
Remarks
This controls if and how the execution will be retried if a particular error occurs.
Metric(String, IMetricOptions)
Return the given named metric for this Task.
public virtual Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricFailed(IMetricOptions)
Metric for the number of times this activity fails.
public virtual Metric MetricFailed(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricHeartbeatTimedOut(IMetricOptions)
Metric for the number of times the heartbeat times out for this activity.
public virtual Metric MetricHeartbeatTimedOut(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricRunTime(IMetricOptions)
The interval, in milliseconds, between the time the Task starts and the time it closes.
public virtual Metric MetricRunTime(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - average over 5 minutes
MetricScheduled(IMetricOptions)
Metric for the number of times this activity is scheduled.
public virtual Metric MetricScheduled(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricScheduleTime(IMetricOptions)
The interval, in milliseconds, for which the activity stays in the schedule state.
public virtual Metric MetricScheduleTime(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - average over 5 minutes
MetricStarted(IMetricOptions)
Metric for the number of times this activity is started.
public virtual Metric MetricStarted(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricSucceeded(IMetricOptions)
Metric for the number of times this activity succeeds.
public virtual Metric MetricSucceeded(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricTime(IMetricOptions)
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
public virtual Metric MetricTime(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - average over 5 minutes
MetricTimedOut(IMetricOptions)
Metric for the number of times this activity times out.
public virtual Metric MetricTimedOut(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
Next(IChainable)
Continue normal execution with the given state.
public virtual Chain Next(IChainable next)
Parameters
- next IChainable
Returns
ToStateJson()
Return the Amazon States Language object for this state.
public override JObject ToStateJson()
Returns
Newtonsoft.Json.Linq.JObject
Overrides
WhenBoundToGraph(StateGraph)
Called whenever this state is bound to a graph.
protected override void WhenBoundToGraph(StateGraph graph)
Parameters
- graph StateGraph
Overrides
Remarks
Can be overridden by subclasses.