deleteAutomationRule method

Future<void> deleteAutomationRule({
  1. required String ruleArn,
  2. required int ruleRevision,
  3. String? clientToken,
})

Deletes an existing automation rule.

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 ruleArn : The ARN of the rule to delete.

Parameter ruleRevision : The revision number of the rule to delete.

Parameter clientToken : A unique identifier to ensure idempotency of the request.

Implementation

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