deleteRule method

Future<void> deleteRule({
  1. required Rule rule,
})

Deletes the rule. You cannot delete a rule if it is used by an ACTIVE or INACTIVE detector version.

When you delete a rule, Amazon Fraud Detector permanently deletes that rule from the evaluation history, and the data is no longer stored in Amazon Fraud Detector.

May throw ConflictException. May throw ValidationException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.

Implementation

Future<void> deleteRule({
  required Rule rule,
}) async {
  ArgumentError.checkNotNull(rule, 'rule');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.DeleteRule'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'rule': rule,
    },
  );
}