MapProps
- class aws_cdk.aws_stepfunctions.MapProps(*, comment=None, input_path=None, item_selector=None, items_path=None, max_concurrency=None, max_concurrency_path=None, output_path=None, result_path=None, result_selector=None, state_name=None, parameters=None)
Bases:
MapBaseProps
Properties for defining a Map state.
- Parameters:
comment (
Optional
[str
]) – An optional description for this state. Default: No commentinput_path (
Optional
[str
]) – 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 {}. Default: $item_selector (
Optional
[Mapping
[str
,Any
]]) – The JSON that you want to override your default iteration input (mutually exclusive withparameters
). Default: $items_path (
Optional
[str
]) – JSONPath expression to select the array to iterate over. Default: $max_concurrency (
Union
[int
,float
,None
]) – MaxConcurrency. An upper bound on the number of iterations you want running at once. Default: - full concurrencymax_concurrency_path (
Optional
[str
]) – MaxConcurrencyPath. A JsonPath that specifies the maximum concurrency dynamically from the state input. Default: - full concurrencyoutput_path (
Optional
[str
]) – 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 {}. Default: $result_path (
Optional
[str
]) – 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. Default: $result_selector (
Optional
[Mapping
[str
,Any
]]) – 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. Default: - Nonestate_name (
Optional
[str
]) – Optional name for this state. Default: - The construct ID will be used as state nameparameters (
Optional
[Mapping
[str
,Any
]]) – (deprecated) The JSON that you want to override your default iteration input (mutually exclusive withitemSelector
). Default: $
- ExampleMetadata:
infused
Example:
map = sfn.Map(self, "Map State", max_concurrency=1, items_path=sfn.JsonPath.string_at("$.inputForMap"), item_selector={ "item": sfn.JsonPath.string_at("$.Map.Item.Value") }, result_path="$.mapOutput" ) # The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together. # Below example is with a Choice and Pass step choice = sfn.Choice(self, "Choice") condition1 = sfn.Condition.string_equals("$.item.status", "SUCCESS") step1 = sfn.Pass(self, "Step1") step2 = sfn.Pass(self, "Step2") finish = sfn.Pass(self, "Finish") definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish) map.item_processor(definition)
Attributes
- comment
An optional description for this state.
- Default:
No comment
- input_path
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 {}.
- Default:
$
- item_selector
The JSON that you want to override your default iteration input (mutually exclusive with
parameters
).
- items_path
JSONPath expression to select the array to iterate over.
- Default:
$
- max_concurrency
MaxConcurrency.
An upper bound on the number of iterations you want running at once.
- max_concurrency_path
MaxConcurrencyPath.
A JsonPath that specifies the maximum concurrency dynamically from the state input.
- output_path
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 {}.
- Default:
$
- parameters
(deprecated) The JSON that you want to override your default iteration input (mutually exclusive with
itemSelector
).- Default:
$
- Deprecated:
Step Functions has deprecated the
parameters
field in favor of the newitemSelector
field- See:
https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html
- Stability:
deprecated
- result_path
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.
- Default:
$
- result_selector
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.
- state_name
Optional name for this state.
- Default:
The construct ID will be used as state name