aws-cdk-lib.aws_route53resolver.CfnResolverRuleProps

interface CfnResolverRuleProps

LanguageType name
.NETAmazon.CDK.AWS.Route53Resolver.CfnResolverRuleProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsroute53resolver#CfnResolverRuleProps
Javasoftware.amazon.awscdk.services.route53resolver.CfnResolverRuleProps
Pythonaws_cdk.aws_route53resolver.CfnResolverRuleProps
TypeScript aws-cdk-lib » aws_route53resolver » CfnResolverRuleProps

Properties for defining a CfnResolverRule.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_route53resolver as route53resolver } from 'aws-cdk-lib';
const cfnResolverRuleProps: route53resolver.CfnResolverRuleProps = {
  domainName: 'domainName',
  ruleType: 'ruleType',

  // the properties below are optional
  name: 'name',
  resolverEndpointId: 'resolverEndpointId',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  targetIps: [{
    ip: 'ip',
    ipv6: 'ipv6',
    port: 'port',
  }],
};

Properties

NameTypeDescription
domainNamestringDNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps .
ruleTypestringWhen you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD .
name?stringThe name for the Resolver rule, which you specified when you created the Resolver rule.
resolverEndpointId?stringThe ID of the endpoint that the rule is associated with.
tags?CfnTag[]Tags help organize and categorize your Resolver rules.
targetIps?IResolvable | IResolvable | TargetAddressProperty[]An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.

domainName

Type: string

DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps .

If a query matches multiple Resolver rules (example.com and www.example.com), the query is routed using the Resolver rule that contains the most specific domain name (www.example.com).


ruleType

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 .

For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify FORWARD for RuleType . To then have Resolver process queries for apex.example.com, you create a rule and specify SYSTEM for RuleType .

Currently, only Resolver can create rules that have a value of RECURSIVE for RuleType .


name?

Type: string (optional)

The name for the Resolver rule, which you specified when you created the Resolver rule.


resolverEndpointId?

Type: string (optional)

The ID of the endpoint that the rule is associated with.


tags?

Type: CfnTag[] (optional)

Tags help organize and categorize your Resolver rules.

Each tag consists of a key and an optional value, both of which you define.


targetIps?

Type: IResolvable | IResolvable | TargetAddressProperty[] (optional)

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.