Skip to content
v2.276.0

MapJsonPathProps Struct ​

Properties for defining a Map state that using JSONPath.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const assign: any;
declare const itemSelector: any;
declare const parameters: any;
declare const resultSelector: any;
const mapJsonPathProps: stepfunctions.MapJsonPathProps = {
  assign: {
    assignKey: assign,
  },
  comment: 'comment',
  inputPath: 'inputPath',
  itemSelector: {
    itemSelectorKey: itemSelector,
  },
  itemsPath: 'itemsPath',
  jsonataItemSelector: 'jsonataItemSelector',
  jsonataMaxConcurrency: 'jsonataMaxConcurrency',
  maxConcurrency: 123,
  maxConcurrencyPath: 'maxConcurrencyPath',
  outputPath: 'outputPath',
  parameters: {
    parametersKey: parameters,
  },
  queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
  resultPath: 'resultPath',
  resultSelector: {
    resultSelectorKey: resultSelector,
  },
  stateName: 'stateName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions as stepfunctions

# assign: Any
# item_selector: Any
# parameters: Any
# result_selector: Any

map_json_path_props = stepfunctions.MapJsonPathProps(
    assign={
        "assign_key": assign
    },
    comment="comment",
    input_path="inputPath",
    item_selector={
        "item_selector_key": item_selector
    },
    items_path="itemsPath",
    jsonata_item_selector="jsonataItemSelector",
    jsonata_max_concurrency="jsonataMaxConcurrency",
    max_concurrency=123,
    max_concurrency_path="maxConcurrencyPath",
    output_path="outputPath",
    parameters={
        "parameters_key": parameters
    },
    query_language=stepfunctions.QueryLanguage.JSON_PATH,
    result_path="resultPath",
    result_selector={
        "result_selector_key": result_selector
    },
    state_name="stateName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.*;

Object assign;
Object itemSelector;
Object parameters;
Object resultSelector;

MapJsonPathProps mapJsonPathProps = MapJsonPathProps.builder()
        .assign(Map.of(
                "assignKey", assign))
        .comment("comment")
        .inputPath("inputPath")
        .itemSelector(Map.of(
                "itemSelectorKey", itemSelector))
        .itemsPath("itemsPath")
        .jsonataItemSelector("jsonataItemSelector")
        .jsonataMaxConcurrency("jsonataMaxConcurrency")
        .maxConcurrency(123)
        .maxConcurrencyPath("maxConcurrencyPath")
        .outputPath("outputPath")
        .parameters(Map.of(
                "parametersKey", parameters))
        .queryLanguage(QueryLanguage.JSON_PATH)
        .resultPath("resultPath")
        .resultSelector(Map.of(
                "resultSelectorKey", resultSelector))
        .stateName("stateName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;

var assign;
var itemSelector;
var parameters;
var resultSelector;

var mapJsonPathProps = new MapJsonPathProps {
    Assign = new Dictionary<string, object> {
        { "assignKey", assign }
    },
    Comment = "comment",
    InputPath = "inputPath",
    ItemSelector = new Dictionary<string, object> {
        { "itemSelectorKey", itemSelector }
    },
    ItemsPath = "itemsPath",
    JsonataItemSelector = "jsonataItemSelector",
    JsonataMaxConcurrency = "jsonataMaxConcurrency",
    MaxConcurrency = 123,
    MaxConcurrencyPath = "maxConcurrencyPath",
    OutputPath = "outputPath",
    Parameters = new Dictionary<string, object> {
        { "parametersKey", parameters }
    },
    QueryLanguage = QueryLanguage.JSON_PATH,
    ResultPath = "resultPath",
    ResultSelector = new Dictionary<string, object> {
        { "resultSelectorKey", resultSelector }
    },
    StateName = "stateName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var assign interface{}
var itemSelector interface{}
var parameters interface{}
var resultSelector interface{}

mapJsonPathProps := &MapJsonPathProps{
	Assign: map[string]interface{}{
		"assignKey": assign,
	},
	Comment: jsii.String("comment"),
	InputPath: jsii.String("inputPath"),
	ItemSelector: map[string]interface{}{
		"itemSelectorKey": itemSelector,
	},
	ItemsPath: jsii.String("itemsPath"),
	JsonataItemSelector: jsii.String("jsonataItemSelector"),
	JsonataMaxConcurrency: jsii.String("jsonataMaxConcurrency"),
	MaxConcurrency: jsii.Number(123),
	MaxConcurrencyPath: jsii.String("maxConcurrencyPath"),
	OutputPath: jsii.String("outputPath"),
	Parameters: map[string]interface{}{
		"parametersKey": parameters,
	},
	QueryLanguage: awscdk.Aws_stepfunctions.QueryLanguage_JSON_PATH,
	ResultPath: jsii.String("resultPath"),
	ResultSelector: map[string]interface{}{
		"resultSelectorKey": resultSelector,
	},
	StateName: jsii.String("stateName"),
}

Properties ​

assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{}#
Workflow variables to store in this step.

Default: Not assign variables

Using workflow variables, you can store data in a step and retrieve that data in future steps.

commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string#
A comment describing this state.

Default: No comment

inputPathoptionalstringinput_pathoptionalstrinputPathoptionalStringInputPathoptionalstringInputPathoptional*string= $#
JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.

itemSelectoroptional{ [key: string]: any }item_selectoroptionaltyping.Mapping[str, Any]itemSelectoroptionalMap<String, Object>ItemSelectoroptionalIDictionary<string, object>ItemSelectoroptional*map[string]interface{}= $#
The JSON that you want to override your default iteration input (mutually exclusive with `parameters` and `jsonataItemSelector`).
itemsPathoptionalstringitems_pathoptionalstritemsPathoptionalStringItemsPathoptionalstringItemsPathoptional*string= $#
JSONPath expression to select the array to iterate over.
jsonataItemSelectoroptionalstringjsonata_item_selectoroptionalstrjsonataItemSelectoroptionalStringJsonataItemSelectoroptionalstringJsonataItemSelectoroptional*string= $#
Jsonata expression that evaluates to a JSON array to override your default iteration input (mutually exclusive with `parameters` and `itemSelector`).

Example value: {% {\"foo\": \"foo\", \"input\": $states.input} %}

jsonataMaxConcurrencyoptionalstringjsonata_max_concurrencyoptionalstrjsonataMaxConcurrencyoptionalStringJsonataMaxConcurrencyoptionalstringJsonataMaxConcurrencyoptional*string#
JSONata expression for MaxConcurrency.

Default: full concurrency

A JSONata expression that evaluates to an integer, specifying the maximum concurrency dynamically. Mutually exclusive with maxConcurrency and maxConcurrencyPath.

Example value: {% $states.input.maxConcurrency %}

maxConcurrencyoptionalnumbermax_concurrencyoptionalint | floatmaxConcurrencyoptionalNumberMaxConcurrencyoptionaldoubleMaxConcurrencyoptional*float64#
MaxConcurrency.

Default: full concurrency

An upper bound on the number of iterations you want running at once.

maxConcurrencyPathoptionalstringmax_concurrency_pathoptionalstrmaxConcurrencyPathoptionalStringMaxConcurrencyPathoptionalstringMaxConcurrencyPathoptional*string#
MaxConcurrencyPath.

Default: full concurrency

A JsonPath that specifies the maximum concurrency dynamically from the state input.

outputPathoptionalstringoutput_pathoptionalstroutputPathoptionalStringOutputPathoptionalstringOutputPathoptional*string= $#
JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.

parametersoptional{ [key: string]: any }parametersoptionaltyping.Mapping[str, Any]parametersoptionalMap<String, Object>ParametersoptionalIDictionary<string, object>Parametersoptional*map[string]interface{}= $deprecated#
Step Functions has deprecated the `parameters` field in favor of the new `itemSelector` field
queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage= JSONPath#
The name of the query language used by the state.

If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.

resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string= $#
JSONPath expression to indicate where to inject the state's output.

May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.

resultSelectoroptional{ [key: string]: any }result_selectoroptionaltyping.Mapping[str, Any]resultSelectoroptionalMap<String, Object>ResultSelectoroptionalIDictionary<string, object>ResultSelectoroptional*map[string]interface{}= None#
The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.

stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string#
Optional name for this state.

Default: The construct ID will be used as state name