@Generated(value="jsii-pacmak/1.54.0 (build b1b977a)", date="2022-02-19T00:19:34.313Z") @Stability(value=Stable) public class JsonPath extends software.amazon.jsii.JsiiObject
Example:
Function fn;
LambdaInvoke.Builder.create(this, "Invoke Handler")
.lambdaFunction(fn)
.resultSelector(Map.of(
"lambdaOutput", JsonPath.stringAt("$.Payload"),
"invokeRequestId", JsonPath.stringAt("$.SdkResponseMetadata.RequestId"),
"staticValue", Map.of(
"foo", "bar"),
"stateName", JsonPath.stringAt("$.State.Name")))
.build();
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-paths.html| Modifier and Type | Field and Description |
|---|---|
static String |
DISCARD
Special string value to discard state input, output or result.
|
| Modifier | Constructor and Description |
|---|---|
protected |
JsonPath(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
JsonPath(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static String |
array(String... values)
Make an intrinsic States.Array expression.
|
static String |
format(String formatString,
String... values)
Make an intrinsic States.Format expression.
|
static String |
getEntireContext()
Use the entire context data structure.
|
static String |
getEntirePayload()
Use the entire data structure.
|
static String |
getTaskToken()
Return the Task Token field.
|
static Boolean |
isEncodedJsonPath(String value)
Determines if the indicated string is an encoded JSON path.
|
static String |
jsonToString(Object value)
Make an intrinsic States.JsonToString expression.
|
static List<String> |
listAt(String path)
Instead of using a literal string list, get the value from a JSON path.
|
static Number |
numberAt(String path)
Instead of using a literal number, get the value from a JSON path.
|
static IResolvable |
objectAt(String path)
Reference a complete (complex) object in a JSON path location.
|
static String |
stringAt(String path)
Instead of using a literal string, get the value from a JSON path.
|
static IResolvable |
stringToJson(String jsonString)
Make an intrinsic States.StringToJson expression.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String DISCARD
protected JsonPath(software.amazon.jsii.JsiiObjectRef objRef)
protected JsonPath(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static String array(@NotNull String... values)
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 - This parameter is required.https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html@Stability(value=Stable) @NotNull public static String format(@NotNull String formatString, @NotNull String... values)
This can be used to embed JSON Path variables inside a format string.
For example:
JsonPath.format("Hello, my name is {}.", JsonPath.stringAt("$.name"));
formatString - This parameter is required.values - This parameter is required.https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html@Stability(value=Stable) @NotNull public static Boolean isEncodedJsonPath(@NotNull String value)
value - string to be evaluated. This parameter is required.@Stability(value=Stable) @NotNull public static String jsonToString(@NotNull Object value)
During the execution of the Step Functions state machine, encode the given object into a JSON string.
For example:
JsonPath.jsonToString(JsonPath.objectAt("$.someObject"));
value - This parameter is required.https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html@Stability(value=Stable) @NotNull public static List<String> listAt(@NotNull String path)
path - This parameter is required.@Stability(value=Stable) @NotNull public static Number numberAt(@NotNull String path)
path - This parameter is required.@Stability(value=Stable) @NotNull public static IResolvable objectAt(@NotNull String path)
path - This parameter is required.@Stability(value=Stable) @NotNull public static String stringAt(@NotNull String path)
path - This parameter is required.@Stability(value=Stable) @NotNull public static IResolvable stringToJson(@NotNull String jsonString)
During the execution of the Step Functions state machine, parse the given argument as JSON into its object form.
For example:
JsonPath.stringToJson(JsonPath.stringAt("$.someJsonBody"));
jsonString - This parameter is required.https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html@Stability(value=Stable) @NotNull public static String getEntireContext()
Will be an object at invocation time, but is represented in the CDK application as a string.
@Stability(value=Stable) @NotNull public static String getEntirePayload()
Will be an object at invocation time, but is represented in the CDK application as a string.
@Stability(value=Stable) @NotNull public static String getTaskToken()
External actions will need this token to report step completion
back to StepFunctions using the SendTaskSuccess or SendTaskFailure
calls.
Copyright © 2022. All rights reserved.