The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.Route53

Inherits:
AWS.Service show all
Identifier:
route53
API Version:
2013-04-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.

You can use Route 53 to:

Sending a Request Using Route53

var route53 = new AWS.Route53();
route53.activateKeySigningKey(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Route53 object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var route53 = new AWS.Route53({apiVersion: '2013-04-01'});

You can also set the API version globally in AWS.config.apiVersions using the route53 service identifier:

AWS.config.apiVersions = {
  route53: '2013-04-01',
  // other service API versions
};

var route53 = new AWS.Route53();

Version:

  • 2013-04-01

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

resourceRecordSetsChanged

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, defineService

Constructor Details

new AWS.Route53(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Route53 object

var route53 = new AWS.Route53({apiVersion: '2013-04-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Route53.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Route53.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Route53.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

activateKeySigningKey(params = {}, callback) ⇒ AWS.Request

Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. This operation changes the KSK status to ACTIVE.

Service Reference:

Examples:

Calling the activateKeySigningKey operation

var params = {
  HostedZoneId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE' /* required */
};
route53.activateKeySigningKey(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HostedZoneId — (String)

      A unique string used to identify a hosted zone.

    • Name — (String)

      A string used to identify a key-signing key (KSK). Name can include numbers, letters, and underscores (_). Name must be unique for each key-signing key in the same hosted zone.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ChangeInfo — (map)

        A complex type that describes change information about changes made to your hosted zone.

        • Idrequired — (String)

          This element contains an ID that you use when performing a GetChange action to get detailed information about the change.

        • Statusrequired — (String)

          The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.

          Possible values include:
          • "PENDING"
          • "INSYNC"
        • SubmittedAtrequired — (Date)

          The date and time that the change request was submitted in ISO 8601 format and Coordinated Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March 27, 2017 at 17:48:16.751 UTC.

        • Comment — (String)

          A comment you can provide.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateVPCWithHostedZone(params = {}, callback) ⇒ AWS.Request

Associates an Amazon VPC with a private hosted zone.

To perform the association, the VPC and the private hosted zone must already exist. You can't convert a public hosted zone into a private hosted zone.

Note: If you want to associate a VPC that was created by using one Amazon Web Services account with a private hosted zone that was created by using a different account, the Amazon Web Services account that created the private hosted zone must first submit a CreateVPCAssociationAuthorization request. Then the account that created the VPC must submit an AssociateVPCWithHostedZone request.
Note: When granting access, the hosted zone and the Amazon VPC must belong to the same partition. A partition is a group of Amazon Web Services Regions. Each Amazon Web Services account is scoped to one partition. The following are the supported partitions:
  • aws - Amazon Web Services Regions
  • aws-cn - China Regions
  • aws-us-gov - Amazon Web Services GovCloud (US) Region
For more information, see Access Management in the Amazon Web Services General Reference.

Service Reference:

Examples:

To associate a VPC with a hosted zone


/* The following example associates the VPC with ID vpc-1a2b3c4d with the hosted zone with ID Z3M3LMPEXAMPLE. */

 var params = {
  Comment: "", 
  HostedZoneId: "Z3M3LMPEXAMPLE", 
  VPC: {
   VPCId: "vpc-1a2b3c4d", 
   VPCRegion: "us-east-2"
  }
 };
 route53.associateVPCWithHostedZone(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "", 
     Id: "/change/C3HC6WDB2UANE2", 
     Status: "INSYNC", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

Calling the associateVPCWithHostedZone operation

var params = {
  HostedZoneId: 'STRING_VALUE', /* required */
  VPC: { /* required */
    VPCId: 'STRING_VALUE',
    VPCRegion: us-east-1 | us-east-2 | us-west-1 | us-west-2 | eu-west-1 | eu-west-2 | eu-west-3 | eu-central-1 | eu-central-2 | ap-east-1 | me-south-1 | us-gov-west-1 | us-gov-east-1 | us-iso-east-1 | us-iso-west-1 | us-isob-east-1 | me-central-1 | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-south-1 | ap-south-2 | ap-northeast-1 | ap-northeast-2 | ap-northeast-3 | eu-north-1 | sa-east-1 | ca-central-1 | cn-north-1 | af-south-1 | eu-south-1 | eu-south-2 | ap-southeast-4 | il-central-1 | ca-west-1 | ap-southeast-5
  },
  Comment: 'STRING_VALUE'
};
route53.associateVPCWithHostedZone(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HostedZoneId — (String)

      The ID of the private hosted zone that you want to associate an Amazon VPC with.

      Note that you can't associate a VPC with a hosted zone that doesn't have an existing VPC association.

    • VPC — (map)

      A complex type that contains information about the VPC that you want to associate with a private hosted zone.

      • VPCRegion — (String)

        (Private hosted zones only) The region that an Amazon VPC was created in.

        Possible values include:
        • "us-east-1"
        • "us-east-2"
        • "us-west-1"
        • "us-west-2"
        • "eu-west-1"
        • "eu-west-2"
        • "eu-west-3"
        • "eu-central-1"
        • "eu-central-2"
        • "ap-east-1"
        • "me-south-1"
        • "us-gov-west-1"
        • "us-gov-east-1"
        • "us-iso-east-1"
        • "us-iso-west-1"
        • "us-isob-east-1"
        • "me-central-1"
        • "ap-southeast-1"
        • "ap-southeast-2"
        • "ap-southeast-3"
        • "ap-south-1"
        • "ap-south-2"
        • "ap-northeast-1"
        • "ap-northeast-2"
        • "ap-northeast-3"
        • "eu-north-1"
        • "sa-east-1"
        • "ca-central-1"
        • "cn-north-1"
        • "af-south-1"
        • "eu-south-1"
        • "eu-south-2"
        • "ap-southeast-4"
        • "il-central-1"
        • "ca-west-1"
        • "ap-southeast-5"
      • VPCId — (String)

        (Private hosted zones only) The ID of an Amazon VPC.

    • Comment — (String)

      Optional: A comment about the association request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ChangeInfo — (map)

        A complex type that describes the changes made to your hosted zone.

        • Idrequired — (String)

          This element contains an ID that you use when performing a GetChange action to get detailed information about the change.

        • Statusrequired — (String)

          The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.

          Possible values include:
          • "PENDING"
          • "INSYNC"
        • SubmittedAtrequired — (Date)

          The date and time that the change request was submitted in ISO 8601 format and Coordinated Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March 27, 2017 at 17:48:16.751 UTC.

        • Comment — (String)

          A comment you can provide.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

changeCidrCollection(params = {}, callback) ⇒ AWS.Request

Creates, changes, or deletes CIDR blocks within a collection. Contains authoritative IP information mapping blocks to one or multiple locations.

A change request can update multiple locations in a collection at a time, which is helpful if you want to move one or more CIDR blocks from one location to another in one transaction, without downtime.

Limits

The max number of CIDR blocks included in the request is 1000. As a result, big updates require multiple API calls.

PUT and DELETE_IF_EXISTS

Use ChangeCidrCollection to perform the following actions:

  • PUT: Create a CIDR block within the specified collection.

  • DELETE_IF_EXISTS: Delete an existing CIDR block from the collection.

Service Reference:

Examples:

Calling the changeCidrCollection operation

var params = {
  Changes: [ /* required */
    {
      Action: PUT | DELETE_IF_EXISTS, /* required */
      CidrList: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      LocationName: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  Id: 'STRING_VALUE', /* required */
  CollectionVersion: 'NUMBER_VALUE'
};
route53.changeCidrCollection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Id — (String)

      The UUID of the CIDR collection to update.

    • CollectionVersion — (Integer)

      A sequential counter that Amazon Route 53 sets to 1 when you create a collection and increments it by 1 each time you update the collection.

      We recommend that you use ListCidrCollection to get the current value of CollectionVersion for the collection that you want to update, and then include that value with the change request. This prevents Route 53 from overwriting an intervening update:

      • If the value in the request matches the value of CollectionVersion in the collection, Route 53 updates the collection.

      • If the value of CollectionVersion in the collection is greater than the value in the request, the collection was changed after you got the version number. Route 53 does not update the collection, and it returns a CidrCollectionVersionMismatch error.

    • Changes — (Array<map>)

      Information about changes to a CIDR collection.

      • LocationNamerequired — (String)

        Name of the location that is associated with the CIDR collection.

      • Actionrequired — (String)

        CIDR collection change action.

        Possible values include:
        • "PUT"
        • "DELETE_IF_EXISTS"
      • CidrListrequired — (Array<String>)

        List of CIDR blocks.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Id — (String)

        The ID that is returned by ChangeCidrCollection. You can use it as input to GetChange to see if a CIDR collection change has propagated or not.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

changeResourceRecordSets(params = {}, callback) ⇒ AWS.Request

Creates, changes, or deletes a resource record set, which contains authoritative DNS information for a specified domain name or subdomain name. For example, you can use ChangeResourceRecordSets to create a resource record set that routes traffic for test.example.com to a web server that has an IP address of 192.0.2.44.

Deleting Resource Record Sets

To delete a resource record set, you must specify all the same values that you specified when you created it.

Change Batches and Transactional Changes

The request body must include a document with a ChangeResourceRecordSetsRequest element. The request body contains a list of change items, known as a change batch. Change batches are considered transactional changes. Route 53 validates the changes in the request and then either makes all or none of the changes in the change batch request. This ensures that DNS routing isn't adversely affected by partial changes to the resource record sets in a hosted zone.

For example, suppose a change batch request contains two changes: it deletes the CNAME resource record set for www.example.com and creates an alias resource record set for www.example.com. If validation for both records succeeds, Route 53 deletes the first resource record set and creates the second resource record set in a single operation. If validation for either the DELETE or the CREATE action fails, then the request is canceled, and the original CNAME record continues to exist.

Note: If you try to delete the same resource record set more than once in a single change batch, Route 53 returns an InvalidChangeBatch error.

Traffic Flow

To create resource record sets for complex routing configurations, use either the traffic flow visual editor in the Route 53 console or the API actions for traffic policies and traffic policy instances. Save the configuration as a traffic policy, then associate the traffic policy with one or more domain names (such as example.com) or subdomain names (such as www.example.com), in the same hosted zone or in multiple hosted zones. You can roll back the updates if the new configuration isn't performing as expected. For more information, see Using Traffic Flow to Route DNS Traffic in the Amazon Route 53 Developer Guide.

Create, Delete, and Upsert

Use ChangeResourceRecordsSetsRequest to perform the following actions:

  • CREATE: Creates a resource record set that has the specified values.

  • DELETE: Deletes an existing resource record set that has the specified values.

  • UPSERT: If a resource set doesn't exist, Route 53 creates it. If a resource set exists Route 53 updates it with the values in the request.

Syntaxes for Creating, Updating, and Deleting Resource Record Sets

The syntax for a request depends on the type of resource record set that you want to create, delete, or update, such as weighted, alias, or failover. The XML elements in your request must appear in the order listed in the syntax.

For an example for each type of resource record set, see "Examples."

Don't refer to the syntax in the "Parameter Syntax" section, which includes all of the elements for every kind of resource record set that you can create, delete, or update by using ChangeResourceRecordSets.

Change Propagation to Route 53 DNS Servers

When you submit a ChangeResourceRecordSets request, Route 53 propagates your changes to all of the Route 53 authoritative DNS servers managing the hosted zone. While your changes are propagating, GetChange returns a status of PENDING. When propagation is complete, GetChange returns a status of INSYNC. Changes generally propagate to all Route 53 name servers managing the hosted zone within 60 seconds. For more information, see GetChange.

Limits on ChangeResourceRecordSets Requests

For information about the limits on a ChangeResourceRecordSets request, see Limits in the Amazon Route 53 Developer Guide.

Service Reference:

Examples:

To create a basic resource record set


/* The following example creates a resource record set that routes Internet traffic to a resource with an IP address of 192.0.2.44. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.44"
       }
      ], 
      TTL: 60, 
      Type: "A"
     }
    }
   ], 
   Comment: "Web server for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "Web server for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create weighted resource record sets


/* The following example creates two weighted resource record sets. The resource with a Weight of 100 will get 1/3rd of traffic (100/100+200), and the other resource will get the rest of the traffic for example.com. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      HealthCheckId: "abcdef11-2222-3333-4444-555555fedcba", 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.44"
       }
      ], 
      SetIdentifier: "Seattle data center", 
      TTL: 60, 
      Type: "A", 
      Weight: 100
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      HealthCheckId: "abcdef66-7777-8888-9999-000000fedcba", 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.45"
       }
      ], 
      SetIdentifier: "Portland data center", 
      TTL: 60, 
      Type: "A", 
      Weight: 200
     }
    }
   ], 
   Comment: "Web servers for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "Web servers for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create an alias resource record set


/* The following example creates an alias resource record set that routes traffic to a CloudFront distribution. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "d123rk29d0stfj.cloudfront.net", 
       EvaluateTargetHealth: false, 
       HostedZoneId: "Z2FDTNDATAQYW2"
      }, 
      Name: "example.com", 
      Type: "A"
     }
    }
   ], 
   Comment: "CloudFront distribution for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"// Depends on the type of resource that you want to route traffic to
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "CloudFront distribution for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create weighted alias resource record sets


/* The following example creates two weighted alias resource record sets that route traffic to ELB load balancers. The resource with a Weight of 100 will get 1/3rd of traffic (100/100+200), and the other resource will get the rest of the traffic for example.com. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-123456789.us-east-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z3AADJGX6KTTL2"
      }, 
      Name: "example.com", 
      SetIdentifier: "Ohio region", 
      Type: "A", 
      Weight: 100
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-987654321.us-west-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z1H1FL5HABSF5"
      }, 
      Name: "example.com", 
      SetIdentifier: "Oregon region", 
      Type: "A", 
      Weight: 200
     }
    }
   ], 
   Comment: "ELB load balancers for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"// Depends on the type of resource that you want to route traffic to
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "ELB load balancers for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create latency resource record sets


/* The following example creates two latency resource record sets that route traffic to EC2 instances. Traffic for example.com is routed either to the Ohio region or the Oregon region, depending on the latency between the user and those regions. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      HealthCheckId: "abcdef11-2222-3333-4444-555555fedcba", 
      Name: "example.com", 
      Region: "us-east-2", 
      ResourceRecords: [
         {
        Value: "192.0.2.44"
       }
      ], 
      SetIdentifier: "Ohio region", 
      TTL: 60, 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      HealthCheckId: "abcdef66-7777-8888-9999-000000fedcba", 
      Name: "example.com", 
      Region: "us-west-2", 
      ResourceRecords: [
         {
        Value: "192.0.2.45"
       }
      ], 
      SetIdentifier: "Oregon region", 
      TTL: 60, 
      Type: "A"
     }
    }
   ], 
   Comment: "EC2 instances for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "EC2 instances for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create latency alias resource record sets


/* The following example creates two latency alias resource record sets that route traffic for example.com to ELB load balancers. Requests are routed either to the Ohio region or the Oregon region, depending on the latency between the user and those regions. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-123456789.us-east-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z3AADJGX6KTTL2"
      }, 
      Name: "example.com", 
      Region: "us-east-2", 
      SetIdentifier: "Ohio region", 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-987654321.us-west-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z1H1FL5HABSF5"
      }, 
      Name: "example.com", 
      Region: "us-west-2", 
      SetIdentifier: "Oregon region", 
      Type: "A"
     }
    }
   ], 
   Comment: "ELB load balancers for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"// Depends on the type of resource that you want to route traffic to
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "ELB load balancers for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create failover resource record sets


/* The following example creates primary and secondary failover resource record sets that route traffic to EC2 instances. Traffic is generally routed to the primary resource, in the Ohio region. If that resource is unavailable, traffic is routed to the secondary resource, in the Oregon region. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      Failover: "PRIMARY", 
      HealthCheckId: "abcdef11-2222-3333-4444-555555fedcba", 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.44"
       }
      ], 
      SetIdentifier: "Ohio region", 
      TTL: 60, 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      Failover: "SECONDARY", 
      HealthCheckId: "abcdef66-7777-8888-9999-000000fedcba", 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.45"
       }
      ], 
      SetIdentifier: "Oregon region", 
      TTL: 60, 
      Type: "A"
     }
    }
   ], 
   Comment: "Failover configuration for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "Failover configuration for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create failover alias resource record sets


/* The following example creates primary and secondary failover alias resource record sets that route traffic to ELB load balancers. Traffic is generally routed to the primary resource, in the Ohio region. If that resource is unavailable, traffic is routed to the secondary resource, in the Oregon region. */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-123456789.us-east-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z3AADJGX6KTTL2"
      }, 
      Failover: "PRIMARY", 
      Name: "example.com", 
      SetIdentifier: "Ohio region", 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-987654321.us-west-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z1H1FL5HABSF5"
      }, 
      Failover: "SECONDARY", 
      Name: "example.com", 
      SetIdentifier: "Oregon region", 
      Type: "A"
     }
    }
   ], 
   Comment: "Failover alias configuration for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"// Depends on the type of resource that you want to route traffic to
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "Failover alias configuration for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create geolocation resource record sets


/* The following example creates four geolocation resource record sets that use IPv4 addresses to route traffic to resources such as web servers running on EC2 instances. Traffic is routed to one of four IP addresses, for North America (NA), for South America (SA), for Europe (EU), and for all other locations (*). */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      GeoLocation: {
       ContinentCode: "NA"
      }, 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.44"
       }
      ], 
      SetIdentifier: "North America", 
      TTL: 60, 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      GeoLocation: {
       ContinentCode: "SA"
      }, 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.45"
       }
      ], 
      SetIdentifier: "South America", 
      TTL: 60, 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      GeoLocation: {
       ContinentCode: "EU"
      }, 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.46"
       }
      ], 
      SetIdentifier: "Europe", 
      TTL: 60, 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      GeoLocation: {
       CountryCode: "*"
      }, 
      Name: "example.com", 
      ResourceRecords: [
         {
        Value: "192.0.2.47"
       }
      ], 
      SetIdentifier: "Other locations", 
      TTL: 60, 
      Type: "A"
     }
    }
   ], 
   Comment: "Geolocation configuration for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "Geolocation configuration for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

