Class Task
(deprecated) Define a Task state in the state machine.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.AWS.StepFunctions.dll
Syntax (csharp)
public class Task : State, IConstruct, IDependable, IChainable, INextable
Syntax (vb)
Public Class Task
Inherits State
Implements IConstruct, IDependable, 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.
Stability: Deprecated
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;
using Amazon.CDK;
var parameters;
IStepFunctionsTask stepFunctionsTask;
var task = new Task(this, "MyTask", new TaskProps {
Task = stepFunctionsTask,
// the properties below are optional
Comment = "comment",
InputPath = "inputPath",
OutputPath = "outputPath",
Parameters = new Dictionary<string, object> {
{ "parametersKey", parameters }
},
ResultPath = "resultPath",
Timeout = Duration.Minutes(30)
});
Synopsis
Constructors
Task(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Task(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Task(Construct, String, ITaskProps) |
Properties
EndStates | (deprecated) Continuable states of this Chainable. |
Methods
AddCatch(IChainable, ICatchProps) | (deprecated) Add a recovery handler for this state. |
AddRetry(IRetryProps) | (deprecated) Add retry configuration for this state. |
Metric(String, IMetricOptions) | (deprecated) Return the given named metric for this Task. |
MetricFailed(IMetricOptions) | (deprecated) Metric for the number of times this activity fails. |
MetricHeartbeatTimedOut(IMetricOptions) | (deprecated) Metric for the number of times the heartbeat times out for this activity. |
MetricRunTime(IMetricOptions) | (deprecated) The interval, in milliseconds, between the time the Task starts and the time it closes. |
MetricScheduled(IMetricOptions) | (deprecated) Metric for the number of times this activity is scheduled. |
MetricScheduleTime(IMetricOptions) | (deprecated) The interval, in milliseconds, for which the activity stays in the schedule state. |
MetricStarted(IMetricOptions) | (deprecated) Metric for the number of times this activity is started. |
MetricSucceeded(IMetricOptions) | (deprecated) Metric for the number of times this activity succeeds. |
MetricTime(IMetricOptions) | (deprecated) The interval, in milliseconds, between the time the activity is scheduled and the time it closes. |
MetricTimedOut(IMetricOptions) | (deprecated) Metric for the number of times this activity times out. |
Next(IChainable) | (deprecated) Continue normal execution with the given state. |
ToStateJson() | (deprecated) Return the Amazon States Language object for this state. |
WhenBoundToGraph(StateGraph) | (deprecated) Called whenever this state is bound to a graph. |
Constructors
Task(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Task(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Task(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Task(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Task(Construct, String, ITaskProps)
public Task(Construct scope, string id, ITaskProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ITaskProps
Remarks
Stability: Deprecated
Properties
EndStates
(deprecated) Continuable states of this Chainable.
public override INextable[] EndStates { get; }
Property Value
Overrides
Remarks
Stability: Deprecated
Methods
AddCatch(IChainable, ICatchProps)
(deprecated) Add a recovery handler for this state.
public virtual Task 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.
Stability: Deprecated
AddRetry(IRetryProps)
(deprecated) Add retry configuration for this state.
public virtual Task AddRetry(IRetryProps props = null)
Parameters
- props IRetryProps
Returns
Remarks
This controls if and how the execution will be retried if a particular error occurs.
Stability: Deprecated
Metric(String, IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricFailed(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricHeartbeatTimedOut(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricRunTime(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricScheduled(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricScheduleTime(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricStarted(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricSucceeded(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricTime(IMetricOptions)
(deprecated) 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
Stability: Deprecated
MetricTimedOut(IMetricOptions)
(deprecated) 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
Stability: Deprecated
Next(IChainable)
(deprecated) Continue normal execution with the given state.
public virtual Chain Next(IChainable next)
Parameters
- next IChainable
Returns
Remarks
Stability: Deprecated
ToStateJson()
(deprecated) Return the Amazon States Language object for this state.
public override JObject ToStateJson()
Returns
Newtonsoft.Json.Linq.JObject
Overrides
Remarks
Stability: Deprecated
WhenBoundToGraph(StateGraph)
(deprecated) 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.
Stability: Deprecated