deleteFirewallRule method
Deletes the specified firewall rule.
May throw AccessDeniedException.
May throw InternalServiceErrorException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter firewallRuleGroupId :
The unique identifier of the firewall rule group that you want to delete
the rule from.
Parameter firewallDomainListId :
The ID of the domain list that's used in the rule.
Parameter firewallThreatProtectionId :
The ID that is created for a DNS Firewall Advanced rule.
Parameter qtype :
The DNS query type that the rule you are deleting evaluates. Allowed
values are;
- A: Returns an IPv4 address.
- AAAA: Returns an Ipv6 address.
- CAA: Restricts CAs that can create SSL/TLS certifications for the domain.
- CNAME: Returns another domain name.
- DS: Record that identifies the DNSSEC signing key of a delegated zone.
- MX: Specifies mail servers.
- NAPTR: Regular-expression-based rewriting of domain names.
- NS: Authoritative name servers.
- PTR: Maps an IP address to a domain name.
- SOA: Start of authority record for the zone.
- SPF: Lists the servers authorized to send emails from a domain.
- SRV: Application specific values that identify servers.
- TXT: Verifies email senders and application-specific values.
- A query type you define by using the DNS type ID, for example 28 for AAAA. The values must be defined as TYPENUMBER, where the NUMBER can be 1-65534, for example, TYPE28. For more information, see List of DNS record types.
Implementation
Future<DeleteFirewallRuleResponse> deleteFirewallRule({
required String firewallRuleGroupId,
String? firewallDomainListId,
String? firewallThreatProtectionId,
String? qtype,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Resolver.DeleteFirewallRule'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FirewallRuleGroupId': firewallRuleGroupId,
if (firewallDomainListId != null)
'FirewallDomainListId': firewallDomainListId,
if (firewallThreatProtectionId != null)
'FirewallThreatProtectionId': firewallThreatProtectionId,
if (qtype != null) 'Qtype': qtype,
},
);
return DeleteFirewallRuleResponse.fromJson(jsonResponse.body);
}