Bases: object
Extract a field from the State Machine data or context that gets passed around between states.
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-paths.html
infused
Example:
# fn: lambda.Function
tasks.LambdaInvoke(self, "Invoke Handler",
lambda_function=fn,
result_selector={
"lambda_output": sfn.JsonPath.string_at("$.Payload"),
"invoke_request_id": sfn.JsonPath.string_at("$.SdkResponseMetadata.RequestId"),
"static_value": {
"foo": "bar"
},
"state_name": sfn.JsonPath.string_at("$.State.Name")
}
)
Attributes
Static Methods
Make an intrinsic States.Array expression.
Combine any number of string literals or JsonPath expressions into an array.
Use this function if the value of an array element directly has to come from a JSON Path expression (either the State object or the Context object).
If the array contains object literals whose values come from a JSON path expression, you do not need to use this function.
values (str
)
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html
str
Make an intrinsic States.Format expression.
This can be used to embed JSON Path variables inside a format string.
For example:
sfn.JsonPath.format("Hello, my name is {}.", sfn.JsonPath.string_at("$.name"))
format_string (str
)
values (str
)
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html
str
Determines if the indicated string is an encoded JSON path.
value (str
) – string to be evaluated.
bool
Make an intrinsic States.JsonToString expression.
During the execution of the Step Functions state machine, encode the given object into a JSON string.
For example:
sfn.JsonPath.json_to_string(sfn.JsonPath.object_at("$.someObject"))
value (Any
)
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html
str
Instead of using a literal string list, get the value from a JSON path.
path (str
)
List
[str
]
Instead of using a literal number, get the value from a JSON path.
path (str
)
Union
[int
, float
]
Reference a complete (complex) object in a JSON path location.
path (str
)
Instead of using a literal string, get the value from a JSON path.
path (str
)
str
Make an intrinsic States.StringToJson expression.
During the execution of the Step Functions state machine, parse the given argument as JSON into its object form.
For example:
sfn.JsonPath.string_to_json(sfn.JsonPath.string_at("$.someJsonBody"))
json_string (str
)
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html