v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1448186240.2 KB

Creates a DNS firewall rule. Firewall rules define actions (ALLOW, BLOCK, or ALERT) to take on DNS queries that match specified domain lists, managed domain lists, or advanced threat protections.

Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify --region us-east-2 on Amazon Web Services CLI commands.

post/firewall-rules

Request body

action'ALLOW' | 'ALERT' | 'BLOCK' required
<p>The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list:</p> <ul> <li> <p> <code>ALLOW</code> - Permit the request to go through.</p> </li> <li> <p> <code>ALERT</code> - Permit the request and send metrics and logs to CloudWatch.</p> </li> <li> <p> <code>BLOCK</code> - Disallow the request. This option requires additional details in the rule's <code>BlockResponse</code>.</p> </li> </ul>
blockOverrideDnsType'CNAME'
<p>The DNS record's type. This determines the format of the record value that you provided in <code>BlockOverrideDomain</code>. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p> <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
blockOverrideDomainstring
<p>The custom DNS record to send back in response to the query. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p> <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
blockOverrideTtlinteger
<p>The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p> <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
blockResponse'NODATA' | 'NXDOMAIN' | 'OVERRIDE'

The response to return when the action is BLOCK. Valid values are NXDOMAIN (domain does not exist), NODATA (domain exists but no records), or OVERRIDE (return custom response).

clientTokenstring

A unique, case-sensitive identifier to ensure idempotency. This means that making the same request multiple times with the same <code>clientToken</code> has the same result every time.

confidenceThreshold'LOW' | 'MEDIUM' | 'HIGH'

The confidence threshold for advanced threat detection. Valid values are HIGH, MEDIUM, or LOW, indicating the accuracy level required for threat detection.

descriptionstring

An optional description for the firewall rule.

dnsAdvancedProtection'DGA' | 'DNS_TUNNELING' | 'DICTIONARY_DGA'

Whether to enable advanced DNS threat protection for this rule. Advanced protection can detect and block DNS tunneling and Domain Generation Algorithm (DGA) threats.

firewallDomainListIdstring

The ID of the firewall domain list to use in this rule.

namestring required

A descriptive name for the firewall rule.

priorityinteger

The priority of this rule. Rules are evaluated in priority order, with lower numbers having higher priority. When a DNS query matches multiple rules, the rule with the highest priority (lowest number) is applied.

dnsViewIdstring required

The ID of the DNS view to associate with this firewall rule.

qTypestring

The DNS query type to match for this rule. Examples include A (IPv4 address), AAAA (IPv6 address), MX (mail exchange), or TXT (text record).

Response

Success

action'ALLOW' | 'ALERT' | 'BLOCK' required

The action that DNS Firewall takes on DNS queries that match this rule.

blockOverrideDnsType'CNAME'

The DNS record type for the custom response when blockResponse is OVERRIDE.

blockOverrideDomainstring

The custom domain to return when the action is BLOCK and blockResponse is OVERRIDE.

blockOverrideTtlinteger

The time-to-live (TTL) value for the custom response when blockResponse is OVERRIDE.

blockResponse'NODATA' | 'NXDOMAIN' | 'OVERRIDE'

The response to return when the action is BLOCK.

confidenceThreshold'LOW' | 'MEDIUM' | 'HIGH'

The confidence threshold for advanced threat detection.

createdAtstring date-time required

The date and time when the firewall rule was created.

descriptionstring

The description of the firewall rule.

dnsAdvancedProtection'DGA' | 'DNS_TUNNELING' | 'DICTIONARY_DGA'

Whether advanced DNS threat protection is enabled for this rule.

firewallDomainListIdstring

The ID of the firewall domain list used in this rule.

idstring required

The unique identifier for the firewall rule.

namestring required

The name of the firewall rule.

priorityinteger required

The priority of the firewall rule.

dnsViewIdstring required

The ID of the DNS view associated with this firewall rule.

queryTypestring

The DNS query type that this rule matches.

status'CREATING' | 'OPERATIONAL' | 'UPDATING' | 'DELETING' required

The operational status of the firewall rule.

updatedAtstring date-time required

The date and time when the firewall rule was last updated.