updateFirewallDomains method
Updates the firewall domain list from an array of domain specifications.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServiceErrorException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domains :
A list of domains to use in the update operation.
Each domain specification in your domain list must satisfy the following
requirements:
-
It can optionally start with
*(asterisk). -
With the exception of the optional starting asterisk, it must only contain
the following characters:
A-Z,a-z,0-9,-(hyphen). - It must be from 1-255 characters in length.
Parameter firewallDomainListId :
The ID of the domain list whose domains you want to update.
Parameter operation :
What you want DNS Firewall to do with the domains that you are providing:
-
ADD- Add the domains to the ones that are already in the domain list. -
REMOVE- Search the domain list for the domains and remove them from the list. -
REPLACE- Update the domain list to exactly match the list that you are providing.
Implementation
Future<UpdateFirewallDomainsResponse> updateFirewallDomains({
required List<String> domains,
required String firewallDomainListId,
required FirewallDomainUpdateOperation operation,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Resolver.UpdateFirewallDomains'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Domains': domains,
'FirewallDomainListId': firewallDomainListId,
'Operation': operation.value,
},
);
return UpdateFirewallDomainsResponse.fromJson(jsonResponse.body);
}