class TaskInput
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.TaskInput |
Java | software.amazon.awscdk.services.stepfunctions.TaskInput |
Python | aws_cdk.aws_stepfunctions.TaskInput |
TypeScript (source) | @aws-cdk/aws-stepfunctions » TaskInput |
Type union for task classes that accept multiple types of payload.
Example
declare const fn: lambda.Function;
new tasks.LambdaInvoke(this, 'Invoke with callback', {
lambdaFunction: fn,
integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
payload: sfn.TaskInput.fromObject({
token: sfn.JsonPath.taskToken,
input: sfn.JsonPath.stringAt('$.someField'),
}),
});
Properties
Name | Type | Description |
---|---|---|
type | Input | type of task input. |
value | any | payload for the corresponding input type. |
type
Type:
Input
type of task input.
value
Type:
any
payload for the corresponding input type.
It can be a JSON-encoded object, context, data, etc.
Methods
Name | Description |
---|---|
static from | Use a part of the task context as task input. |
static from | Use a part of the execution data as task input. |
static from | Use a part of the execution data or task context as task input. |
static from | Use an object as task input. |
static from | Use a literal string as task input. |
static fromContextAt(path)
public static fromContextAt(path: string): TaskInput
⚠️ Deprecated: Use fromJsonPathAt
.
Parameters
- path
string
Returns
Use a part of the task context as task input.
Use this when you want to use a subobject or string from the current task context as complete payload to a task.
static fromDataAt(path)
public static fromDataAt(path: string): TaskInput
⚠️ Deprecated: Use fromJsonPathAt
.
Parameters
- path
string
Returns
Use a part of the execution data as task input.
Use this when you want to use a subobject or string from the current state machine execution as complete payload to a task.
static fromJsonPathAt(path)
public static fromJsonPathAt(path: string): TaskInput
Parameters
- path
string
Returns
Use a part of the execution data or task context as task input.
Use this when you want to use a subobject or string from the current state machine execution or the current task context as complete payload to a task.
static fromObject(obj)
public static fromObject(obj: { [string]: any }): TaskInput
Parameters
- obj
{ [string]: any }
Returns
Use an object as task input.
This object may contain JSON path fields as object values, if desired.
static fromText(text)
public static fromText(text: string): TaskInput
Parameters
- text
string
Returns
Use a literal string as task input.
This might be a JSON-encoded object, or just a text.