deleteRuleGroup method
Deletes the specified RuleGroup.
May throw InternalServerError.
May throw InvalidOperationException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedOperationException.
Parameter ruleGroupArn :
The Amazon Resource Name (ARN) of the rule group.
You must specify the ARN or the name, and you can specify both.
Parameter ruleGroupName :
The descriptive name of the rule group. You can't change the name of a
rule group after you create it.
You must specify the ARN or the name, and you can specify both.
Parameter type :
Indicates whether the rule group is stateless or stateful. If the rule
group is stateless, it contains stateless rules. If it is stateful, it
contains stateful rules.
Implementation
Future<DeleteRuleGroupResponse> deleteRuleGroup({
String? ruleGroupArn,
String? ruleGroupName,
RuleGroupType? type,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'NetworkFirewall_20201112.DeleteRuleGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (ruleGroupArn != null) 'RuleGroupArn': ruleGroupArn,
if (ruleGroupName != null) 'RuleGroupName': ruleGroupName,
if (type != null) 'Type': type.value,
},
);
return DeleteRuleGroupResponse.fromJson(jsonResponse.body);
}