createFirewallRuleGroup method
Creates an empty DNS Firewall rule group for filtering DNS network traffic in a VPC. You can add rules to the new rule group by calling CreateFirewallRule.
May throw AccessDeniedException.
May throw InternalServiceErrorException.
May throw LimitExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
A name that lets you identify the rule group, to manage and use it.
Parameter creatorRequestId :
A unique string defined by you to identify the request. This allows you to
retry failed requests without the risk of running the operation twice.
This can be any unique string, for example, a timestamp.
Parameter tags :
A list of the tag keys and values that you want to associate with the rule
group.
Implementation
Future<CreateFirewallRuleGroupResponse> createFirewallRuleGroup({
required String name,
String? creatorRequestId,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Resolver.CreateFirewallRuleGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'CreatorRequestId': creatorRequestId ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
},
);
return CreateFirewallRuleGroupResponse.fromJson(jsonResponse.body);
}