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(Construct, string, ITaskStateBaseProps) | Define a Task state in the state machine. |
Properties
| EndStates | Continuable states of this Chainable. |
| TaskMetrics | Define a Task state in the state machine. |
| TaskPolicies | Define a Task state in the state machine. |
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. |
| MetricScheduleTime(IMetricOptions?) | The interval, in milliseconds, for which the activity stays in the schedule state. |
| MetricScheduled(IMetricOptions?) | Metric for the number of times this activity is scheduled. |
| 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(QueryLanguage?) | Return the Amazon States Language object for this state. |
| WhenBoundToGraph(StateGraph) | Called whenever this state is bound to a graph. |
Constructors
TaskStateBase(Construct, string, ITaskStateBaseProps)
Define a Task state in the state machine.
protected TaskStateBase(Construct scope, string id, ITaskStateBaseProps props)
Parameters
- scope Construct
- id string
Descriptive identifier for this chainable.
- props ITaskStateBaseProps
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.
Properties
EndStates
Continuable states of this Chainable.
public override INextable[] EndStates { get; }
Property Value
Overrides
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.
TaskMetrics
Define a Task state in the state machine.
protected abstract ITaskMetricsConfig? TaskMetrics { get; }
Property Value
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.
TaskPolicies
Define a Task state in the state machine.
protected abstract PolicyStatement[]? TaskPolicies { get; }
Property Value
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.
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 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
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
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
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
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.
ToStateJson(QueryLanguage?)
Return the Amazon States Language object for this state.
public override JObject ToStateJson(QueryLanguage? topLevelQueryLanguage = null)
Parameters
- topLevelQueryLanguage QueryLanguage?
Returns
JObject
Overrides
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.
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.