deleteInsightRules method

Future<DeleteInsightRulesOutput> deleteInsightRules({
  1. required List<String> ruleNames,
})

Permanently deletes the specified Contributor Insights rules.

If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.

May throw InvalidParameterValueException. May throw MissingRequiredParameterException.

Parameter ruleNames : An array of the rule names to delete. If you need to find out the names of your rules, use DescribeInsightRules.

Implementation

Future<DeleteInsightRulesOutput> deleteInsightRules({
  required List<String> ruleNames,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'GraniteServiceVersion20100801.DeleteInsightRules'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RuleNames': ruleNames,
    },
  );

  return DeleteInsightRulesOutput.fromJson(jsonResponse.body);
}