Class CfnResolverRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.route53resolver.CfnResolverRule
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IResolverRuleRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:16.981Z")
@Stability(Stable)
public class CfnResolverRule
extends CfnResource
implements IInspectable, IResolverRuleRef, ITaggable
For DNS queries that originate in your VPCs, specifies which Resolver endpoint the queries pass through, one domain name that you want to forward to your network, and the IP addresses of the DNS resolvers in your network.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.route53resolver.*;
CfnResolverRule cfnResolverRule = CfnResolverRule.Builder.create(this, "MyCfnResolverRule")
.ruleType("ruleType")
// the properties below are optional
.delegationRecord("delegationRecord")
.domainName("domainName")
.name("name")
.resolverEndpointId("resolverEndpointId")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.targetIps(List.of(TargetAddressProperty.builder()
.ip("ip")
.ipv6("ipv6")
.port("port")
.protocol("protocol")
.serverNameIndication("serverNameIndication")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnResolverRule.static interfaceIn a CreateResolverRule request, an array of the IPs that you want to forward DNS queries to.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.route53resolver.IResolverRuleRef
IResolverRuleRef.Jsii$Default, IResolverRuleRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnResolverRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnResolverRule(software.amazon.jsii.JsiiObjectRef objRef) CfnResolverRule(software.constructs.Construct scope, String id, CfnResolverRuleProps props) Create a newAWS::Route53Resolver::ResolverRule. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForResolverRule(IResolverRuleRef resource) The Amazon Resource Name (ARN) of the resolver rule, such asarn:aws:route53resolver:us-east-1:123456789012:resolver-rule/resolver-rule-a1bzhi.DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps.A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.The ID of the outbound endpoint that the rule is associated with, such asrslvr-out-fdc049932dexample.When the value ofRuleTypeisFORWARD, the ID that Resolver assigned to the resolver rule when you created it, such asrslvr-rr-5328a0899aexample.When the value ofRuleTypeisFORWARD, the IP addresses that the outbound endpoint forwards DNS queries to, typically the IP addresses for DNS resolvers on your network.DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network.DNS queries for this domain name are forwarded to the IP addresses that are specified inTargetIps.getName()The name for the Resolver rule, which you specified when you created the Resolver rule.The ID of the endpoint that the rule is associated with.A reference to a ResolverRule resource.When you want to forward DNS queries for specified domain name to resolvers on your network, specifyFORWARDorDELEGATE.getTags()Tag Manager which manages the tags for this resource.Tags help organize and categorize your Resolver rules.An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnResolverRule.renderProperties(Map<String, Object> props) voidsetDelegationRecord(String value) DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network.voidsetDomainName(String value) DNS queries for this domain name are forwarded to the IP addresses that are specified inTargetIps.voidThe name for the Resolver rule, which you specified when you created the Resolver rule.voidsetResolverEndpointId(String value) The ID of the endpoint that the rule is associated with.voidsetRuleType(String value) When you want to forward DNS queries for specified domain name to resolvers on your network, specifyFORWARDorDELEGATE.voidsetTagsRaw(List<CfnTag> value) Tags help organize and categorize your Resolver rules.voidsetTargetIps(List<Object> value) An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.voidsetTargetIps(IResolvable value) An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnResolverRule
protected CfnResolverRule(software.amazon.jsii.JsiiObjectRef objRef) -
CfnResolverRule
protected CfnResolverRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnResolverRule
@Stability(Stable) public CfnResolverRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnResolverRuleProps props) Create a newAWS::Route53Resolver::ResolverRule.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForResolverRule
@Stability(Stable) @NotNull public static String arnForResolverRule(@NotNull IResolverRuleRef resource) - Parameters:
resource- This parameter is required.
-
isCfnResolverRule
Checks whether the given object is a CfnResolverRule.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the resolver rule, such asarn:aws:route53resolver:us-east-1:123456789012:resolver-rule/resolver-rule-a1bzhi. -
getAttrDomainName
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).
-
getAttrName
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. -
getAttrResolverEndpointId
The ID of the outbound endpoint that the rule is associated with, such asrslvr-out-fdc049932dexample. -
getAttrResolverRuleId
When the value ofRuleTypeisFORWARD, the ID that Resolver assigned to the resolver rule when you created it, such asrslvr-rr-5328a0899aexample.This value isn't applicable when
RuleTypeisSYSTEM. -
getAttrTargetIps
When the value ofRuleTypeisFORWARD, the IP addresses that the outbound endpoint forwards DNS queries to, typically the IP addresses for DNS resolvers on your network.This value isn't applicable when
RuleTypeisSYSTEM.TargetIpsis available only when the value ofRuleTypeisFORWARD. You should not provideTargetIpswhen theRuleTypeisDELEGATE. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getResolverRuleRef
A reference to a ResolverRule resource.- Specified by:
getResolverRuleRefin interfaceIResolverRuleRef
-
getTags
Tag Manager which manages the tags for this resource. -
getRuleType
When you want to forward DNS queries for specified domain name to resolvers on your network, specifyFORWARDorDELEGATE. -
setRuleType
When you want to forward DNS queries for specified domain name to resolvers on your network, specifyFORWARDorDELEGATE. -
getDelegationRecord
DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network. -
setDelegationRecord
DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network. -
getDomainName
DNS queries for this domain name are forwarded to the IP addresses that are specified inTargetIps. -
setDomainName
DNS queries for this domain name are forwarded to the IP addresses that are specified inTargetIps. -
getName
The name for the Resolver rule, which you specified when you created the Resolver rule. -
setName
The name for the Resolver rule, which you specified when you created the Resolver rule. -
getResolverEndpointId
The ID of the endpoint that the rule is associated with. -
setResolverEndpointId
The ID of the endpoint that the rule is associated with. -
getTagsRaw
Tags help organize and categorize your Resolver rules. -
setTagsRaw
Tags help organize and categorize your Resolver rules. -
getTargetIps
An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnResolverRule.TargetAddressProperty> -
setTargetIps
An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. -
setTargetIps
An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to.
-