Class CfnRecordSet
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.route53.CfnRecordSet
- All Implemented Interfaces:
IInspectable,IRecordSetRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:19.295Z")
@Stability(Stable)
public class CfnRecordSet
extends CfnResource
implements IInspectable, IRecordSetRef
Information about the record that you want to create.
The AWS::Route53::RecordSet type can be used as a standalone resource or as an embedded property in the AWS::Route53::RecordSetGroup type. Note that some AWS::Route53::RecordSet properties are valid only when used within AWS::Route53::RecordSetGroup .
For more information, see ChangeResourceRecordSets in the Amazon Route 53 API Reference .
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.route53.*;
CfnRecordSet cfnRecordSet = CfnRecordSet.Builder.create(this, "MyCfnRecordSet")
.name("name")
.type("type")
// the properties below are optional
.aliasTarget(AliasTargetProperty.builder()
.dnsName("dnsName")
.hostedZoneId("hostedZoneId")
// the properties below are optional
.evaluateTargetHealth(false)
.build())
.cidrRoutingConfig(CidrRoutingConfigProperty.builder()
.collectionId("collectionId")
.locationName("locationName")
.build())
.comment("comment")
.failover("failover")
.geoLocation(GeoLocationProperty.builder()
.continentCode("continentCode")
.countryCode("countryCode")
.subdivisionCode("subdivisionCode")
.build())
.geoProximityLocation(GeoProximityLocationProperty.builder()
.awsRegion("awsRegion")
.bias(123)
.coordinates(CoordinatesProperty.builder()
.latitude("latitude")
.longitude("longitude")
.build())
.localZoneGroup("localZoneGroup")
.build())
.healthCheckId("healthCheckId")
.hostedZoneId("hostedZoneId")
.hostedZoneName("hostedZoneName")
.multiValueAnswer(false)
.region("region")
.resourceRecords(List.of("resourceRecords"))
.setIdentifier("setIdentifier")
.ttl("ttl")
.weight(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAlias records only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.static final classA fluent builder forCfnRecordSet.static interfaceThe object that is specified in resource record set object when you are linking a resource record set to a CIDR location.static interfaceA complex type that lists the coordinates for a geoproximity resource record.static interfaceA complex type that contains information about a geographic location.static interface(Resource record sets only): A complex type that lets you specify where your resources are located.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.services.route53.IRecordSetRef
IRecordSetRef.Jsii$Default, IRecordSetRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnRecordSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRecordSet(software.amazon.jsii.JsiiObjectRef objRef) CfnRecordSet(software.constructs.Construct scope, String id, CfnRecordSetProps props) -
Method Summary
Modifier and TypeMethodDescriptionAlias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.This element contains an ID that you use when performing aGetChangeaction to get detailed information about the change.The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.Optional: Any comments you want to include about a change batch request.Failover resource record sets only: To configure failover, you add theFailoverelement to two resource record sets.Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query.GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include theHealthCheckIdelement and specify the ID of the applicable health check.The ID of the hosted zone that you want to create records in.The name of the hosted zone that you want to create records in.Multivalue answer resource record sets only : To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specifytrueforMultiValueAnswer.getName()ForChangeResourceRecordSetsrequests, the name of the record that you want to create, update, or delete.A reference to a RecordSet resource.Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to.One or more values that correspond with the value that you specified for theTypeproperty.Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A.getTtl()The resource record cache time to live (TTL), in seconds.getType()The DNS record type.Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAliasTarget(IResolvable value) Alias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.voidAlias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.voidsetCidrRoutingConfig(IResolvable value) The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.voidThe object that is specified in resource record set object when you are linking a resource record set to a CIDR location.voidsetComment(String value) Optional: Any comments you want to include about a change batch request.voidsetFailover(String value) Failover resource record sets only: To configure failover, you add theFailoverelement to two resource record sets.voidsetGeoLocation(IResolvable value) Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query.voidGeolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query.voidGeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.voidGeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.voidsetHealthCheckId(String value) If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include theHealthCheckIdelement and specify the ID of the applicable health check.voidsetHostedZoneId(String value) The ID of the hosted zone that you want to create records in.voidsetHostedZoneName(String value) The name of the hosted zone that you want to create records in.voidsetMultiValueAnswer(Boolean value) Multivalue answer resource record sets only : To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specifytrueforMultiValueAnswer.voidsetMultiValueAnswer(IResolvable value) Multivalue answer resource record sets only : To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specifytrueforMultiValueAnswer.voidForChangeResourceRecordSetsrequests, the name of the record that you want to create, update, or delete.voidLatency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to.voidsetResourceRecords(List<String> value) One or more values that correspond with the value that you specified for theTypeproperty.voidsetSetIdentifier(String value) Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A.voidThe resource record cache time to live (TTL), in seconds.voidThe DNS record type.voidWeighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, 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.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRecordSet
protected CfnRecordSet(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRecordSet
protected CfnRecordSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRecordSet
@Stability(Stable) public CfnRecordSet(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRecordSetProps props) - 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
-
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.
-
getAttrId
This element contains an ID that you use when performing aGetChangeaction to get detailed information about the change. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getRecordSetRef
A reference to a RecordSet resource.- Specified by:
getRecordSetRefin interfaceIRecordSetRef
-
getName
ForChangeResourceRecordSetsrequests, the name of the record that you want to create, update, or delete. -
setName
ForChangeResourceRecordSetsrequests, the name of the record that you want to create, update, or delete. -
getType
The DNS record type. -
setType
The DNS record type. -
getAliasTarget
Alias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to. -
setAliasTarget
Alias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to. -
setAliasTarget
Alias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to. -
getCidrRoutingConfig
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location. -
setCidrRoutingConfig
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location. -
setCidrRoutingConfig
@Stability(Stable) public void setCidrRoutingConfig(@Nullable CfnRecordSet.CidrRoutingConfigProperty value) The object that is specified in resource record set object when you are linking a resource record set to a CIDR location. -
getComment
Optional: Any comments you want to include about a change batch request. -
setComment
Optional: Any comments you want to include about a change batch request. -
getFailover
Failover resource record sets only: To configure failover, you add theFailoverelement to two resource record sets. -
setFailover
Failover resource record sets only: To configure failover, you add theFailoverelement to two resource record sets. -
getGeoLocation
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. -
setGeoLocation
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. -
setGeoLocation
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. -
getGeoProximityLocation
GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources. -
setGeoProximityLocation
GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources. -
setGeoProximityLocation
@Stability(Stable) public void setGeoProximityLocation(@Nullable CfnRecordSet.GeoProximityLocationProperty value) GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources. -
getHealthCheckId
If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include theHealthCheckIdelement and specify the ID of the applicable health check. -
setHealthCheckId
If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include theHealthCheckIdelement and specify the ID of the applicable health check. -
getHostedZoneId
The ID of the hosted zone that you want to create records in. -
setHostedZoneId
The ID of the hosted zone that you want to create records in. -
getHostedZoneName
The name of the hosted zone that you want to create records in. -
setHostedZoneName
The name of the hosted zone that you want to create records in. -
getMultiValueAnswer
Multivalue answer resource record sets only : To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specifytrueforMultiValueAnswer. -
setMultiValueAnswer
Multivalue answer resource record sets only : To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specifytrueforMultiValueAnswer. -
setMultiValueAnswer
Multivalue answer resource record sets only : To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specifytrueforMultiValueAnswer. -
getRegion
Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. -
setRegion
Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. -
getResourceRecords
One or more values that correspond with the value that you specified for theTypeproperty. -
setResourceRecords
One or more values that correspond with the value that you specified for theTypeproperty. -
getSetIdentifier
Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value ofSetIdentifiermust be unique for each resource record set. -
setSetIdentifier
Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value ofSetIdentifiermust be unique for each resource record set. -
getTtl
The resource record cache time to live (TTL), in seconds.Note the following:.
-
setTtl
The resource record cache time to live (TTL), in seconds.Note the following:.
-
getWeight
Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set. -
setWeight
Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set.
-