sendWorkflowStepAction method

Future<SendWorkflowStepActionResponse> sendWorkflowStepAction({
  1. required WorkflowStepActionType action,
  2. required String imageBuildVersionArn,
  3. required String stepExecutionId,
  4. String? clientToken,
  5. String? reason,
})

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 for the image creation process to take while a workflow WaitForAction step waits for an asynchronous action to complete.

Parameter imageBuildVersionArn : The Amazon Resource Name (ARN) of the image build version to send action for.

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 why this action is sent.

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);
}