Class CfnRecordSet

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:12.954Z") @Stability(Stable) public class CfnRecordSet extends CfnResource implements IInspectable
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 Classes
    Modifier and Type
    Class
    Description
    static interface 
    Alias 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 class 
    A fluent builder for CfnRecordSet.
    static interface 
    The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
    static interface 
    A complex type that lists the coordinates for a geoproximity resource record.
    static interface 
    A 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.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default

    Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable

    IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The CloudFormation resource type name for this resource class.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CfnRecordSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    CfnRecordSet(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    CfnRecordSet(software.constructs.Construct scope, String id, CfnRecordSetProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth.
    protected Map<String,Object>
     
    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 the Failover element 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 the HealthCheckId element 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 specify true for MultiValueAnswer .
    For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete.
    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 the Type property.
    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.
    The resource record cache time to live (TTL), in seconds.
    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.
    void
    Examines the CloudFormation resource and discloses attributes.
    protected Map<String,Object>
     
    void
    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.
    void
    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.
    void
    The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
    void
    The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
    void
    Optional: Any comments you want to include about a change batch request.
    void
    Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets.
    void
    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.
    void
    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.
    void
    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.
    void
    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.
    void
    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 the HealthCheckId element and specify the ID of the applicable health check.
    void
    The ID of the hosted zone that you want to create records in.
    void
    The name of the hosted zone that you want to create records in.
    void
    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 specify true for MultiValueAnswer .
    void
    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 specify true for MultiValueAnswer .
    void
    setName(String value)
    For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete.
    void
    Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to.
    void
    One or more values that correspond with the value that you specified for the Type property.
    void
    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.
    void
    setTtl(String value)
    The resource record cache time to live (TTL), in seconds.
    void
    setType(String value)
    The DNS record type.
    void
    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.

    Methods inherited from class software.amazon.awscdk.CfnRefElement

    getRef

    Methods inherited from class software.amazon.awscdk.CfnElement

    getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getName

      @Stability(Stable) @NotNull public String getName()
      For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The DNS record type.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The DNS record type.
    • getAliasTarget

      @Stability(Stable) @Nullable public Object 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

      @Stability(Stable) public void setAliasTarget(@Nullable 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.
    • setAliasTarget

      @Stability(Stable) public void setAliasTarget(@Nullable CfnRecordSet.AliasTargetProperty 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.
    • getCidrRoutingConfig

      @Stability(Stable) @Nullable public Object getCidrRoutingConfig()
      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 IResolvable value)
      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

      @Stability(Stable) @Nullable public String getComment()
      Optional: Any comments you want to include about a change batch request.
    • setComment

      @Stability(Stable) public void setComment(@Nullable String value)
      Optional: Any comments you want to include about a change batch request.
    • getFailover

      @Stability(Stable) @Nullable public String getFailover()
      Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets.
    • setFailover

      @Stability(Stable) public void setFailover(@Nullable String value)
      Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets.
    • getGeoLocation

      @Stability(Stable) @Nullable public Object 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

      @Stability(Stable) public void setGeoLocation(@Nullable 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.
    • setGeoLocation

      @Stability(Stable) public void setGeoLocation(@Nullable CfnRecordSet.GeoLocationProperty 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.
    • getGeoProximityLocation

      @Stability(Stable) @Nullable public Object 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

      @Stability(Stable) public void setGeoProximityLocation(@Nullable IResolvable 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.
    • 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

      @Stability(Stable) @Nullable public String 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 the HealthCheckId element and specify the ID of the applicable health check.
    • setHealthCheckId

      @Stability(Stable) public void setHealthCheckId(@Nullable 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 the HealthCheckId element and specify the ID of the applicable health check.
    • getHostedZoneId

      @Stability(Stable) @Nullable public String getHostedZoneId()
      The ID of the hosted zone that you want to create records in.
    • setHostedZoneId

      @Stability(Stable) public void setHostedZoneId(@Nullable String value)
      The ID of the hosted zone that you want to create records in.
    • getHostedZoneName

      @Stability(Stable) @Nullable public String getHostedZoneName()
      The name of the hosted zone that you want to create records in.
    • setHostedZoneName

      @Stability(Stable) public void setHostedZoneName(@Nullable String value)
      The name of the hosted zone that you want to create records in.
    • getMultiValueAnswer

      @Stability(Stable) @Nullable public Object 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 specify true for MultiValueAnswer .
    • setMultiValueAnswer

      @Stability(Stable) public void setMultiValueAnswer(@Nullable 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 specify true for MultiValueAnswer .
    • setMultiValueAnswer

      @Stability(Stable) public void setMultiValueAnswer(@Nullable 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 specify true for MultiValueAnswer .
    • getRegion

      @Stability(Stable) @Nullable public String getRegion()
      Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to.
    • setRegion

      @Stability(Stable) public void setRegion(@Nullable String value)
      Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to.
    • getResourceRecords

      @Stability(Stable) @Nullable public List<String> getResourceRecords()
      One or more values that correspond with the value that you specified for the Type property.
    • setResourceRecords

      @Stability(Stable) public void setResourceRecords(@Nullable List<String> value)
      One or more values that correspond with the value that you specified for the Type property.
    • getSetIdentifier

      @Stability(Stable) @Nullable public String 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 of SetIdentifier must be unique for each resource record set.
    • setSetIdentifier

      @Stability(Stable) public void setSetIdentifier(@Nullable 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. In a group of resource record sets that have the same name and type, the value of SetIdentifier must be unique for each resource record set.
    • getTtl

      @Stability(Stable) @Nullable public String getTtl()
      The resource record cache time to live (TTL), in seconds.

      Note the following:.

    • setTtl

      @Stability(Stable) public void setTtl(@Nullable String value)
      The resource record cache time to live (TTL), in seconds.

      Note the following:.

    • getWeight

      @Stability(Stable) @Nullable public Number 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

      @Stability(Stable) public void setWeight(@Nullable Number value)
      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.