resolver_rules
Creates, updates, deletes or gets a resolver_rule
resource or lists resolver_rules
in a region
Overview
Name | resolver_rules |
Type | Resource |
Description | Resource Type definition for AWS::Route53Resolver::ResolverRule |
Id | aws.route53resolver.resolver_rules |
Fields
Name | Datatype | Description |
---|---|---|
resolver_endpoint_id | string | The ID of the endpoint that the rule is associated with. |
domain_name | string | DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps |
name | string | The name for the Resolver rule |
rule_type | string | When 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. |
tags | array | An array of key-value pairs to apply to this resource. |
target_ips | array | An 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. |
arn | string | The Amazon Resource Name (ARN) of the resolver rule. |
resolver_rule_id | string | The ID of the endpoint that the rule is associated with. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DomainName, RuleType, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.route53resolver.resolver_rules (
DomainName,
RuleType,
region
)
SELECT
'{{ DomainName }}',
'{{ RuleType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.route53resolver.resolver_rules (
ResolverEndpointId,
DomainName,
Name,
RuleType,
Tags,
TargetIps,
region
)
SELECT
'{{ ResolverEndpointId }}',
'{{ DomainName }}',
'{{ Name }}',
'{{ RuleType }}',
'{{ Tags }}',
'{{ TargetIps }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resolver_rule
props:
- name: ResolverEndpointId
value: '{{ ResolverEndpointId }}'
- name: DomainName
value: '{{ DomainName }}'
- name: Name
value: '{{ Name }}'
- name: RuleType
value: '{{ RuleType }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: TargetIps
value:
- Ip: '{{ Ip }}'
Ipv6: '{{ Ipv6 }}'
Port: '{{ Port }}'
Protocol: '{{ Protocol }}'
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