是需要step函数生成Task.Token还是stepfunction自动生成Task.Token
Is it need to generate Task.Token by step function or stepfunction automatically generates Task.Token
我想生成Task.Token。我可以知道如何创建 Task.Token 来调用 lambda 函数吗? Is sf automaically generates Task.Token along with "Payload":{ "TaskToken.$": "$.Task.Token" }
是的 .. 如果您的任务附加了相关关键字,它会自动为 WaitForToken 生成。
来自 aws 的示例,在下面的示例中,Task 表明它需要在 arn:aws:states:::sqs:sendMessage.waitForTaskToken
行中等待 taskToken
"Send message to SQS": {
"Type": "Task",
"Resource": "arn:aws:states:::sqs:sendMessage.waitForTaskToken",
"Parameters": {
"QueueUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/myQueue",
"MessageBody": {
"Message": "Hello from Step Functions!",
"TaskToken.$": "$$.Task.Token"
}
},
"Next": "NEXT_STATE"
}
我想生成Task.Token。我可以知道如何创建 Task.Token 来调用 lambda 函数吗? Is sf automaically generates Task.Token along with "Payload":{ "TaskToken.$": "$.Task.Token" }
是的 .. 如果您的任务附加了相关关键字,它会自动为 WaitForToken 生成。
来自 aws 的示例,在下面的示例中,Task 表明它需要在 arn:aws:states:::sqs:sendMessage.waitForTaskToken
行中等待 taskToken"Send message to SQS": {
"Type": "Task",
"Resource": "arn:aws:states:::sqs:sendMessage.waitForTaskToken",
"Parameters": {
"QueueUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/myQueue",
"MessageBody": {
"Message": "Hello from Step Functions!",
"TaskToken.$": "$$.Task.Token"
}
},
"Next": "NEXT_STATE"
}