Show / Hide Table of Contents

Class DefinitionBody

Inheritance
object
DefinitionBody
ChainDefinitionBody
FileDefinitionBody
StringDefinitionBody
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class DefinitionBody : DeputyBase
Syntax (vb)
Public MustInherit Class DefinitionBody Inherits DeputyBase
Remarks

ExampleMetadata: infused

Examples
var jsonata = Pass.Jsonata(this, "JSONata");
            var jsonPath = Pass.JsonPath(this, "JSONPath");
            var definition = jsonata.Next(jsonPath);

            new StateMachine(this, "MixedStateMachine", new StateMachineProps {
                // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            new StateMachine(this, "JSONataOnlyStateMachine", new StateMachineProps {
                QueryLanguage = QueryLanguage.JSONATA,
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

Synopsis

Constructors

DefinitionBody()

Methods

Bind(Construct, IPrincipal, IStateMachineProps, StateGraph?)
FromChainable(IChainable)
FromFile(string, IAssetOptions?)
FromString(string)

Constructors

DefinitionBody()

protected DefinitionBody()
Remarks

ExampleMetadata: infused

Examples
var jsonata = Pass.Jsonata(this, "JSONata");
            var jsonPath = Pass.JsonPath(this, "JSONPath");
            var definition = jsonata.Next(jsonPath);

            new StateMachine(this, "MixedStateMachine", new StateMachineProps {
                // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            new StateMachine(this, "JSONataOnlyStateMachine", new StateMachineProps {
                QueryLanguage = QueryLanguage.JSONATA,
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

Methods

Bind(Construct, IPrincipal, IStateMachineProps, StateGraph?)

public abstract IDefinitionConfig Bind(Construct scope, IPrincipal sfnPrincipal, IStateMachineProps sfnProps, StateGraph? graph = null)
Parameters
scope Construct
sfnPrincipal IPrincipal
sfnProps IStateMachineProps
graph StateGraph
Returns

IDefinitionConfig

Remarks

ExampleMetadata: infused

Examples
var jsonata = Pass.Jsonata(this, "JSONata");
            var jsonPath = Pass.JsonPath(this, "JSONPath");
            var definition = jsonata.Next(jsonPath);

            new StateMachine(this, "MixedStateMachine", new StateMachineProps {
                // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            new StateMachine(this, "JSONataOnlyStateMachine", new StateMachineProps {
                QueryLanguage = QueryLanguage.JSONATA,
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

FromChainable(IChainable)

public static DefinitionBody FromChainable(IChainable chainable)
Parameters
chainable IChainable
Returns

DefinitionBody

Remarks

ExampleMetadata: infused

Examples
var jsonata = Pass.Jsonata(this, "JSONata");
            var jsonPath = Pass.JsonPath(this, "JSONPath");
            var definition = jsonata.Next(jsonPath);

            new StateMachine(this, "MixedStateMachine", new StateMachineProps {
                // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            new StateMachine(this, "JSONataOnlyStateMachine", new StateMachineProps {
                QueryLanguage = QueryLanguage.JSONATA,
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

FromFile(string, IAssetOptions?)

public static DefinitionBody FromFile(string path, IAssetOptions? options = null)
Parameters
path string
options IAssetOptions
Returns

DefinitionBody

Remarks

ExampleMetadata: infused

Examples
var jsonata = Pass.Jsonata(this, "JSONata");
            var jsonPath = Pass.JsonPath(this, "JSONPath");
            var definition = jsonata.Next(jsonPath);

            new StateMachine(this, "MixedStateMachine", new StateMachineProps {
                // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            new StateMachine(this, "JSONataOnlyStateMachine", new StateMachineProps {
                QueryLanguage = QueryLanguage.JSONATA,
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

FromString(string)

public static DefinitionBody FromString(string definition)
Parameters
definition string
Returns

DefinitionBody

Remarks

ExampleMetadata: infused

Examples
var jsonata = Pass.Jsonata(this, "JSONata");
            var jsonPath = Pass.JsonPath(this, "JSONPath");
            var definition = jsonata.Next(jsonPath);

            new StateMachine(this, "MixedStateMachine", new StateMachineProps {
                // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });

            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            // This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
            new StateMachine(this, "JSONataOnlyStateMachine", new StateMachineProps {
                QueryLanguage = QueryLanguage.JSONATA,
                DefinitionBody = DefinitionBody.FromChainable(definition)
            });
Back to top Generated by DocFX