To create geolocation alias resource record sets


/* The following example creates four geolocation alias resource record sets that route traffic to ELB load balancers. Traffic is routed to one of four IP addresses, for North America (NA), for South America (SA), for Europe (EU), and for all other locations (*). */

 var params = {
  ChangeBatch: {
   Changes: [
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-123456789.us-east-2.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z3AADJGX6KTTL2"
      }, 
      GeoLocation: {
       ContinentCode: "NA"
      }, 
      Name: "example.com", 
      SetIdentifier: "North America", 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-234567890.sa-east-1.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z2P70J7HTTTPLU"
      }, 
      GeoLocation: {
       ContinentCode: "SA"
      }, 
      Name: "example.com", 
      SetIdentifier: "South America", 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-234567890.eu-central-1.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z215JYRZR1TBD5"
      }, 
      GeoLocation: {
       ContinentCode: "EU"
      }, 
      Name: "example.com", 
      SetIdentifier: "Europe", 
      Type: "A"
     }
    }, 
      {
     Action: "CREATE", 
     ResourceRecordSet: {
      AliasTarget: {
       DNSName: "example-com-234567890.ap-southeast-1.elb.amazonaws.com ", 
       EvaluateTargetHealth: true, 
       HostedZoneId: "Z1LMS91P8CMLE5"
      }, 
      GeoLocation: {
       CountryCode: "*"
      }, 
      Name: "example.com", 
      SetIdentifier: "Other locations", 
      Type: "A"
     }
    }
   ], 
   Comment: "Geolocation alias configuration for example.com"
  }, 
  HostedZoneId: "Z3M3LMPEXAMPLE"// Depends on the type of resource that you want to route traffic to
 };
 route53.changeResourceRecordSets(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    ChangeInfo: {
     Comment: "Geolocation alias configuration for example.com", 
     Id: "/change/C2682N5HXP0BZ4", 
     Status: "PENDING", 
     SubmittedAt: <Date Representation>
    }
   }
   */
 });

