Skip to main content

firewall_rules

Creates, updates, deletes, gets or lists a firewall_rules resource.

Overview

Namefirewall_rules
TypeResource
Idaws.route53globalresolver.firewall_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the firewall rule. (pattern: <code>[-.a-zA-Z0-9]+</code>)
namestringThe name of the firewall rule. (pattern: <code>(?!^[0-9]+$)([a-zA-Z0-9-_/' ']+)</code>)
actionstringThe action configured for the firewall rule. (ALLOW, ALERT, BLOCK)
block_override_dns_typestringThe DNS record type configured for the firewall rule's custom response. (CNAME)
block_override_domainstringThe custom domain name configured for the firewall rule's BLOCK response. (pattern: <code>*?[a-zA-Z0-9!"#$%&'()*+,./:;<=>?@&#91;\&#93;^_`{|}~-]+</code>)
block_override_ttlintegerThe TTL value configured for the firewall rule's custom response.
block_responsestringThe type of block response configured for the firewall rule. (NODATA, NXDOMAIN, OVERRIDE)
confidence_thresholdstringThe confidence threshold configured for the firewall rule's advanced threat detection. (LOW, MEDIUM, HIGH)
created_atstring (date-time)The date and time when the firewall rule was created.
descriptionstringThe description of the firewall rule.
dns_advanced_protectionstringWhether advanced DNS threat protection is enabled for the firewall rule. (DGA, DNS_TUNNELING, DICTIONARY_DGA)
dns_view_idstringThe ID of the DNS view associated with the firewall rule. (pattern: <code>[-.a-zA-Z0-9]+</code>)
firewall_domain_list_idstringThe ID of the firewall domain list associated with the firewall rule. (pattern: <code>[-.a-zA-Z0-9]+</code>)
priorityinteger (int64)The priority of the firewall rule.
query_typestringThe DNS query type that the firewall rule matches.
statusstringThe current status of the firewall rule. (CREATING, OPERATIONAL, UPDATING, DELETING)
updated_atstring (date-time)The date and time when the firewall rule was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_firewall_rulesselectdnsview_id, regionmax_results, next_token, filtersLists all DNS firewall rules for a DNS view with pagination support. 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.
get_firewall_ruleselectfirewall_rule_id, regionRetrieves information about a DNS firewall rule. 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.
create_firewall_ruleinsertregion, action, name, dnsViewIdCreates 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.
update_firewall_ruleupdatefirewall_rule_id, region, clientTokenUpdates the configuration of a DNS firewall rule. 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.
delete_firewall_ruledeletefirewall_rule_id, regionDeletes a DNS firewall rule. This operation cannot be undone. 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dnsview_idstringID of the DNS view.
firewall_rule_idstringThe unique identifier of the firewall rule to delete.
regionstringAWS region (default: us-east-1)
filtersobjectValues to filter the results.
max_resultsintegerThe maximum number of results to retrieve in a single call.
next_tokenstringA pagination token used for large sets of results that can't be returned in a single response.

SELECT examples

Lists all DNS firewall rules for a DNS view with pagination support. 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.

SELECT
id,
name,
action,
block_override_dns_type,
block_override_domain,
block_override_ttl,
block_response,
confidence_threshold,
created_at,
description,
dns_advanced_protection,
dns_view_id,
firewall_domain_list_id,
priority,
query_type,
status,
updated_at
FROM aws.route53globalresolver.firewall_rules
WHERE dnsview_id = '{{ dnsview_id }}' -- required
AND region = '{{ region }}' -- required
AND max_results = '{{ max_results }}'
AND next_token = '{{ next_token }}'
AND filters = '{{ filters }}'
;

INSERT examples

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.

INSERT INTO aws.route53globalresolver.firewall_rules (
action,
blockOverrideDnsType,
blockOverrideDomain,
blockOverrideTtl,
blockResponse,
clientToken,
confidenceThreshold,
description,
dnsAdvancedProtection,
firewallDomainListId,
name,
priority,
dnsViewId,
qType,
region
)
SELECT
'{{ action }}' /* required */,
'{{ blockOverrideDnsType }}',
'{{ blockOverrideDomain }}',
{{ blockOverrideTtl }},
'{{ blockResponse }}',
'{{ clientToken }}',
'{{ confidenceThreshold }}',
'{{ description }}',
'{{ dnsAdvancedProtection }}',
'{{ firewallDomainListId }}',
'{{ name }}' /* required */,
{{ priority }},
'{{ dnsViewId }}' /* required */,
'{{ qType }}',
'{{ region }}'
RETURNING
id,
name,
action,
block_override_dns_type,
block_override_domain,
block_override_ttl,
block_response,
confidence_threshold,
created_at,
description,
dns_advanced_protection,
dns_view_id,
firewall_domain_list_id,
priority,
query_type,
status,
updated_at
;

UPDATE examples

Updates the configuration of a DNS firewall rule. 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.

UPDATE aws.route53globalresolver.firewall_rules
SET
action = '{{ action }}',
blockOverrideDnsType = '{{ blockOverrideDnsType }}',
blockOverrideDomain = '{{ blockOverrideDomain }}',
blockOverrideTtl = {{ blockOverrideTtl }},
blockResponse = '{{ blockResponse }}',
clientToken = '{{ clientToken }}',
confidenceThreshold = '{{ confidenceThreshold }}',
description = '{{ description }}',
dnsAdvancedProtection = '{{ dnsAdvancedProtection }}',
name = '{{ name }}',
priority = {{ priority }}
WHERE
firewall_rule_id = '{{ firewall_rule_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}' --required
RETURNING
id,
name,
action,
block_override_dns_type,
block_override_domain,
block_override_ttl,
block_response,
confidence_threshold,
created_at,
description,
dns_advanced_protection,
dns_view_id,
firewall_domain_list_id,
priority,
query_type,
status,
updated_at;

DELETE examples

Deletes a DNS firewall rule. This operation cannot be undone. 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.

DELETE FROM aws.route53globalresolver.firewall_rules
WHERE firewall_rule_id = '{{ firewall_rule_id }}' --required
AND region = '{{ region }}' --required
;