Result Class
The result of a Pass operation.
| Source | aws-stepfunctions/lib/states/pass.ts |
|---|
Example
ts
// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
const pass = new sfn.Pass(this, 'Add Hello World', {
result: sfn.Result.fromObject({ hello: 'world' }),
resultPath: '$.subObject',
});
// Set the next state
const nextState = new sfn.Pass(this, 'NextState');
pass.next(nextState);
java
// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
Pass pass = Pass.Builder.create(this, "Add Hello World")
.result(Result.fromObject(Map.of("hello", "world")))
.resultPath("$.subObject")
.build();
// Set the next state
Pass nextState = new Pass(this, "NextState");
pass.next(nextState);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
var pass = new Pass(this, "Add Hello World", new PassProps {
Result = Result.FromObject(new Dictionary<string, object> { { "hello", "world" } }),
ResultPath = "$.subObject"
});
// Set the next state
var nextState = new Pass(this, "NextState");
pass.Next(nextState);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
pass := sfn.NewPass(this, jsii.String("Add Hello World"), &PassProps{
Result: sfn.Result_FromObject(map[string]interface{}{
"hello": jsii.String("world"),
}),
ResultPath: jsii.String("$.subObject"),
})
// Set the next state
nextState := sfn.NewPass(this, jsii.String("NextState"))
pass.Next(nextState)
Properties
result of the Pass operation.
Methods
fromArray(value: any[]): Result // chainable@staticmethod def from_array(value: typing.List[Any]) -> Resultpublic static Result fromArray(List<Object> value)public static Result FromArray(object[] value)func FromArray(Value *[]interface{}) Result static #The result of the operation is an array.
fromBoolean(value: boolean): Result // chainable@staticmethod def from_boolean(value: bool) -> Resultpublic static Result fromBoolean(Boolean value)public static Result FromBoolean(bool value)func FromBoolean(Value *bool) Result static #The result of the operation is a boolean.
fromNumber(value: number): Result // chainable@staticmethod def from_number(value: int | float) -> Resultpublic static Result fromNumber(Number value)public static Result FromNumber(double value)func FromNumber(Value *float64) Result static #The result of the operation is a number.
fromObject(value: { [key: string]: any }): Result // chainable@staticmethod def from_object(value: typing.Mapping[str, Any]) -> Resultpublic static Result fromObject(Map<String, Object> value)public static Result FromObject(IDictionary<string, object> value)func FromObject(Value *map[string]interface{}) Result static #The result of the operation is an object.