Calling the changeResourceRecordSets operation

var params = {
  ChangeBatch: { /* required */
    Changes: [ /* required */
      {
        Action: CREATE | DELETE | UPSERT, /* required */
        ResourceRecordSet: { /* required */
          Name: 'STRING_VALUE', /* required */
          Type: SOA | A | TXT | NS | CNAME | MX | NAPTR | PTR | SRV | SPF | AAAA | CAA | DS, /* required */
          AliasTarget: {
            DNSName: 'STRING_VALUE', /* required */
            EvaluateTargetHealth: true || false, /* required */
            HostedZoneId: 'STRING_VALUE' /* required */
          },
          CidrRoutingConfig: {
            CollectionId: 'STRING_VALUE', /* required */
            LocationName: 'STRING_VALUE' /* required */
          },
          Failover: PRIMARY | SECONDARY,
          GeoLocation: {
            ContinentCode: 'STRING_VALUE',
            CountryCode: 'STRING_VALUE',
            SubdivisionCode: 'STRING_VALUE'
          },
          GeoProximityLocation: {
            AWSRegion: 'STRING_VALUE',
            Bias: 'NUMBER_VALUE',
            Coordinates: {
              Latitude: 'STRING_VALUE', /* required */
              Longitude: 'STRING_VALUE' /* required */
            },
            LocalZoneGroup: 'STRING_VALUE'
          },
          HealthCheckId: 'STRING_VALUE',
          MultiValueAnswer: true || false,
          Region: us-east-1 | us-east-2 | us-west-1 | us-west-2 | ca-central-1 | eu-west-1 | eu-west-2 | eu-west-3 | eu-central-1 | eu-central-2 | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-northeast-1 | ap-northeast-2 | ap-northeast-3 | eu-north-1 | sa-east-1 | cn-north-1 | cn-northwest-1 | ap-east-1 | me-south-1 | me-central-1 | ap-south-1 | ap-south-2 | af-south-1 | eu-south-1 | eu-south-2 | ap-southeast-4 | il-central-1 | ca-west-1 | ap-southeast-5,
          ResourceRecords: [
            {
              Value: 'STRING_VALUE' /* required */
            },
            /* more items */
          ],
          SetIdentifier: 'STRING_VALUE',
          TTL: 'NUMBER_VALUE',
          TrafficPolicyInstanceId: 'STRING_VALUE',
          Weight: 'NUMBER_VALUE'
        }
      },
      /* more items */
    ],
    Comment: 'STRING_VALUE'
  },
  HostedZoneId: 'STRING_VALUE' /* required */
};
route53.changeResourceRecordSets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HostedZoneId — (String)

      The ID of the hosted zone that contains the resource record sets that you want to change.

    • ChangeBatch — (map)

      A complex type that contains an optional comment and the Changes element.

      • Comment — (String)

        Optional: Any comments you want to include about a change batch request.

      • Changesrequired — (Array<map>)

        Information about the changes to make to the record sets.

        • Actionrequired — (String)

          The action to perform:

          • CREATE: Creates a resource record set that has the specified values.

          • DELETE: Deletes a existing resource record set.

            To delete the resource record set that is associated with a traffic policy instance, use DeleteTrafficPolicyInstance. Amazon Route 53 will delete the resource record set automatically. If you delete the resource record set by using ChangeResourceRecordSets, Route 53 doesn't automatically delete the traffic policy instance, and you'll continue to be charged for it even though it's no longer in use.

          • UPSERT: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.

          Possible values include:
          • "CREATE"
          • "DELETE"
          • "UPSERT"
        • ResourceRecordSetrequired — (map)

          Information about the resource record set to create, delete, or update.

          • Namerequired — (String)

            For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete. For ListResourceRecordSets responses, the name of a record in the specified hosted zone.

            ChangeResourceRecordSets Only

            Enter a fully qualified domain name, for example, www.example.com. You can optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

            For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see DNS Domain Name Format in the Amazon Route 53 Developer Guide.

            You can use the asterisk () wildcard to replace the leftmost label in a domain name, for example, *.example.com. Note the following:

            • The * must replace the entire label. For example, you can't specify *prod.example.com or prod*.example.com.

            • The * can't replace any of the middle labels, for example, marketing..example.com.

            • If you include * in any position other than the leftmost label in a domain name, DNS treats it as an * character (ASCII 42), not as a wildcard.

              You can't use the * wildcard for resource records sets that have a type of NS.

          • Typerequired — (String)

            The DNS record type. For information about different record types and how data is encoded for them, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.

            Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS |MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT

            Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT. When creating a group of weighted, latency, geolocation, or failover resource record sets, specify the same value for all of the resource record sets in the group.

            Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR | PTR | SPF | SRV | TXT

            Note: SPF records were formerly used to verify the identity of the sender of email messages. However, we no longer recommend that you create resource record sets for which the value of Type is SPF. RFC 7208, Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1, has been updated to say, "...[I]ts existence and mechanism defined in [RFC4408] have led to some interoperability issues. Accordingly, its use is no longer appropriate for SPF version 1; implementations are not to use it." In RFC 7208, see section 14.1, The SPF DNS Record Type.

            Values for alias resource record sets:

            • Amazon API Gateway custom regional APIs and edge-optimized APIs: A

            • CloudFront distributions: A

              If IPv6 is enabled for the distribution, create two resource record sets to route traffic to your distribution, one with a value of A and one with a value of AAAA.

            • Amazon API Gateway environment that has a regionalized subdomain: A

            • ELB load balancers: A | AAAA

            • Amazon S3 buckets: A

            • Amazon Virtual Private Cloud interface VPC endpoints A

            • Another resource record set in this hosted zone: Specify the type of the resource record set that you're creating the alias for. All values are supported except NS and SOA.

              Note: If you're creating an alias record that has the same name as the hosted zone (known as the zone apex), you can't route traffic to a record for which the value of Type is CNAME. This is because the alias record must have the same type as the record you're routing traffic to, and creating a CNAME record for the zone apex isn't supported even for an alias record.
            Possible values include:
            • "SOA"
            • "A"
            • "TXT"
            • "NS"
            • "CNAME"
            • "MX"
            • "NAPTR"
            • "PTR"
            • "SRV"
            • "SPF"
            • "AAAA"
            • "CAA"
            • "DS"
          • SetIdentifier — (String)

            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.

            For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide.

          • Weight — (Integer)

            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. Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Route 53 then responds to queries based on the ratio of a resource's weight to the total. Note the following:

            • You must specify a value for the Weight element for every weighted resource record set.

            • You can only specify one ResourceRecord per weighted resource record set.

            • You can't create latency, failover, or geolocation resource record sets that have the same values for the Name and Type elements as weighted resource record sets.

            • You can create a maximum of 100 weighted resource record sets that have the same values for the Name and Type elements.

            • For weighted (but not weighted alias) resource record sets, if you set Weight to 0 for a resource record set, Route 53 never responds to queries with the applicable value for that resource record set. However, if you set Weight to 0 for all resource record sets that have the same combination of DNS name and type, traffic is routed to all resources with equal probability.

              The effect of setting Weight to 0 is different when you associate health checks with weighted resource record sets. For more information, see Options for Configuring Route 53 Active-Active and Active-Passive Failover in the Amazon Route 53 Developer Guide.

          • Region — (String)

            Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. The resource typically is an Amazon Web Services resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type.

            When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set.

            Note the following:

            • You can only specify one ResourceRecord per latency resource record set.

            • You can only create one latency resource record set for each Amazon EC2 Region.

            • You aren't required to create latency resource record sets for all Amazon EC2 Regions. Route 53 will choose the region with the best latency from among the regions that you create latency resource record sets for.

            • You can't create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.

            Possible values include:
            • "us-east-1"
            • "us-east-2"
            • "us-west-1"
            • "us-west-2"
            • "ca-central-1"
            • "eu-west-1"
            • "eu-west-2"
            • "eu-west-3"
            • "eu-central-1"
            • "eu-central-2"
            • "ap-southeast-1"
            • "ap-southeast-2"
            • "ap-southeast-3"
            • "ap-northeast-1"
            • "ap-northeast-2"
            • "ap-northeast-3"
            • "eu-north-1"
            • "sa-east-1"
            • "cn-north-1"
            • "cn-northwest-1"
            • "ap-east-1"
            • "me-south-1"
            • "me-central-1"
            • "ap-south-1"
            • "ap-south-2"
            • "af-south-1"
            • "eu-south-1"
            • "eu-south-2"
            • "ap-southeast-4"
            • "il-central-1"
            • "ca-west-1"
            • "ap-southeast-5"
          • GeoLocation — (map)

            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. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF.

            If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource.

            You can't create two geolocation resource record sets that specify the same geographic location.

            The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements.

            Geolocation works by mapping IP addresses to locations. However, some IP addresses aren't mapped to geographic locations, so even if you create geolocation resource record sets that cover all seven continents, Route 53 will receive some DNS queries from locations that it can't identify. We recommend that you create a resource record set for which the value of CountryCode is *. Two groups of queries are routed to the resource that you specify in this record: queries that come from locations for which you haven't created geolocation resource record sets and queries from IP addresses that aren't mapped to a location. If you don't create a * resource record set, Route 53 returns a "no answer" response for queries from those locations.

            You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets.

            • ContinentCode — (String)

              The two-letter code for the continent.

              Amazon Route 53 supports the following continent codes:

              • AF: Africa

              • AN: Antarctica

              • AS: Asia

              • EU: Europe

              • OC: Oceania