Class MapProps
Properties for defining a Map state.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MapProps : Object, IMapProps, IMapBaseProps
Syntax (vb)
Public Class MapProps
Inherits Object
Implements IMapProps, IMapBaseProps
Remarks
ExampleMetadata: infused
Examples
var map = new Map(this, "Map State", new MapProps {
MaxConcurrency = 1,
ItemsPath = JsonPath.StringAt("$.inputForMap"),
ItemSelector = new Dictionary<string, object> {
{ "item", JsonPath.StringAt("$.Map.Item.Value") }
},
ResultPath = "$.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
var choice = new Choice(this, "Choice");
var condition1 = Condition.StringEquals("$.item.status", "SUCCESS");
var step1 = new Pass(this, "Step1");
var step2 = new Pass(this, "Step2");
var finish = new Pass(this, "Finish");
var definition = choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish);
map.ItemProcessor(definition);
Synopsis
Constructors
MapProps() |
Properties
Comment | An optional description for this state. |
InputPath | JSONPath expression to select part of the state to be the input to this state. |
ItemSelector | The JSON that you want to override your default iteration input (mutually exclusive with |
ItemsPath | JSONPath expression to select the array to iterate over. |
MaxConcurrency | MaxConcurrency. |
MaxConcurrencyPath | MaxConcurrencyPath. |
OutputPath | JSONPath expression to select part of the state to be the output to this state. |
Parameters | (deprecated) The JSON that you want to override your default iteration input (mutually exclusive with |
ResultPath | JSONPath expression to indicate where to inject the state's output. |
ResultSelector | The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. |
StateName | Optional name for this state. |
Constructors
MapProps()
public MapProps()
Properties
Comment
An optional description for this state.
public string Comment { get; set; }
Property Value
System.String
Remarks
Default: No comment
InputPath
JSONPath expression to select part of the state to be the input to this state.
public string InputPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
Default: $
ItemSelector
The JSON that you want to override your default iteration input (mutually exclusive with parameters
).
public IDictionary<string, object> ItemSelector { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
ItemsPath
JSONPath expression to select the array to iterate over.
public string ItemsPath { get; set; }
Property Value
System.String
Remarks
Default: $
MaxConcurrency
MaxConcurrency.
public Nullable<double> MaxConcurrency { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
An upper bound on the number of iterations you want running at once.
Default: - full concurrency
MaxConcurrencyPath
MaxConcurrencyPath.
public string MaxConcurrencyPath { get; set; }
Property Value
System.String
Remarks
A JsonPath that specifies the maximum concurrency dynamically from the state input.
Default: - full concurrency
OutputPath
JSONPath expression to select part of the state to be the output to this state.
public string OutputPath { get; set; }
Property Value
System.String
Remarks
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
).
public IDictionary<string, object> Parameters { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Default: $
Stability: Deprecated
See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html
ResultPath
JSONPath expression to indicate where to inject the state's output.
public string ResultPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
Default: $
ResultSelector
The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
public IDictionary<string, object> ResultSelector { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
Default: - None
StateName
Optional name for this state.
public string StateName { get; set; }
Property Value
System.String
Remarks
Default: - The construct ID will be used as state name