rollbackAutomationEvent method

Future<RollbackAutomationEventResponse> rollbackAutomationEvent({
  1. required String eventId,
  2. String? clientToken,
})

Initiates a rollback for a completed automation event.

May throw AccessDeniedException. May throw ForbiddenException. May throw IdempotencyTokenInUseException. May throw IdempotentParameterMismatchException. May throw InternalServerException. May throw InvalidParameterValueException. May throw OptInRequiredException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter eventId : The ID of the automation event to roll back.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.

Implementation

Future<RollbackAutomationEventResponse> rollbackAutomationEvent({
  required String eventId,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'ComputeOptimizerAutomationService.RollbackAutomationEvent'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'eventId': eventId,
      'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return RollbackAutomationEventResponse.fromJson(jsonResponse.body);
}