2015/12/04 - Amazon Route 53 - 18 new2 updated api methods
Gets information about a specific traffic policy version. To get the information, send a GET request to the 2013-04-01/trafficpolicy resource.
Request Syntax
client.get_traffic_policy( Id='string', Version=123 )
string
[REQUIRED]
The ID of the traffic policy that you want to get information about.
integer
[REQUIRED]
The version number of the traffic policy that you want to get information about.
dict
Response Syntax
{ 'TrafficPolicy': { 'Id': 'string', 'Version': 123, 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'Document': 'string', 'Comment': 'string' } }
Response Structure
(dict) --
A complex type that contains the response information for the request.
TrafficPolicy (dict) --
A complex type that contains settings for the specified traffic policy.
Id (string) --
Version (integer) --
Name (string) --
Type (string) --
Document (string) --
Comment (string) --
Updates the resource record sets in a specified hosted zone that were created based on the settings in a specified traffic policy version.
When you update a traffic policy instance, Amazon Route 53 continues to respond to DNS queries for the root resource record set name (such as example.com) while it replaces one group of resource record sets with another. Amazon Route 53 performs the following operations:
Amazon Route 53 creates a new group of resource record sets based on the specified traffic policy. This is true regardless of how substantial the differences are between the existing resource record sets and the new resource record sets.
When all of the new resource record sets have been created, Amazon Route 53 starts to respond to DNS queries for the root resource record set name (such as example.com) by using the new resource record sets.
Amazon Route 53 deletes the old group of resource record sets that are associated with the root resource record set name.
To update a traffic policy instance, send a POST request to the /2013-04-01/trafficpolicyinstance/traffic policy ID resource. The request body must include an XML document with an UpdateTrafficPolicyInstanceRequest element.
Request Syntax
client.update_traffic_policy_instance( Id='string', TTL=123, TrafficPolicyId='string', TrafficPolicyVersion=123 )
string
[REQUIRED]
The ID of the traffic policy instance that you want to update.
integer
[REQUIRED]
The TTL that you want Amazon Route 53 to assign to all of the updated resource record sets.
string
[REQUIRED]
The ID of the traffic policy that you want Amazon Route 53 to use to update resource record sets for the specified traffic policy instance.
integer
[REQUIRED]
The version of the traffic policy that you want Amazon Route 53 to use to update resource record sets for the specified traffic policy instance.
dict
Response Syntax
{ 'TrafficPolicyInstance': { 'Id': 'string', 'HostedZoneId': 'string', 'Name': 'string', 'TTL': 123, 'State': 'string', 'Message': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyVersion': 123, 'TrafficPolicyType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA' } }
Response Structure
(dict) --
A complex type that contains information about the resource record sets that Amazon Route 53 created based on a specified traffic policy.
TrafficPolicyInstance (dict) --
A complex type that contains settings for the updated traffic policy instance.
Id (string) --
HostedZoneId (string) --
Name (string) --
TTL (integer) --
State (string) --
Message (string) --
TrafficPolicyId (string) --
TrafficPolicyVersion (integer) --
TrafficPolicyType (string) --
This action gets the list of ChangeBatches in a given time period for a given hosted zone and RRSet.
Request Syntax
client.list_change_batches_by_rr_set( HostedZoneId='string', Name='string', Type='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', SetIdentifier='string', StartDate='string', EndDate='string', MaxItems='string', Marker='string' )
string
[REQUIRED]
The ID of the hosted zone that you want to see changes for.
string
[REQUIRED]
The name of the RRSet that you want to see changes for.
string
[REQUIRED]
The type of the RRSet that you want to see changes for.
string
The identifier of the RRSet that you want to see changes for.
string
[REQUIRED]
The start of the time period you want to see changes for.
string
[REQUIRED]
The end of the time period you want to see changes for.
string
The maximum number of items on a page.
string
The page marker.
dict
Response Syntax
{ 'MaxItems': 'string', 'Marker': 'string', 'IsTruncated': True|False, 'ChangeBatchRecords': [ { 'Id': 'string', 'SubmittedAt': datetime(2015, 1, 1), 'Status': 'PENDING'|'INSYNC', 'Comment': 'string', 'Submitter': 'string', 'Changes': [ { 'Action': 'CREATE'|'DELETE'|'UPSERT', 'ResourceRecordSet': { 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'SetIdentifier': 'string', 'Weight': 123, 'Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1'|'cn-north-1', 'GeoLocation': { 'ContinentCode': 'string', 'CountryCode': 'string', 'SubdivisionCode': 'string' }, 'Failover': 'PRIMARY'|'SECONDARY', 'TTL': 123, 'ResourceRecords': [ { 'Value': 'string' }, ], 'AliasTarget': { 'HostedZoneId': 'string', 'DNSName': 'string', 'EvaluateTargetHealth': True|False }, 'HealthCheckId': 'string', 'TrafficPolicyInstanceId': 'string' } }, ] }, ], 'NextMarker': 'string' }
Response Structure
(dict) --
The input for a ListChangeBatchesByRRSet request.
MaxItems (string) --
The maximum number of items on a page.
Marker (string) --
The page marker.
IsTruncated (boolean) --
A flag that indicates if there are more change batches to list.
ChangeBatchRecords (list) --
The change batches within the given hosted zone and time period.
(dict) --
A complex type that lists the changes and information for a ChangeBatch.
Id (string) --
The ID of the request. Use this ID to track when the change has completed across all Amazon Route 53 DNS servers.
SubmittedAt (datetime) --
The date and time the change was submitted, in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard (for example, 2009-11-19T19:37:58Z). The Z after the time indicates that the time is listed in Coordinated Universal Time (UTC).
Status (string) --
The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
Valid Values: PENDING | INSYNC
Comment (string) --
A complex type that describes change information about changes made to your hosted zone.
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Submitter (string) --
The AWS account ID attached to the changes.
Changes (list) --
A list of changes made in the ChangeBatch.
(dict) --
A complex type that contains the information for each change in a change batch request.
Action (string) --
The action to perform:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes a existing resource record set that has the specified values for Name, Type, SetIdentifier (for latency, weighted, geolocation, and failover resource record sets), and TTL (except alias resource record sets, for which the TTL is determined by the AWS resource that you're routing DNS queries to).
UPSERT: If a resource record set does not already exist, Amazon Route 53 creates it. If a resource record set does exist, Amazon Route 53 updates it with the values in the request. Amazon Route 53 can update an existing resource record set only when all of the following values match: Name, Type, and SetIdentifier (for weighted, latency, geolocation, and failover resource record sets).
ResourceRecordSet (dict) --
Information about the resource record set to create or delete.
Name (string) --
The name of the domain you want to perform the action on.
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 still assumes that the domain name that you specify is fully qualified. This means that Amazon 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 an asterisk (*) character in the name. DNS treats the * character either as a wildcard or as the * character (ASCII 42), depending on where it appears in the name. For more information, see Using an Asterisk (*) in the Names of Hosted Zones and Resource Record Sets in the Amazon Route 53 Developer Guide
Type (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 | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CNAME | MX | 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.
Values for alias resource record sets:
CloudFront distributions: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Another resource record set in this hosted zone: Specify the type of the resource record set for which you're creating the alias. Specify any value except NS or SOA.
SetIdentifier (string) --
Weighted, Latency, Geo, and Failover resource record sets only: An identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type. The value of SetIdentifier must be unique for each resource record set that has the same combination of DNS name and type.
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. Amazon Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Amazon 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 cannot 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, Amazon 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 Amazon 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 the resource that is specified in this resource record set resides. The resource typically is an AWS resource, such as an Amazon 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, Amazon Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 region. Amazon 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 are not required to create latency resource record sets for all Amazon EC2 regions. Amazon Route 53 will choose the region with the best latency from among the regions for which you create latency resource record sets.
You cannot create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geo location 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 cannot 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.
You cannot 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 code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF | AN | AS | EU | OC | NA | SA
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a * for the country code. All other country codes follow the ISO 3166 two-character code.
SubdivisionCode (string) --
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode without CountryCode returns an InvalidInput error.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Amazon Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You cannot create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Amazon Route 53, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
Valid values: PRIMARY | SECONDARY
TTL (integer) --
The cache time to live for the current resource record set. Note the following:
If you're creating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted, latency, geolocation, or failover resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
A complex type that contains the resource records for the current resource record set.
(dict) --
A complex type that contains the value of the Value element for the current resource record set.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the AWS resource to which you are redirecting traffic.
HostedZoneId (string) --
Alias resource record sets only: The value you use depends on where you want to route queries:
A CloudFront distribution: Specify Z2FDTNDATAQYW2.
An ELB load balancer: Specify the value of the hosted zone ID for the load balancer. You can get the hosted zone ID by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the hosted zone ID for the Amazon S3 website endpoint in which you created the bucket. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference.
Another Amazon Route 53 resource record set in your hosted zone: Specify the hosted zone ID of your hosted zone. (An alias resource record set cannot reference a resource record set in a different hosted zone.)
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
DNSName (string) --
Alias resource record sets only: The external DNS name associated with the AWS Resource. The value that you specify depends on where you want to route queries:
A CloudFront distribution: Specify the domain name that CloudFront assigned when you created your distribution. Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
An ELB load balancer: Specify the DNS name associated with the load balancer. You can get the DNS name by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the domain name of the Amazon S3 website endpoint in which you created the bucket; for example, s3-website-us-east-1.amazonaws.com. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference. For more information about using Amazon S3 buckets for websites, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
EvaluateTargetHealth (boolean) --
Alias resource record sets only: If you set the value of EvaluateTargetHealth to true for the resource record set or sets in an alias, weighted alias, latency alias, or failover alias resource record set, and if you specify a value for HealthCheckId for every resource record set that is referenced by these alias resource record sets, the alias resource record sets inherit the health of the referenced resource record sets.
In this configuration, when Amazon Route 53 receives a DNS query for an alias resource record set:
Amazon Route 53 looks at the resource record sets that are referenced by the alias resource record sets to determine which health checks they're using.
Amazon Route 53 checks the current status of each health check. (Amazon Route 53 periodically checks the health of the endpoint that is specified in a health check; it doesn't perform the health check when the DNS query arrives.)
Based on the status of the health checks, Amazon Route 53 determines which resource record sets are healthy. Unhealthy resource record sets are immediately removed from consideration. In addition, if all of the resource record sets that are referenced by an alias resource record set are unhealthy, that alias resource record set also is immediately removed from consideration.
Based on the configuration of the alias resource record sets (weighted alias or latency alias, for example) and the configuration of the resource record sets that they reference, Amazon Route 53 chooses a resource record set from the healthy resource record sets, and responds to the query.
Note the following:
You cannot set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
If the AWS resource that you specify in AliasTarget is a resource record set or a group of resource record sets (for example, a group of weighted resource record sets), but it is not another alias resource record set, we recommend that you associate a health check with all of the resource record sets in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
If you specify an ELB load balancer in AliasTarget, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If no Amazon EC2 instances are healthy or if the load balancer itself is unhealthy, and if EvaluateTargetHealth is true for the corresponding alias resource record set, Amazon Route 53 routes queries to other resources.
When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they're not Amazon Route 53 health checks, but they perform a similar function. Do not create Amazon Route 53 health checks for the Amazon EC2 instances that you register with an ELB load balancer. For more information, see How Health Checks Work in More Complex Amazon Route 53 Configurations in the Amazon Route 53 Developer Guide.
We recommend that you set EvaluateTargetHealth to true only when you have enough idle capacity to handle the failure of one or more endpoints.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
Health Check resource record sets only, not required for alias resource record sets: An identifier that is used to identify health check associated with the resource record set.
TrafficPolicyInstanceId (string) --
NextMarker (string) --
The next page marker.
Deletes a traffic policy instance and all of the resource record sets that Amazon Route 53 created when you created the instance.
To delete a traffic policy instance, send a DELETE request to the 2013-04-01/trafficpolicy/traffic policy instance ID resource.
Request Syntax
client.delete_traffic_policy_instance( Id='string' )
string
[REQUIRED]
The ID of the traffic policy instance that you want to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element.
Gets the number of traffic policy instances that are associated with the current AWS account.
To get the number of traffic policy instances, send a GET request to the 2013-04-01/trafficpolicyinstancecount resource.
Request Syntax
client.get_traffic_policy_instance_count()
dict
Response Syntax
{ 'TrafficPolicyInstanceCount': 123 }
Response Structure
(dict) --
A complex type that contains information about the number of traffic policy instances that are associated with the current AWS account.
TrafficPolicyInstanceCount (integer) --
The number of traffic policy instances that are associated with the current AWS account.
Gets information about the traffic policy instances that you created in a specified hosted zone.
To get information about the traffic policy instances that you created in a specified hosted zone, send a GET request to the 2013-04-01/trafficpolicyinstance resource and include the ID of the hosted zone.
Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the MaxItems parameter to list them in groups of up to 100.
The response includes four values that help you navigate from one group of MaxItems traffic policy instances to the next:
IsTruncated
If the value of IsTruncated in the response is true, there are more traffic policy instances associated with the current AWS account.
If IsTruncated is false, this response includes the last traffic policy instance that is associated with the current account.
MaxItems
The value that you specified for the MaxItems parameter in the request that produced the current response.
TrafficPolicyInstanceNameMarker and TrafficPolicyInstanceTypeMarker
If IsTruncated is true, these two values in the response represent the first traffic policy instance in the next group of MaxItems traffic policy instances. To list more traffic policy instances, make another call to ListTrafficPolicyInstancesByHostedZone, and specify these values in the corresponding request parameters.
If IsTruncated is false, all three elements are omitted from the response.
Request Syntax
client.list_traffic_policy_instances_by_hosted_zone( HostedZoneId='string', TrafficPolicyInstanceNameMarker='string', TrafficPolicyInstanceTypeMarker='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', MaxItems='string' )
string
[REQUIRED]
The ID of the hosted zone for which you want to list traffic policy instances.
string
For the first request to ListTrafficPolicyInstancesByHostedZone, omit this value.
If the value of IsTruncated in the previous response was true, TrafficPolicyInstanceNameMarker is the name of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get for this hosted zone.
If the value of IsTruncated in the previous response was false, omit this value.
string
For the first request to ListTrafficPolicyInstancesByHostedZone, omit this value.
If the value of IsTruncated in the previous response was true, TrafficPolicyInstanceTypeMarker is the DNS type of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get for this hosted zone.
string
The maximum number of traffic policy instances to be included in the response body for this request. If you have more than MaxItems traffic policy instances, the value of the IsTruncated element in the response is true, and the values of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker represent the first traffic policy instance in the next group of MaxItems traffic policy instances.
dict
Response Syntax
{ 'TrafficPolicyInstances': [ { 'Id': 'string', 'HostedZoneId': 'string', 'Name': 'string', 'TTL': 123, 'State': 'string', 'Message': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyVersion': 123, 'TrafficPolicyType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA' }, ], 'TrafficPolicyInstanceNameMarker': 'string', 'TrafficPolicyInstanceTypeMarker': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'IsTruncated': True|False, 'MaxItems': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the request.
TrafficPolicyInstances (list) --
A list that contains one TrafficPolicyInstance element for each traffic policy instance that matches the elements in the request.
(dict) --
Id (string) --
HostedZoneId (string) --
Name (string) --
TTL (integer) --
State (string) --
Message (string) --
TrafficPolicyId (string) --
TrafficPolicyVersion (integer) --
TrafficPolicyType (string) --
TrafficPolicyInstanceNameMarker (string) --
If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the first traffic policy instance in the next group of MaxItems traffic policy instances.
TrafficPolicyInstanceTypeMarker (string) --
If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of MaxItems traffic policy instances.
IsTruncated (boolean) --
A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of MaxItems traffic policy instances by calling ListTrafficPolicyInstancesByHostedZone again and specifying the values of the HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker elements in the corresponding request parameters.
Valid Values: true | false
MaxItems (string) --
The value that you specified for the MaxItems parameter in the call to ListTrafficPolicyInstancesByHostedZone that produced the current response.
Deletes a traffic policy. To delete a traffic policy, send a DELETE request to the 2013-04-01/trafficpolicy resource.
Request Syntax
client.delete_traffic_policy( Id='string', Version=123 )
string
[REQUIRED]
The ID of the traffic policy that you want to delete.
integer
[REQUIRED]
The version number of the traffic policy that you want to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element.
Gets information about the traffic policy instances that you created by using a specify traffic policy version.
To get information about the traffic policy instances that you created by using a specify traffic policy version, send a GET request to the 2013-04-01/trafficpolicyinstance resource and include the ID and version of the traffic policy.
Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the MaxItems parameter to list them in groups of up to 100.
The response includes five values that help you navigate from one group of MaxItems traffic policy instances to the next:
IsTruncated If the value of IsTruncated in the response is true, there are more traffic policy instances associated with the specified traffic policy. If IsTruncated is false, this response includes the last traffic policy instance that is associated with the specified traffic policy.
MaxItems The value that you specified for the MaxItems parameter in the request that produced the current response.
HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker If IsTruncated is true, these values in the response represent the first traffic policy instance in the next group of MaxItems traffic policy instances. To list more traffic policy instances, make another call to ListTrafficPolicyInstancesByPolicy, and specify these values in the corresponding request parameters. If IsTruncated is false, all three elements are omitted from the response.
Request Syntax
client.list_traffic_policy_instances_by_policy( TrafficPolicyId='string', TrafficPolicyVersion=123, HostedZoneIdMarker='string', TrafficPolicyInstanceNameMarker='string', TrafficPolicyInstanceTypeMarker='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', MaxItems='string' )
string
[REQUIRED]
The ID of the traffic policy for which you want to list traffic policy instances.
integer
[REQUIRED]
The version of the traffic policy for which you want to list traffic policy instances. The version must be associated with the traffic policy that is specified by TrafficPolicyId.
string
For the first request to ListTrafficPolicyInstancesByPolicy, omit this value.
If the value of IsTruncated in the previous response was true, HostedZoneIdMarker is the ID of the hosted zone for the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get for this hosted zone.
If the value of IsTruncated in the previous response was false, omit this value.
string
For the first request to ListTrafficPolicyInstancesByPolicy, omit this value.
If the value of IsTruncated in the previous response was true, TrafficPolicyInstanceNameMarker is the name of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get for this hosted zone.
If the value of IsTruncated in the previous response was false, omit this value.
string
For the first request to ListTrafficPolicyInstancesByPolicy, omit this value.
If the value of IsTruncated in the previous response was true, TrafficPolicyInstanceTypeMarker is the DNS type of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get for this hosted zone.
string
The maximum number of traffic policy instances to be included in the response body for this request. If you have more than MaxItems traffic policy instances, the value of the IsTruncated element in the response is true, and the values of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker represent the first traffic policy instance in the next group of MaxItems traffic policy instances.
dict
Response Syntax
{ 'TrafficPolicyInstances': [ { 'Id': 'string', 'HostedZoneId': 'string', 'Name': 'string', 'TTL': 123, 'State': 'string', 'Message': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyVersion': 123, 'TrafficPolicyType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA' }, ], 'HostedZoneIdMarker': 'string', 'TrafficPolicyInstanceNameMarker': 'string', 'TrafficPolicyInstanceTypeMarker': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'IsTruncated': True|False, 'MaxItems': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the request.
TrafficPolicyInstances (list) --
A list that contains one TrafficPolicyInstance element for each traffic policy instance that matches the elements in the request.
(dict) --
Id (string) --
HostedZoneId (string) --
Name (string) --
TTL (integer) --
State (string) --
Message (string) --
TrafficPolicyId (string) --
TrafficPolicyVersion (integer) --
TrafficPolicyType (string) --
HostedZoneIdMarker (string) --
If IsTruncated is true, HostedZoneIdMarker is the ID of the hosted zone of the first traffic policy instance in the next group of MaxItems traffic policy instances.
TrafficPolicyInstanceNameMarker (string) --
If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the first traffic policy instance in the next group of MaxItems traffic policy instances.
TrafficPolicyInstanceTypeMarker (string) --
If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of MaxItems traffic policy instances.
IsTruncated (boolean) --
A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of MaxItems traffic policy instances by calling ListTrafficPolicyInstancesByPolicy again and specifying the values of the HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker elements in the corresponding request parameters.
Valid Values: true | false
MaxItems (string) --
The value that you specified for the MaxItems parameter in the call to ListTrafficPolicyInstancesByPolicy that produced the current response.
Creates a new version of an existing traffic policy. When you create a new version of a traffic policy, you specify the ID of the traffic policy that you want to update and a JSON-formatted document that describes the new version.
You use traffic policies to create multiple DNS resource record sets for one domain name (such as example.com) or one subdomain name (such as www.example.com).
To create a new version, send a POST request to the 2013-04-01/trafficpolicy/ resource. The request body includes an XML document with a CreateTrafficPolicyVersionRequest element. The response returns the CreateTrafficPolicyVersionResponse element, which contains information about the new version of the traffic policy.
Request Syntax
client.create_traffic_policy_version( Id='string', Document='string', Comment='string' )
string
[REQUIRED]
The ID of the traffic policy for which you want to create a new version.
string
[REQUIRED]
The definition of a new traffic policy version, in JSON format. You must specify the full definition of the new traffic policy. You cannot specify just the differences between the new version and a previous version.
string
Any comments that you want to include about the new traffic policy version.
dict
Response Syntax
{ 'TrafficPolicy': { 'Id': 'string', 'Version': 123, 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'Document': 'string', 'Comment': 'string' }, 'Location': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the CreateTrafficPolicyVersion request.
TrafficPolicy (dict) --
A complex type that contains settings for the new version of the traffic policy.
Id (string) --
Version (integer) --
Name (string) --
Type (string) --
Document (string) --
Comment (string) --
Location (string) --
Creates a traffic policy, which you use to create multiple DNS resource record sets for one domain name (such as example.com) or one subdomain name (such as www.example.com).
To create a traffic policy, send a POST request to the 2013-04-01/trafficpolicy resource. The request body must include an XML document with a CreateTrafficPolicyRequest element. The response includes the CreateTrafficPolicyResponse element, which contains information about the new traffic policy.
Request Syntax
client.create_traffic_policy( Name='string', Document='string', Comment='string' )
string
[REQUIRED]
The name of the traffic policy.
string
[REQUIRED]
The definition of this traffic policy in JSON format.
string
Any comments that you want to include about the traffic policy.
dict
Response Syntax
{ 'TrafficPolicy': { 'Id': 'string', 'Version': 123, 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'Document': 'string', 'Comment': 'string' }, 'Location': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the CreateTrafficPolicy request.
TrafficPolicy (dict) --
A complex type that contains settings for the new traffic policy.
Id (string) --
Version (integer) --
Name (string) --
Type (string) --
Document (string) --
Comment (string) --
Location (string) --
This action gets the list of ChangeBatches in a given time period for a given hosted zone.
Request Syntax
client.list_change_batches_by_hosted_zone( HostedZoneId='string', StartDate='string', EndDate='string', MaxItems='string', Marker='string' )
string
[REQUIRED]
The ID of the hosted zone that you want to see changes for.
string
[REQUIRED]
The start of the time period you want to see changes for.
string
[REQUIRED]
The end of the time period you want to see changes for.
string
The maximum number of items on a page.
string
The page marker.
dict
Response Syntax
{ 'MaxItems': 'string', 'Marker': 'string', 'IsTruncated': True|False, 'ChangeBatchRecords': [ { 'Id': 'string', 'SubmittedAt': datetime(2015, 1, 1), 'Status': 'PENDING'|'INSYNC', 'Comment': 'string', 'Submitter': 'string', 'Changes': [ { 'Action': 'CREATE'|'DELETE'|'UPSERT', 'ResourceRecordSet': { 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'SetIdentifier': 'string', 'Weight': 123, 'Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1'|'cn-north-1', 'GeoLocation': { 'ContinentCode': 'string', 'CountryCode': 'string', 'SubdivisionCode': 'string' }, 'Failover': 'PRIMARY'|'SECONDARY', 'TTL': 123, 'ResourceRecords': [ { 'Value': 'string' }, ], 'AliasTarget': { 'HostedZoneId': 'string', 'DNSName': 'string', 'EvaluateTargetHealth': True|False }, 'HealthCheckId': 'string', 'TrafficPolicyInstanceId': 'string' } }, ] }, ], 'NextMarker': 'string' }
Response Structure
(dict) --
The input for a ListChangeBatchesByHostedZone request.
MaxItems (string) --
The maximum number of items on a page.
Marker (string) --
The page marker.
IsTruncated (boolean) --
A flag that indicates if there are more change batches to list.
ChangeBatchRecords (list) --
The change batches within the given hosted zone and time period.
(dict) --
A complex type that lists the changes and information for a ChangeBatch.
Id (string) --
The ID of the request. Use this ID to track when the change has completed across all Amazon Route 53 DNS servers.
SubmittedAt (datetime) --
The date and time the change was submitted, in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard (for example, 2009-11-19T19:37:58Z). The Z after the time indicates that the time is listed in Coordinated Universal Time (UTC).
Status (string) --
The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
Valid Values: PENDING | INSYNC
Comment (string) --
A complex type that describes change information about changes made to your hosted zone.
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Submitter (string) --
The AWS account ID attached to the changes.
Changes (list) --
A list of changes made in the ChangeBatch.
(dict) --
A complex type that contains the information for each change in a change batch request.
Action (string) --
The action to perform:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes a existing resource record set that has the specified values for Name, Type, SetIdentifier (for latency, weighted, geolocation, and failover resource record sets), and TTL (except alias resource record sets, for which the TTL is determined by the AWS resource that you're routing DNS queries to).
UPSERT: If a resource record set does not already exist, Amazon Route 53 creates it. If a resource record set does exist, Amazon Route 53 updates it with the values in the request. Amazon Route 53 can update an existing resource record set only when all of the following values match: Name, Type, and SetIdentifier (for weighted, latency, geolocation, and failover resource record sets).
ResourceRecordSet (dict) --
Information about the resource record set to create or delete.
Name (string) --
The name of the domain you want to perform the action on.
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 still assumes that the domain name that you specify is fully qualified. This means that Amazon 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 an asterisk (*) character in the name. DNS treats the * character either as a wildcard or as the * character (ASCII 42), depending on where it appears in the name. For more information, see Using an Asterisk (*) in the Names of Hosted Zones and Resource Record Sets in the Amazon Route 53 Developer Guide
Type (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 | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CNAME | MX | 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.
Values for alias resource record sets:
CloudFront distributions: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Another resource record set in this hosted zone: Specify the type of the resource record set for which you're creating the alias. Specify any value except NS or SOA.
SetIdentifier (string) --
Weighted, Latency, Geo, and Failover resource record sets only: An identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type. The value of SetIdentifier must be unique for each resource record set that has the same combination of DNS name and type.
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. Amazon Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Amazon 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 cannot 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, Amazon 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 Amazon 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 the resource that is specified in this resource record set resides. The resource typically is an AWS resource, such as an Amazon 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, Amazon Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 region. Amazon 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 are not required to create latency resource record sets for all Amazon EC2 regions. Amazon Route 53 will choose the region with the best latency from among the regions for which you create latency resource record sets.
You cannot create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geo location 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 cannot 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.
You cannot 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 code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF | AN | AS | EU | OC | NA | SA
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a * for the country code. All other country codes follow the ISO 3166 two-character code.
SubdivisionCode (string) --
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode without CountryCode returns an InvalidInput error.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Amazon Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You cannot create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Amazon Route 53, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
Valid values: PRIMARY | SECONDARY
TTL (integer) --
The cache time to live for the current resource record set. Note the following:
If you're creating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted, latency, geolocation, or failover resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
A complex type that contains the resource records for the current resource record set.
(dict) --
A complex type that contains the value of the Value element for the current resource record set.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the AWS resource to which you are redirecting traffic.
HostedZoneId (string) --
Alias resource record sets only: The value you use depends on where you want to route queries:
A CloudFront distribution: Specify Z2FDTNDATAQYW2.
An ELB load balancer: Specify the value of the hosted zone ID for the load balancer. You can get the hosted zone ID by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the hosted zone ID for the Amazon S3 website endpoint in which you created the bucket. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference.
Another Amazon Route 53 resource record set in your hosted zone: Specify the hosted zone ID of your hosted zone. (An alias resource record set cannot reference a resource record set in a different hosted zone.)
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
DNSName (string) --
Alias resource record sets only: The external DNS name associated with the AWS Resource. The value that you specify depends on where you want to route queries:
A CloudFront distribution: Specify the domain name that CloudFront assigned when you created your distribution. Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
An ELB load balancer: Specify the DNS name associated with the load balancer. You can get the DNS name by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the domain name of the Amazon S3 website endpoint in which you created the bucket; for example, s3-website-us-east-1.amazonaws.com. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference. For more information about using Amazon S3 buckets for websites, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
EvaluateTargetHealth (boolean) --
Alias resource record sets only: If you set the value of EvaluateTargetHealth to true for the resource record set or sets in an alias, weighted alias, latency alias, or failover alias resource record set, and if you specify a value for HealthCheckId for every resource record set that is referenced by these alias resource record sets, the alias resource record sets inherit the health of the referenced resource record sets.
In this configuration, when Amazon Route 53 receives a DNS query for an alias resource record set:
Amazon Route 53 looks at the resource record sets that are referenced by the alias resource record sets to determine which health checks they're using.
Amazon Route 53 checks the current status of each health check. (Amazon Route 53 periodically checks the health of the endpoint that is specified in a health check; it doesn't perform the health check when the DNS query arrives.)
Based on the status of the health checks, Amazon Route 53 determines which resource record sets are healthy. Unhealthy resource record sets are immediately removed from consideration. In addition, if all of the resource record sets that are referenced by an alias resource record set are unhealthy, that alias resource record set also is immediately removed from consideration.
Based on the configuration of the alias resource record sets (weighted alias or latency alias, for example) and the configuration of the resource record sets that they reference, Amazon Route 53 chooses a resource record set from the healthy resource record sets, and responds to the query.
Note the following:
You cannot set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
If the AWS resource that you specify in AliasTarget is a resource record set or a group of resource record sets (for example, a group of weighted resource record sets), but it is not another alias resource record set, we recommend that you associate a health check with all of the resource record sets in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
If you specify an ELB load balancer in AliasTarget, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If no Amazon EC2 instances are healthy or if the load balancer itself is unhealthy, and if EvaluateTargetHealth is true for the corresponding alias resource record set, Amazon Route 53 routes queries to other resources.
When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they're not Amazon Route 53 health checks, but they perform a similar function. Do not create Amazon Route 53 health checks for the Amazon EC2 instances that you register with an ELB load balancer. For more information, see How Health Checks Work in More Complex Amazon Route 53 Configurations in the Amazon Route 53 Developer Guide.
We recommend that you set EvaluateTargetHealth to true only when you have enough idle capacity to handle the failure of one or more endpoints.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
Health Check resource record sets only, not required for alias resource record sets: An identifier that is used to identify health check associated with the resource record set.
TrafficPolicyInstanceId (string) --
NextMarker (string) --
The next page marker.
Gets information about all of the versions for a specified traffic policy. ListTrafficPolicyVersions lists only versions that have not been deleted.
Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policies, you can use the maxitems parameter to list them in groups of up to 100.
The response includes three values that help you navigate from one group of ``maxitems``maxitems traffic policies to the next:
IsTruncated
If the value of IsTruncated in the response is true, there are more traffic policy versions associated with the specified traffic policy.
If IsTruncated is false, this response includes the last traffic policy version that is associated with the specified traffic policy.
TrafficPolicyVersionMarker
The ID of the next traffic policy version that is associated with the current AWS account. If you want to list more traffic policies, make another call to ListTrafficPolicyVersions, and specify the value of the TrafficPolicyVersionMarker element in the TrafficPolicyVersionMarker request parameter.
If IsTruncated is false, Amazon Route 53 omits the TrafficPolicyVersionMarker element from the response.
MaxItems
The value that you specified for the MaxItems parameter in the request that produced the current response.
Request Syntax
client.list_traffic_policy_versions( Id='string', TrafficPolicyVersionMarker='string', MaxItems='string' )
string
[REQUIRED]
Specify the value of Id of the traffic policy for which you want to list all versions.
string
For your first request to ListTrafficPolicyVersions, do not include the TrafficPolicyVersionMarker parameter.
If you have more traffic policy versions than the value of MaxItems, ListTrafficPolicyVersions returns only the first group of MaxItems versions. To get the next group of MaxItems traffic policy versions, submit another request to ListTrafficPolicyVersions. For the value of TrafficPolicyVersionMarker, specify the value of the TrafficPolicyVersionMarker element that was returned in the previous response.
Traffic policy versions are listed in sequential order.
string
The maximum number of traffic policy versions that you want Amazon Route 53 to include in the response body for this request. If the specified traffic policy has more than MaxItems versions, the value of the IsTruncated element in the response is true, and the value of the TrafficPolicyVersionMarker element is the ID of the first version in the next group of MaxItems traffic policy versions.
dict
Response Syntax
{ 'TrafficPolicies': [ { 'Id': 'string', 'Version': 123, 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'Document': 'string', 'Comment': 'string' }, ], 'IsTruncated': True|False, 'TrafficPolicyVersionMarker': 'string', 'MaxItems': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the request.
TrafficPolicies (list) --
A list that contains one TrafficPolicy element for each traffic policy version that is associated with the specified traffic policy.
(dict) --
Id (string) --
Version (integer) --
Name (string) --
Type (string) --
Document (string) --
Comment (string) --
IsTruncated (boolean) --
A flag that indicates whether there are more traffic policies to be listed. If the response was truncated, you can get the next group of maxitems traffic policies by calling ListTrafficPolicyVersions again and specifying the value of the NextMarker element in the marker parameter.
Valid Values: true | false
TrafficPolicyVersionMarker (string) --
If IsTruncated is true, the value of TrafficPolicyVersionMarker identifies the first traffic policy in the next group of MaxItems traffic policies. Call ListTrafficPolicyVersions again and specify the value of TrafficPolicyVersionMarker in the TrafficPolicyVersionMarker request parameter.
This element is present only if IsTruncated is true.
MaxItems (string) --
The value that you specified for the maxitems parameter in the call to ListTrafficPolicyVersions that produced the current response.
This action returns the status and changes of a change batch request.
Request Syntax
client.get_change_details( Id='string' )
string
[REQUIRED]
The ID of the change batch request. The value that you specify here is the value that ChangeResourceRecordSets returned in the Id element when you submitted the request.
dict
Response Syntax
{ 'ChangeBatchRecord': { 'Id': 'string', 'SubmittedAt': datetime(2015, 1, 1), 'Status': 'PENDING'|'INSYNC', 'Comment': 'string', 'Submitter': 'string', 'Changes': [ { 'Action': 'CREATE'|'DELETE'|'UPSERT', 'ResourceRecordSet': { 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'SetIdentifier': 'string', 'Weight': 123, 'Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1'|'cn-north-1', 'GeoLocation': { 'ContinentCode': 'string', 'CountryCode': 'string', 'SubdivisionCode': 'string' }, 'Failover': 'PRIMARY'|'SECONDARY', 'TTL': 123, 'ResourceRecords': [ { 'Value': 'string' }, ], 'AliasTarget': { 'HostedZoneId': 'string', 'DNSName': 'string', 'EvaluateTargetHealth': True|False }, 'HealthCheckId': 'string', 'TrafficPolicyInstanceId': 'string' } }, ] } }
Response Structure
(dict) --
A complex type that contains the ChangeBatchRecord element.
ChangeBatchRecord (dict) --
A complex type that contains information about the specified change batch, including the change batch ID, the status of the change, and the contained changes.
Id (string) --
The ID of the request. Use this ID to track when the change has completed across all Amazon Route 53 DNS servers.
SubmittedAt (datetime) --
The date and time the change was submitted, in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard (for example, 2009-11-19T19:37:58Z). The Z after the time indicates that the time is listed in Coordinated Universal Time (UTC).
Status (string) --
The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
Valid Values: PENDING | INSYNC
Comment (string) --
A complex type that describes change information about changes made to your hosted zone.
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Submitter (string) --
The AWS account ID attached to the changes.
Changes (list) --
A list of changes made in the ChangeBatch.
(dict) --
A complex type that contains the information for each change in a change batch request.
Action (string) --
The action to perform:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes a existing resource record set that has the specified values for Name, Type, SetIdentifier (for latency, weighted, geolocation, and failover resource record sets), and TTL (except alias resource record sets, for which the TTL is determined by the AWS resource that you're routing DNS queries to).
UPSERT: If a resource record set does not already exist, Amazon Route 53 creates it. If a resource record set does exist, Amazon Route 53 updates it with the values in the request. Amazon Route 53 can update an existing resource record set only when all of the following values match: Name, Type, and SetIdentifier (for weighted, latency, geolocation, and failover resource record sets).
ResourceRecordSet (dict) --
Information about the resource record set to create or delete.
Name (string) --
The name of the domain you want to perform the action on.
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 still assumes that the domain name that you specify is fully qualified. This means that Amazon 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 an asterisk (*) character in the name. DNS treats the * character either as a wildcard or as the * character (ASCII 42), depending on where it appears in the name. For more information, see Using an Asterisk (*) in the Names of Hosted Zones and Resource Record Sets in the Amazon Route 53 Developer Guide
Type (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 | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CNAME | MX | 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.
Values for alias resource record sets:
CloudFront distributions: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Another resource record set in this hosted zone: Specify the type of the resource record set for which you're creating the alias. Specify any value except NS or SOA.
SetIdentifier (string) --
Weighted, Latency, Geo, and Failover resource record sets only: An identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type. The value of SetIdentifier must be unique for each resource record set that has the same combination of DNS name and type.
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. Amazon Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Amazon 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 cannot 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, Amazon 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 Amazon 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 the resource that is specified in this resource record set resides. The resource typically is an AWS resource, such as an Amazon 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, Amazon Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 region. Amazon 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 are not required to create latency resource record sets for all Amazon EC2 regions. Amazon Route 53 will choose the region with the best latency from among the regions for which you create latency resource record sets.
You cannot create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geo location 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 cannot 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.
You cannot 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 code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF | AN | AS | EU | OC | NA | SA
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a * for the country code. All other country codes follow the ISO 3166 two-character code.
SubdivisionCode (string) --
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode without CountryCode returns an InvalidInput error.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Amazon Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You cannot create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Amazon Route 53, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
Valid values: PRIMARY | SECONDARY
TTL (integer) --
The cache time to live for the current resource record set. Note the following:
If you're creating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted, latency, geolocation, or failover resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
A complex type that contains the resource records for the current resource record set.
(dict) --
A complex type that contains the value of the Value element for the current resource record set.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the AWS resource to which you are redirecting traffic.
HostedZoneId (string) --
Alias resource record sets only: The value you use depends on where you want to route queries:
A CloudFront distribution: Specify Z2FDTNDATAQYW2.
An ELB load balancer: Specify the value of the hosted zone ID for the load balancer. You can get the hosted zone ID by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the hosted zone ID for the Amazon S3 website endpoint in which you created the bucket. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference.
Another Amazon Route 53 resource record set in your hosted zone: Specify the hosted zone ID of your hosted zone. (An alias resource record set cannot reference a resource record set in a different hosted zone.)
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
DNSName (string) --
Alias resource record sets only: The external DNS name associated with the AWS Resource. The value that you specify depends on where you want to route queries:
A CloudFront distribution: Specify the domain name that CloudFront assigned when you created your distribution. Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
An ELB load balancer: Specify the DNS name associated with the load balancer. You can get the DNS name by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the domain name of the Amazon S3 website endpoint in which you created the bucket; for example, s3-website-us-east-1.amazonaws.com. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference. For more information about using Amazon S3 buckets for websites, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
EvaluateTargetHealth (boolean) --
Alias resource record sets only: If you set the value of EvaluateTargetHealth to true for the resource record set or sets in an alias, weighted alias, latency alias, or failover alias resource record set, and if you specify a value for HealthCheckId for every resource record set that is referenced by these alias resource record sets, the alias resource record sets inherit the health of the referenced resource record sets.
In this configuration, when Amazon Route 53 receives a DNS query for an alias resource record set:
Amazon Route 53 looks at the resource record sets that are referenced by the alias resource record sets to determine which health checks they're using.
Amazon Route 53 checks the current status of each health check. (Amazon Route 53 periodically checks the health of the endpoint that is specified in a health check; it doesn't perform the health check when the DNS query arrives.)
Based on the status of the health checks, Amazon Route 53 determines which resource record sets are healthy. Unhealthy resource record sets are immediately removed from consideration. In addition, if all of the resource record sets that are referenced by an alias resource record set are unhealthy, that alias resource record set also is immediately removed from consideration.
Based on the configuration of the alias resource record sets (weighted alias or latency alias, for example) and the configuration of the resource record sets that they reference, Amazon Route 53 chooses a resource record set from the healthy resource record sets, and responds to the query.
Note the following:
You cannot set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
If the AWS resource that you specify in AliasTarget is a resource record set or a group of resource record sets (for example, a group of weighted resource record sets), but it is not another alias resource record set, we recommend that you associate a health check with all of the resource record sets in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
If you specify an ELB load balancer in AliasTarget, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If no Amazon EC2 instances are healthy or if the load balancer itself is unhealthy, and if EvaluateTargetHealth is true for the corresponding alias resource record set, Amazon Route 53 routes queries to other resources.
When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they're not Amazon Route 53 health checks, but they perform a similar function. Do not create Amazon Route 53 health checks for the Amazon EC2 instances that you register with an ELB load balancer. For more information, see How Health Checks Work in More Complex Amazon Route 53 Configurations in the Amazon Route 53 Developer Guide.
We recommend that you set EvaluateTargetHealth to true only when you have enough idle capacity to handle the failure of one or more endpoints.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
Health Check resource record sets only, not required for alias resource record sets: An identifier that is used to identify health check associated with the resource record set.
TrafficPolicyInstanceId (string) --
Updates the comment for a specified traffic policy version.
To update the comment, send a POST request to the /2013-04-01/trafficpolicy/ resource.
The request body must include an XML document with an UpdateTrafficPolicyCommentRequest element.
Request Syntax
client.update_traffic_policy_comment( Id='string', Version=123, Comment='string' )
string
[REQUIRED]
The value of Id for the traffic policy for which you want to update the comment.
integer
[REQUIRED]
The value of Version for the traffic policy for which you want to update the comment.
string
[REQUIRED]
The new comment for the specified traffic policy and version.
dict
Response Syntax
{ 'TrafficPolicy': { 'Id': 'string', 'Version': 123, 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'Document': 'string', 'Comment': 'string' } }
Response Structure
(dict) --
A complex type that contains the response information for the traffic policy.
TrafficPolicy (dict) --
A complex type that contains settings for the specified traffic policy.
Id (string) --
Version (integer) --
Name (string) --
Type (string) --
Document (string) --
Comment (string) --
Gets information about a specified traffic policy instance.
To get information about the traffic policy instance, send a GET request to the 2013-04-01/trafficpolicyinstance resource.
Request Syntax
client.get_traffic_policy_instance( Id='string' )
string
[REQUIRED]
The ID of the traffic policy instance that you want to get information about.
dict
Response Syntax
{ 'TrafficPolicyInstance': { 'Id': 'string', 'HostedZoneId': 'string', 'Name': 'string', 'TTL': 123, 'State': 'string', 'Message': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyVersion': 123, 'TrafficPolicyType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA' } }
Response Structure
(dict) --
A complex type that contains information about the resource record sets that Amazon Route 53 created based on a specified traffic policy.
TrafficPolicyInstance (dict) --
A complex type that contains settings for the traffic policy instance.
Id (string) --
HostedZoneId (string) --
Name (string) --
TTL (integer) --
State (string) --
Message (string) --
TrafficPolicyId (string) --
TrafficPolicyVersion (integer) --
TrafficPolicyType (string) --
Creates resource record sets in a specified hosted zone based on the settings in a specified traffic policy version. In addition, CreateTrafficPolicyInstance associates the resource record sets with a specified domain name (such as example.com) or subdomain name (such as www.example.com). Amazon Route 53 responds to DNS queries for the domain or subdomain name by using the resource record sets that CreateTrafficPolicyInstance created.
To create a traffic policy instance, send a POST request to the 2013-04-01/trafficpolicyinstance resource. The request body must include an XML document with a CreateTrafficPolicyRequest element. The response returns the CreateTrafficPolicyInstanceResponse element, which contains information about the traffic policy instance.
Request Syntax
client.create_traffic_policy_instance( HostedZoneId='string', Name='string', TTL=123, TrafficPolicyId='string', TrafficPolicyVersion=123 )
string
[REQUIRED]
The ID of the hosted zone in which you want Amazon Route 53 to create resource record sets by using the configuration in a traffic policy.
string
[REQUIRED]
The domain name (such as example.com) or subdomain name (such as www.example.com) for which Amazon Route 53 responds to DNS queries by using the resource record sets that Amazon Route 53 creates for this traffic policy instance.
integer
[REQUIRED]
The TTL that you want Amazon Route 53 to assign to all of the resource record sets that it creates in the specified hosted zone.
string
[REQUIRED]
The ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
integer
[REQUIRED]
The version of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
dict
Response Syntax
{ 'TrafficPolicyInstance': { 'Id': 'string', 'HostedZoneId': 'string', 'Name': 'string', 'TTL': 123, 'State': 'string', 'Message': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyVersion': 123, 'TrafficPolicyType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA' }, 'Location': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the CreateTrafficPolicyInstance request.
TrafficPolicyInstance (dict) --
A complex type that contains settings for the new traffic policy instance.
Id (string) --
HostedZoneId (string) --
Name (string) --
TTL (integer) --
State (string) --
Message (string) --
TrafficPolicyId (string) --
TrafficPolicyVersion (integer) --
TrafficPolicyType (string) --
Location (string) --
A unique URL that represents a new traffic policy instance.
Gets information about the traffic policy instances that you created by using the current AWS account.
To get information about the traffic policy instances that are associated with the current AWS account, send a GET request to the 2013-04-01/trafficpolicyinstance resource.
Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policy instances, you can use the MaxItems parameter to list them in groups of up to 100.
The response includes five values that help you navigate from one group of MaxItems traffic policy instances to the next:
IsTruncated
If the value of IsTruncated in the response is true, there are more traffic policy instances associated with the current AWS account.
If IsTruncated is false, this response includes the last traffic policy instance that is associated with the current account.
MaxItems
The value that you specified for the MaxItems parameter in the request that produced the current response.
HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker
If IsTruncated is true, these three values in the response represent the first traffic policy instance in the next group of MaxItems traffic policy instances. To list more traffic policy instances, make another call to ListTrafficPolicyInstances, and specify these values in the corresponding request parameters.
If IsTruncated is false, all three elements are omitted from the response.
Request Syntax
client.list_traffic_policy_instances( HostedZoneIdMarker='string', TrafficPolicyInstanceNameMarker='string', TrafficPolicyInstanceTypeMarker='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', MaxItems='string' )
string
For the first request to ListTrafficPolicyInstances, omit this value.
If the value of IsTruncated in the previous response was true, you have more traffic policy instances. To get the next group of MaxItems traffic policy instances, submit another ListTrafficPolicyInstances request. For the value of HostedZoneIdMarker, specify the value of HostedZoneIdMarker from the previous response, which is the hosted zone ID of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get.
string
For the first request to ListTrafficPolicyInstances, omit this value.
If the value of IsTruncated in the previous response was true, TrafficPolicyInstanceNameMarker is the name of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get.
string
For the first request to ListTrafficPolicyInstances, omit this value.
If the value of IsTruncated in the previous response was true, TrafficPolicyInstanceTypeMarker is the DNS type of the first traffic policy instance in the next group of MaxItems traffic policy instances.
If the value of IsTruncated in the previous response was false, there are no more traffic policy instances to get.
string
The maximum number of traffic policy instances to be included in the response body for this request. If you have more than MaxItems traffic policy instances, the value of the IsTruncated element in the response is true, and the values of HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker represent the first traffic policy instance in the next group of MaxItems traffic policy instances.
dict
Response Syntax
{ 'TrafficPolicyInstances': [ { 'Id': 'string', 'HostedZoneId': 'string', 'Name': 'string', 'TTL': 123, 'State': 'string', 'Message': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyVersion': 123, 'TrafficPolicyType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA' }, ], 'HostedZoneIdMarker': 'string', 'TrafficPolicyInstanceNameMarker': 'string', 'TrafficPolicyInstanceTypeMarker': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'IsTruncated': True|False, 'MaxItems': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the request.
TrafficPolicyInstances (list) --
A list that contains one TrafficPolicyInstance element for each traffic policy instance that matches the elements in the request.
(dict) --
Id (string) --
HostedZoneId (string) --
Name (string) --
TTL (integer) --
State (string) --
Message (string) --
TrafficPolicyId (string) --
TrafficPolicyVersion (integer) --
TrafficPolicyType (string) --
HostedZoneIdMarker (string) --
If IsTruncated is true, HostedZoneIdMarker is the ID of the hosted zone of the first traffic policy instance in the next group of MaxItems traffic policy instances.
TrafficPolicyInstanceNameMarker (string) --
If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the first traffic policy instance in the next group of MaxItems traffic policy instances.
TrafficPolicyInstanceTypeMarker (string) --
If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the resource record sets that are associated with the first traffic policy instance in the next group of MaxItems traffic policy instances.
IsTruncated (boolean) --
A flag that indicates whether there are more traffic policy instances to be listed. If the response was truncated, you can get the next group of MaxItems traffic policy instances by calling ListTrafficPolicyInstances again and specifying the values of the HostedZoneIdMarker, TrafficPolicyInstanceNameMarker, and TrafficPolicyInstanceTypeMarker elements in the corresponding request parameters.
Valid Values: true | false
MaxItems (string) --
The value that you specified for the MaxItems parameter in the call to ListTrafficPolicyInstances that produced the current response.
Gets information about the latest version for every traffic policy that is associated with the current AWS account. To get the information, send a GET request to the 2013-04-01/trafficpolicy resource.
Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of traffic policies, you can use the maxitems parameter to list them in groups of up to 100.
The response includes three values that help you navigate from one group of maxitems traffic policies to the next:
IsTruncated
If the value of IsTruncated in the response is true, there are more traffic policies associated with the current AWS account.
If IsTruncated is false, this response includes the last traffic policy that is associated with the current account.
TrafficPolicyIdMarker
If IsTruncated is true, TrafficPolicyIdMarker is the ID of the first traffic policy in the next group of MaxItems traffic policies. If you want to list more traffic policies, make another call to ListTrafficPolicies, and specify the value of the TrafficPolicyIdMarker element from the response in the TrafficPolicyIdMarker request parameter.
If IsTruncated is false, the TrafficPolicyIdMarker element is omitted from the response.
MaxItems
The value that you specified for the MaxItems parameter in the request that produced the current response.
Request Syntax
client.list_traffic_policies( TrafficPolicyIdMarker='string', MaxItems='string' )
string
For your first request to ListTrafficPolicies, do not include the TrafficPolicyIdMarker parameter.
If you have more traffic policies than the value of MaxItems, ListTrafficPolicies returns only the first MaxItems traffic policies. To get the next group of MaxItems policies, submit another request to ListTrafficPolicies. For the value of TrafficPolicyIdMarker, specify the value of the TrafficPolicyIdMarker element that was returned in the previous response.
Policies are listed in the order in which they were created.
string
The maximum number of traffic policies to be included in the response body for this request. If you have more than MaxItems traffic policies, the value of the IsTruncated element in the response is true, and the value of the TrafficPolicyIdMarker element is the ID of the first traffic policy in the next group of MaxItems traffic policies.
dict
Response Syntax
{ 'TrafficPolicySummaries': [ { 'Id': 'string', 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'LatestVersion': 123, 'TrafficPolicyCount': 123 }, ], 'IsTruncated': True|False, 'TrafficPolicyIdMarker': 'string', 'MaxItems': 'string' }
Response Structure
(dict) --
A complex type that contains the response information for the request.
TrafficPolicySummaries (list) --
A list that contains one TrafficPolicySummary element for each traffic policy that was created by the current AWS account.
(dict) --
Id (string) --
Name (string) --
Type (string) --
LatestVersion (integer) --
TrafficPolicyCount (integer) --
IsTruncated (boolean) --
A flag that indicates whether there are more traffic policies to be listed. If the response was truncated, you can get the next group of MaxItems traffic policies by calling ListTrafficPolicies again and specifying the value of the TrafficPolicyIdMarker element in the TrafficPolicyIdMarker request parameter.
Valid Values: true | false
TrafficPolicyIdMarker (string) --
If the value of IsTruncated is true, TrafficPolicyIdMarker is the ID of the first traffic policy in the next group of MaxItems traffic policies.
MaxItems (string) --
The value that you specified for the MaxItems parameter in the call to ListTrafficPolicies that produced the current response.
{'ChangeBatch': {'Changes': {'ResourceRecordSet': {'TrafficPolicyInstanceId': 'string'}}}}
Use this action to create or change your authoritative DNS information. To use this action, send a POST request to the 2013-04-01/hostedzone/hosted Zone ID/rrset resource. The request body must include an XML document with a ChangeResourceRecordSetsRequest element.
Changes are a list of change items and are considered transactional. For more information on transactional changes, also known as change batches, see POST ChangeResourceRecordSets in the Amazon Route 53 API Reference.
In response to a ChangeResourceRecordSets request, your DNS data is changed on all Amazon Route 53 DNS servers. Initially, the status of a change is PENDING. This means the change has not yet propagated to all the authoritative Amazon Route 53 DNS servers. When the change is propagated to all hosts, the change returns a status of INSYNC.
Note the following limitations on a ChangeResourceRecordSets request:
A request cannot contain more than 100 Change elements.
A request cannot contain more than 1000 ResourceRecord elements.
The sum of the number of characters (including spaces) in all Value elements in a request cannot exceed 32,000 characters.
Request Syntax
client.change_resource_record_sets( HostedZoneId='string', ChangeBatch={ 'Comment': 'string', 'Changes': [ { 'Action': 'CREATE'|'DELETE'|'UPSERT', 'ResourceRecordSet': { 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'SetIdentifier': 'string', 'Weight': 123, 'Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1'|'cn-north-1', 'GeoLocation': { 'ContinentCode': 'string', 'CountryCode': 'string', 'SubdivisionCode': 'string' }, 'Failover': 'PRIMARY'|'SECONDARY', 'TTL': 123, 'ResourceRecords': [ { 'Value': 'string' }, ], 'AliasTarget': { 'HostedZoneId': 'string', 'DNSName': 'string', 'EvaluateTargetHealth': True|False }, 'HealthCheckId': 'string', 'TrafficPolicyInstanceId': 'string' } }, ] } )
string
[REQUIRED]
The ID of the hosted zone that contains the resource record sets that you want to change.
dict
[REQUIRED]
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.
Changes (list) -- [REQUIRED]
A complex type that contains one Change element for each resource record set that you want to create or delete.
(dict) --
A complex type that contains the information for each change in a change batch request.
Action (string) -- [REQUIRED]
The action to perform:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes a existing resource record set that has the specified values for Name, Type, SetIdentifier (for latency, weighted, geolocation, and failover resource record sets), and TTL (except alias resource record sets, for which the TTL is determined by the AWS resource that you're routing DNS queries to).
UPSERT: If a resource record set does not already exist, Amazon Route 53 creates it. If a resource record set does exist, Amazon Route 53 updates it with the values in the request. Amazon Route 53 can update an existing resource record set only when all of the following values match: Name, Type, and SetIdentifier (for weighted, latency, geolocation, and failover resource record sets).
ResourceRecordSet (dict) -- [REQUIRED]
Information about the resource record set to create or delete.
Name (string) -- [REQUIRED]
The name of the domain you want to perform the action on.
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 still assumes that the domain name that you specify is fully qualified. This means that Amazon 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 an asterisk (*) character in the name. DNS treats the * character either as a wildcard or as the * character (ASCII 42), depending on where it appears in the name. For more information, see Using an Asterisk (*) in the Names of Hosted Zones and Resource Record Sets in the Amazon Route 53 Developer Guide
Type (string) -- [REQUIRED]
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 | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CNAME | MX | 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.
Values for alias resource record sets:
CloudFront distributions: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Another resource record set in this hosted zone: Specify the type of the resource record set for which you're creating the alias. Specify any value except NS or SOA.
SetIdentifier (string) --
Weighted, Latency, Geo, and Failover resource record sets only: An identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type. The value of SetIdentifier must be unique for each resource record set that has the same combination of DNS name and type.
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. Amazon Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Amazon 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 cannot 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, Amazon 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 Amazon 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 the resource that is specified in this resource record set resides. The resource typically is an AWS resource, such as an Amazon 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, Amazon Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 region. Amazon 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 are not required to create latency resource record sets for all Amazon EC2 regions. Amazon Route 53 will choose the region with the best latency from among the regions for which you create latency resource record sets.
You cannot create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geo location 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 cannot 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.
You cannot 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 code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF | AN | AS | EU | OC | NA | SA
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a * for the country code. All other country codes follow the ISO 3166 two-character code.
SubdivisionCode (string) --
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode without CountryCode returns an InvalidInput error.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Amazon Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You cannot create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Amazon Route 53, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
Valid values: PRIMARY | SECONDARY
TTL (integer) --
The cache time to live for the current resource record set. Note the following:
If you're creating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted, latency, geolocation, or failover resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
A complex type that contains the resource records for the current resource record set.
(dict) --
A complex type that contains the value of the Value element for the current resource record set.
Value (string) -- [REQUIRED]
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the AWS resource to which you are redirecting traffic.
HostedZoneId (string) -- [REQUIRED]
Alias resource record sets only: The value you use depends on where you want to route queries:
A CloudFront distribution: Specify Z2FDTNDATAQYW2.
An ELB load balancer: Specify the value of the hosted zone ID for the load balancer. You can get the hosted zone ID by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the hosted zone ID for the Amazon S3 website endpoint in which you created the bucket. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference.
Another Amazon Route 53 resource record set in your hosted zone: Specify the hosted zone ID of your hosted zone. (An alias resource record set cannot reference a resource record set in a different hosted zone.)
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
DNSName (string) -- [REQUIRED]
Alias resource record sets only: The external DNS name associated with the AWS Resource. The value that you specify depends on where you want to route queries:
A CloudFront distribution: Specify the domain name that CloudFront assigned when you created your distribution. Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
An ELB load balancer: Specify the DNS name associated with the load balancer. You can get the DNS name by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the domain name of the Amazon S3 website endpoint in which you created the bucket; for example, s3-website-us-east-1.amazonaws.com. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference. For more information about using Amazon S3 buckets for websites, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
EvaluateTargetHealth (boolean) -- [REQUIRED]
Alias resource record sets only: If you set the value of EvaluateTargetHealth to true for the resource record set or sets in an alias, weighted alias, latency alias, or failover alias resource record set, and if you specify a value for HealthCheckId for every resource record set that is referenced by these alias resource record sets, the alias resource record sets inherit the health of the referenced resource record sets.
In this configuration, when Amazon Route 53 receives a DNS query for an alias resource record set:
Amazon Route 53 looks at the resource record sets that are referenced by the alias resource record sets to determine which health checks they're using.
Amazon Route 53 checks the current status of each health check. (Amazon Route 53 periodically checks the health of the endpoint that is specified in a health check; it doesn't perform the health check when the DNS query arrives.)
Based on the status of the health checks, Amazon Route 53 determines which resource record sets are healthy. Unhealthy resource record sets are immediately removed from consideration. In addition, if all of the resource record sets that are referenced by an alias resource record set are unhealthy, that alias resource record set also is immediately removed from consideration.
Based on the configuration of the alias resource record sets (weighted alias or latency alias, for example) and the configuration of the resource record sets that they reference, Amazon Route 53 chooses a resource record set from the healthy resource record sets, and responds to the query.
Note the following:
You cannot set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
If the AWS resource that you specify in AliasTarget is a resource record set or a group of resource record sets (for example, a group of weighted resource record sets), but it is not another alias resource record set, we recommend that you associate a health check with all of the resource record sets in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
If you specify an ELB load balancer in AliasTarget, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If no Amazon EC2 instances are healthy or if the load balancer itself is unhealthy, and if EvaluateTargetHealth is true for the corresponding alias resource record set, Amazon Route 53 routes queries to other resources.
When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they're not Amazon Route 53 health checks, but they perform a similar function. Do not create Amazon Route 53 health checks for the Amazon EC2 instances that you register with an ELB load balancer. For more information, see How Health Checks Work in More Complex Amazon Route 53 Configurations in the Amazon Route 53 Developer Guide.
We recommend that you set EvaluateTargetHealth to true only when you have enough idle capacity to handle the failure of one or more endpoints.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
Health Check resource record sets only, not required for alias resource record sets: An identifier that is used to identify health check associated with the resource record set.
TrafficPolicyInstanceId (string) --
dict
Response Syntax
{ 'ChangeInfo': { 'Id': 'string', 'Status': 'PENDING'|'INSYNC', 'SubmittedAt': datetime(2015, 1, 1), 'Comment': 'string' } }
Response Structure
(dict) --
A complex type containing the response for the request.
ChangeInfo (dict) --
A complex type that contains information about changes made to your hosted zone.
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Id (string) --
The ID of the request. Use this ID to track when the change has completed across all Amazon Route 53 DNS servers.
Status (string) --
The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
Valid Values: PENDING | INSYNC
SubmittedAt (datetime) --
The date and time the change was submitted, in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard (for example, 2009-11-19T19:37:58Z). The Z after the time indicates that the time is listed in Coordinated Universal Time (UTC).
Comment (string) --
A complex type that describes change information about changes made to your hosted zone.
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
{'ResourceRecordSets': {'TrafficPolicyInstanceId': 'string'}}
Imagine all the resource record sets in a zone listed out in front of you. Imagine them sorted lexicographically first by DNS name (with the labels reversed, like "com.amazon.www" for example), and secondarily, lexicographically by record type. This operation retrieves at most MaxItems resource record sets from this list, in order, starting at a position specified by the Name and Type arguments:
If both Name and Type are omitted, this means start the results at the first RRSET in the HostedZone.
If Name is specified but Type is omitted, this means start the results at the first RRSET in the list whose name is greater than or equal to Name.
If both Name and Type are specified, this means start the results at the first RRSET in the list whose name is greater than or equal to Name and whose type is greater than or equal to Type.
It is an error to specify the Type but not the Name.
Use ListResourceRecordSets to retrieve a single known record set by specifying the record set's name and type, and setting MaxItems = 1
To retrieve all the records in a HostedZone, first pause any processes making calls to ChangeResourceRecordSets. Initially call ListResourceRecordSets without a Name and Type to get the first page of record sets. For subsequent calls, set Name and Type to the NextName and NextType values returned by the previous response.
In the presence of concurrent ChangeResourceRecordSets calls, there is no consistency of results across calls to ListResourceRecordSets. The only way to get a consistent multi-page snapshot of all RRSETs in a zone is to stop making changes while pagination is in progress.
However, the results from ListResourceRecordSets are consistent within a page. If MakeChange calls are taking place concurrently, the result of each one will either be completely visible in your results or not at all. You will not see partial changes, or changes that do not ultimately succeed. (This follows from the fact that MakeChange is atomic)
The results from ListResourceRecordSets are strongly consistent with ChangeResourceRecordSets. To be precise, if a single process makes a call to ChangeResourceRecordSets and receives a successful response, the effects of that change will be visible in a subsequent call to ListResourceRecordSets by that process.
Request Syntax
client.list_resource_record_sets( HostedZoneId='string', StartRecordName='string', StartRecordType='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', StartRecordIdentifier='string', MaxItems='string' )
string
[REQUIRED]
The ID of the hosted zone that contains the resource record sets that you want to get.
string
The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.
string
The DNS type at which to begin the listing of resource record sets.
Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT
Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT
Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT
Values for Alias Resource Record Sets: A | AAAA
Constraint: Specifying type without specifying name returns an InvalidInput error.
string
Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.
string
The maximum number of records you want in the response body.
dict
Response Syntax
{ 'ResourceRecordSets': [ { 'Name': 'string', 'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'SetIdentifier': 'string', 'Weight': 123, 'Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1'|'cn-north-1', 'GeoLocation': { 'ContinentCode': 'string', 'CountryCode': 'string', 'SubdivisionCode': 'string' }, 'Failover': 'PRIMARY'|'SECONDARY', 'TTL': 123, 'ResourceRecords': [ { 'Value': 'string' }, ], 'AliasTarget': { 'HostedZoneId': 'string', 'DNSName': 'string', 'EvaluateTargetHealth': True|False }, 'HealthCheckId': 'string', 'TrafficPolicyInstanceId': 'string' }, ], 'IsTruncated': True|False, 'NextRecordName': 'string', 'NextRecordType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'PTR'|'SRV'|'SPF'|'AAAA', 'NextRecordIdentifier': 'string', 'MaxItems': 'string' }
Response Structure
(dict) --
A complex type that contains information about the resource record sets that are returned by the request and information about the response.
ResourceRecordSets (list) --
A complex type that contains information about the resource record sets that are returned by the request.
(dict) --
A complex type that contains information about the current resource record set.
Name (string) --
The name of the domain you want to perform the action on.
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 still assumes that the domain name that you specify is fully qualified. This means that Amazon 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 an asterisk (*) character in the name. DNS treats the * character either as a wildcard or as the * character (ASCII 42), depending on where it appears in the name. For more information, see Using an Asterisk (*) in the Names of Hosted Zones and Resource Record Sets in the Amazon Route 53 Developer Guide
Type (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 | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CNAME | MX | 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.
Values for alias resource record sets:
CloudFront distributions: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Another resource record set in this hosted zone: Specify the type of the resource record set for which you're creating the alias. Specify any value except NS or SOA.
SetIdentifier (string) --
Weighted, Latency, Geo, and Failover resource record sets only: An identifier that differentiates among multiple resource record sets that have the same combination of DNS name and type. The value of SetIdentifier must be unique for each resource record set that has the same combination of DNS name and type.
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. Amazon Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Amazon 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 cannot 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, Amazon 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 Amazon 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 the resource that is specified in this resource record set resides. The resource typically is an AWS resource, such as an Amazon 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, Amazon Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 region. Amazon 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 are not required to create latency resource record sets for all Amazon EC2 regions. Amazon Route 53 will choose the region with the best latency from among the regions for which you create latency resource record sets.
You cannot create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geo location 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 cannot 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.
You cannot 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 code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF | AN | AS | EU | OC | NA | SA
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a * for the country code. All other country codes follow the ISO 3166 two-character code.
SubdivisionCode (string) --
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode without CountryCode returns an InvalidInput error.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Amazon Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Amazon Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Amazon Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You cannot create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Amazon Route 53, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
Valid values: PRIMARY | SECONDARY
TTL (integer) --
The cache time to live for the current resource record set. Note the following:
If you're creating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted, latency, geolocation, or failover resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
A complex type that contains the resource records for the current resource record set.
(dict) --
A complex type that contains the value of the Value element for the current resource record set.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the AWS resource to which you are redirecting traffic.
HostedZoneId (string) --
Alias resource record sets only: The value you use depends on where you want to route queries:
A CloudFront distribution: Specify Z2FDTNDATAQYW2.
An ELB load balancer: Specify the value of the hosted zone ID for the load balancer. You can get the hosted zone ID by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the hosted zone ID for the Amazon S3 website endpoint in which you created the bucket. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference.
Another Amazon Route 53 resource record set in your hosted zone: Specify the hosted zone ID of your hosted zone. (An alias resource record set cannot reference a resource record set in a different hosted zone.)
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
DNSName (string) --
Alias resource record sets only: The external DNS name associated with the AWS Resource. The value that you specify depends on where you want to route queries:
A CloudFront distribution: Specify the domain name that CloudFront assigned when you created your distribution. Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
An ELB load balancer: Specify the DNS name associated with the load balancer. You can get the DNS name by using the AWS Management Console, the ELB API, or the AWS CLI. Use the same method to get values for HostedZoneId and DNSName. If you get one value from the console and the other value from the API or the CLI, creating the resource record set will fail.
An Amazon S3 bucket that is configured as a static website: Specify the domain name of the Amazon S3 website endpoint in which you created the bucket; for example, s3-website-us-east-1.amazonaws.com. For more information about valid values, see the table Amazon Simple Storage Service (S3) Website Endpoints in the Amazon Web Services General Reference. For more information about using Amazon S3 buckets for websites, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
For more information and an example, see Example: Creating Alias Resource Record Sets in the Amazon Route 53 API Reference.
EvaluateTargetHealth (boolean) --
Alias resource record sets only: If you set the value of EvaluateTargetHealth to true for the resource record set or sets in an alias, weighted alias, latency alias, or failover alias resource record set, and if you specify a value for HealthCheckId for every resource record set that is referenced by these alias resource record sets, the alias resource record sets inherit the health of the referenced resource record sets.
In this configuration, when Amazon Route 53 receives a DNS query for an alias resource record set:
Amazon Route 53 looks at the resource record sets that are referenced by the alias resource record sets to determine which health checks they're using.
Amazon Route 53 checks the current status of each health check. (Amazon Route 53 periodically checks the health of the endpoint that is specified in a health check; it doesn't perform the health check when the DNS query arrives.)
Based on the status of the health checks, Amazon Route 53 determines which resource record sets are healthy. Unhealthy resource record sets are immediately removed from consideration. In addition, if all of the resource record sets that are referenced by an alias resource record set are unhealthy, that alias resource record set also is immediately removed from consideration.
Based on the configuration of the alias resource record sets (weighted alias or latency alias, for example) and the configuration of the resource record sets that they reference, Amazon Route 53 chooses a resource record set from the healthy resource record sets, and responds to the query.
Note the following:
You cannot set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
If the AWS resource that you specify in AliasTarget is a resource record set or a group of resource record sets (for example, a group of weighted resource record sets), but it is not another alias resource record set, we recommend that you associate a health check with all of the resource record sets in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
If you specify an ELB load balancer in AliasTarget, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If no Amazon EC2 instances are healthy or if the load balancer itself is unhealthy, and if EvaluateTargetHealth is true for the corresponding alias resource record set, Amazon Route 53 routes queries to other resources.
When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they're not Amazon Route 53 health checks, but they perform a similar function. Do not create Amazon Route 53 health checks for the Amazon EC2 instances that you register with an ELB load balancer. For more information, see How Health Checks Work in More Complex Amazon Route 53 Configurations in the Amazon Route 53 Developer Guide.
We recommend that you set EvaluateTargetHealth to true only when you have enough idle capacity to handle the failure of one or more endpoints.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
Health Check resource record sets only, not required for alias resource record sets: An identifier that is used to identify health check associated with the resource record set.
TrafficPolicyInstanceId (string) --
IsTruncated (boolean) --
A flag that indicates whether there are more resource record sets to be listed. If your results were truncated, you can make a follow-up request for the next page of results by using the ListResourceRecordSetsResponse$NextRecordName element.
Valid Values: true | false
NextRecordName (string) --
If the results were truncated, the name of the next record in the list. This element is present only if ListResourceRecordSetsResponse$IsTruncated is true.
NextRecordType (string) --
If the results were truncated, the type of the next record in the list. This element is present only if ListResourceRecordSetsResponse$IsTruncated is true.
NextRecordIdentifier (string) --
Weighted resource record sets only: If results were truncated for a given DNS name and type, the value of SetIdentifier for the next resource record set that has the current DNS name and type.
MaxItems (string) --
The maximum number of records you requested. The maximum value of MaxItems is 100.