Show / Hide Table of Contents

Class CustomState

State defined by supplying Amazon States Language (ASL) in the state machine.

Inheritance
System.Object
Construct
State
CustomState
Implements
IConstruct
Constructs.IConstruct
IDependable
IChainable
INextable
Inherited Members
State.FilterNextables(State[])
State.FindReachableEndStates(State, IFindStateOptions)
State.FindReachableStates(State, IFindStateOptions)
State.PrefixStates(IConstruct, String)
State.AddBranch(StateGraph)
State.AddChoice(Condition, State)
State.AddIterator(StateGraph)
State.AddPrefix(String)
State.BindToGraph(StateGraph)
State.MakeDefault(State)
State.MakeNext(State)
State.RenderBranches()
State.RenderChoices()
State.RenderInputOutput()
State.RenderIterator()
State.RenderNextEnd()
State.RenderResultSelector()
State.RenderRetryCatch()
State.WhenBoundToGraph(StateGraph)
State.Branches
State.Id
State.StartState
State.StateId
State.Comment
State.InputPath
State.OutputPath
State.Parameters
State.ResultPath
State.ResultSelector
State.DefaultChoice
State.Iteration
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.AWS.StepFunctions.dll
Syntax (csharp)
public class CustomState : State, IConstruct, IDependable, IChainable, INextable
Syntax (vb)
Public Class CustomState
    Inherits State
    Implements IConstruct, IDependable, IChainable, INextable
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.DynamoDB;


// create a table
var table = new Table(this, "montable", new TableProps {
    PartitionKey = new Attribute {
        Name = "id",
        Type = AttributeType.STRING
    }
});

var finalStatus = new Pass(this, "final step");

// States language JSON to put an item into DynamoDB
// snippet generated from https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-code-snippet.html#tutorial-code-snippet-1
IDictionary<string, object> stateJson = new Dictionary<string, object> {
    { "Type", "Task" },
    { "Resource", "arn:aws:states:::dynamodb:putItem" },
    { "Parameters", new Dictionary<string, object> {
        { "TableName", table.TableName },
        { "Item", new Dictionary<string, IDictionary<string, string>> {
            { "id", new Dictionary<string, string> {
                { "S", "MyEntry" }
            } }
        } }
    } },
    { "ResultPath", null }
};

// custom state which represents a task to insert data into DynamoDB
var custom = new CustomState(this, "my custom task", new CustomStateProps {
    StateJson = stateJson
});

var chain = Chain.Start(custom).Next(finalStatus);

var sm = new StateMachine(this, "StateMachine", new StateMachineProps {
    Definition = chain,
    Timeout = Duration.Seconds(30)
});

// don't forget permissions. You need to assign them
table.GrantWriteData(sm);

Synopsis

Constructors

CustomState(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CustomState(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

CustomState(Construct, String, ICustomStateProps)

Properties

EndStates

Continuable states of this Chainable.

Methods

Next(IChainable)

Continue normal execution with the given state.

ToStateJson()

Returns the Amazon States Language object for this state.

Constructors

CustomState(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CustomState(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CustomState(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CustomState(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

CustomState(Construct, String, ICustomStateProps)

public CustomState(Construct scope, string id, ICustomStateProps props)
Parameters
scope Constructs.Construct
id System.String
props ICustomStateProps

Properties

EndStates

Continuable states of this Chainable.

public override INextable[] EndStates { get; }
Property Value

INextable[]

Overrides
State.EndStates

Methods

Next(IChainable)

Continue normal execution with the given state.

public virtual Chain Next(IChainable next)
Parameters
next IChainable
Returns

Chain

ToStateJson()

Returns the Amazon States Language object for this state.

public override JObject ToStateJson()
Returns

Newtonsoft.Json.Linq.JObject

Overrides
State.ToStateJson()

Implements

IConstruct
Constructs.IConstruct
IDependable
IChainable
INextable
Back to top Generated by DocFX
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy