Skip to main content

resolver_rules

Creates, updates, deletes or gets a resolver_rule resource or lists resolver_rules in a region

Overview

Nameresolver_rules
TypeResource
DescriptionResource Type definition for AWS::Route53Resolver::ResolverRule
Idaws.route53resolver.resolver_rules

Fields

NameDatatypeDescription
resolver_endpoint_idstringThe ID of the endpoint that the rule is associated with.
domain_namestringDNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps
namestringThe name for the Resolver rule
rule_typestringWhen you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD. When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM.
tagsarrayAn array of key-value pairs to apply to this resource.
target_ipsarrayAn array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
arnstringThe Amazon Resource Name (ARN) of the resolver rule.
resolver_rule_idstringThe ID of the endpoint that the rule is associated with.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTDomainName, RuleType, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all resolver_rules in a region.

SELECT
region,
resolver_endpoint_id,
domain_name,
name,
rule_type,
tags,
target_ips,
arn,
resolver_rule_id
FROM aws.route53resolver.resolver_rules
WHERE region = 'us-east-1';

Gets all properties from an individual resolver_rule.

SELECT
region,
resolver_endpoint_id,
domain_name,
name,
rule_type,
tags,
target_ips,
arn,
resolver_rule_id
FROM aws.route53resolver.resolver_rules
WHERE region = 'us-east-1' AND data__Identifier = '<ResolverRuleId>';

INSERT example

Use the following StackQL query and manifest file to create a new resolver_rule resource, using stack-deploy.

/*+ create */
INSERT INTO aws.route53resolver.resolver_rules (
DomainName,
RuleType,
region
)
SELECT
'{{ DomainName }}',
'{{ RuleType }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.route53resolver.resolver_rules
WHERE data__Identifier = '<ResolverRuleId>'
AND region = 'us-east-1';

Permissions

To operate on the resolver_rules resource, the following permissions are required:

Create

route53resolver:CreateResolverRule,
route53resolver:GetResolverRule,
route53resolver:ListTagsForResource,
route53resolver:TagResource

Read

route53resolver:GetResolverRule,
route53resolver:ListTagsForResource

Update

route53resolver:UpdateResolverRule,
route53resolver:GetResolverRule,
route53resolver:ListTagsForResource,
route53resolver:TagResource,
route53resolver:UntagResource

Delete

route53resolver:DeleteResolverRule,
route53resolver:GetResolverRule

List

route53resolver:ListResolverRules