PassProps Struct
Properties for defining a Pass state.
| Source | aws-stepfunctions/lib/states/pass.ts |
|---|---|
| Type last changed |
Example
// JSONata Pattern
sfn.Pass.jsonata(this, 'JSONata Pattern', {
outputs: { foo: 'bar' },
// The outputPath does not exist in the props type
// outputPath: '$.status',
});
// JSONPath Pattern
sfn.Pass.jsonPath(this, 'JSONPath Pattern', {
// The outputs does not exist in the props type
// outputs: { foo: 'bar' },
outputPath: '$.status',
});
// Constructor (Legacy) Pattern
new sfn.Pass(this, 'Constructor Pattern', {
queryLanguage: sfn.QueryLanguage.JSONATA, // or JSON_PATH
// Both outputs and outputPath exist as prop types.
outputs: { foo: 'bar' }, // For JSONata
// or
outputPath: '$.status', // For JSONPath
});
# JSONata Pattern
sfn.Pass.jsonata(self, "JSONata Pattern",
outputs={"foo": "bar"}
)
# JSONPath Pattern
sfn.Pass.json_path(self, "JSONPath Pattern",
# The outputs does not exist in the props type
# outputs: { foo: 'bar' },
output_path="$.status"
)
# Constructor (Legacy) Pattern
sfn.Pass(self, "Constructor Pattern",
query_language=sfn.QueryLanguage.JSONATA, # or JSON_PATH
# Both outputs and outputPath exist as prop types.
outputs={"foo": "bar"}, # For JSONata
# or
output_path="$.status"
)
// JSONata Pattern
Pass.jsonata(this, "JSONata Pattern", PassJsonataProps.builder()
.outputs(Map.of("foo", "bar"))
.build());
// JSONPath Pattern
Pass.jsonPath(this, "JSONPath Pattern", PassJsonPathProps.builder()
// The outputs does not exist in the props type
// outputs: { foo: 'bar' },
.outputPath("$.status")
.build());
// Constructor (Legacy) Pattern
// Constructor (Legacy) Pattern
Pass.Builder.create(this, "Constructor Pattern")
.queryLanguage(QueryLanguage.JSONATA) // or JSON_PATH
// Both outputs and outputPath exist as prop types.
.outputs(Map.of("foo", "bar")) // For JSONata
// or
.outputPath("$.status")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// JSONata Pattern
Pass.Jsonata(this, "JSONata Pattern", new PassJsonataProps {
Outputs = new Dictionary<string, string> { { "foo", "bar" } }
});
// JSONPath Pattern
Pass.JsonPath(this, "JSONPath Pattern", new PassJsonPathProps {
// The outputs does not exist in the props type
// outputs: { foo: 'bar' },
OutputPath = "$.status"
});
// Constructor (Legacy) Pattern
// Constructor (Legacy) Pattern
new Pass(this, "Constructor Pattern", new PassProps {
QueryLanguage = QueryLanguage.JSONATA, // or JSON_PATH
// Both outputs and outputPath exist as prop types.
Outputs = new Dictionary<string, string> { { "foo", "bar" } }, // For JSONata
// or
OutputPath = "$.status"
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// JSONata Pattern
sfn.Pass_Jsonata(this, jsii.String("JSONata Pattern"), &PassJsonataProps{
Outputs: map[string]*string{
"foo": jsii.String("bar"),
},
})
// JSONPath Pattern
sfn.Pass_JsonPath(this, jsii.String("JSONPath Pattern"), &PassJsonPathProps{
// The outputs does not exist in the props type
// outputs: { foo: 'bar' },
OutputPath: jsii.String("$.status"),
})
// Constructor (Legacy) Pattern
// Constructor (Legacy) Pattern
sfn.NewPass(this, jsii.String("Constructor Pattern"), &PassProps{
QueryLanguage: sfn.QueryLanguage_JSONATA,
// or JSON_PATH
// Both outputs and outputPath exist as prop types.
Outputs: map[string]*string{
"foo": jsii.String("bar"),
},
// For JSONata
// or
OutputPath: jsii.String("$.status"),
})
Properties
assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{} #Default: Not assign variables
Using workflow variables, you can store data in a step and retrieve that data in future steps.
commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string #Default: No comment
inputPathoptionalstringinput_pathoptionalstrinputPathoptionalStringInputPathoptionalstringInputPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
outputPathoptionalstringoutput_pathoptionalstroutputPathoptionalStringOutputPathoptionalstringOutputPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{} #Default: $states.result or $states.errorOutput
notes
When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.
parametersoptional{ [key: string]: any }parametersoptionaltyping.Mapping[str, Any]parametersoptionalMap<String, Object>ParametersoptionalIDictionary<string, object>Parametersoptional*map[string]interface{} #Default: No parameters
queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage = JSONPath #If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.
resultoptionalResultresultoptionalResultresultoptionalResultResultoptionalResultResultoptionalResult #Default: No injected result
Can be used to inject or replace the current execution state.
resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string #Default: The construct ID will be used as state name