sendWorkflowStepAction method
Pauses or resumes image creation when the associated workflow runs a
WaitForAction step.
May throw CallRateLimitExceededException.
May throw ClientException.
May throw ForbiddenException.
May throw IdempotentParameterMismatchException.
May throw InvalidParameterValueException.
May throw InvalidRequestException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
May throw ServiceException.
May throw ServiceUnavailableException.
Parameter action :
The action to perform on the paused workflow step. The workflow step must
be in a waiting state to accept an action. The request fails if the step
has already timed out or been actioned.
Parameter imageBuildVersionArn :
The Amazon Resource Name (ARN) of the image build version associated with
the workflow step execution. This value must match the image that owns the
waiting step. If the ARN does not correspond to the image running the
workflow, then the request fails with a validation error.
Parameter stepExecutionId :
Uniquely identifies the workflow step that sent the step action.
Parameter clientToken :
Unique, case-sensitive identifier you provide to ensure idempotency of the
request. For more information, see Ensuring
idempotency in the Amazon EC2 API Reference.
Parameter reason :
The reason for the action. This value is stored with the step execution
record and is accessible in subsequent workflow steps via step output
references.
Implementation
Future<SendWorkflowStepActionResponse> sendWorkflowStepAction({
required WorkflowStepActionType action,
required String imageBuildVersionArn,
required String stepExecutionId,
String? clientToken,
String? reason,
}) async {
final $payload = <String, dynamic>{
'action': action.value,
'imageBuildVersionArn': imageBuildVersionArn,
'stepExecutionId': stepExecutionId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (reason != null) 'reason': reason,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/SendWorkflowStepAction',
exceptionFnMap: _exceptionFns,
);
return SendWorkflowStepActionResponse.fromJson(response);
}