Amazon Route 53

2015/02/23 - Amazon Route 53 - 2 new api methods

ListHostedZonesByName (new) Link ¶

To retrieve a list of your hosted zones in lexicographic order, send a GET request to the 2013-04-01/hostedzonesbyname resource. The response to this request includes a HostedZones element with zero or more HostedZone child elements lexicographically ordered by DNS name. By default, the list of hosted zones is displayed on a single page. You can control the length of the page that is displayed by using the MaxItems parameter. You can use the DNSName and HostedZoneId parameters to control the hosted zone that the list begins with.

Note

Amazon Route 53 returns a maximum of 100 items. If you set MaxItems to a value greater than 100, Amazon Route 53 returns only the first 100.

Request Syntax

client.list_hosted_zones_by_name(
    DNSName='string',
    HostedZoneId='string',
    MaxItems='string'
)
type DNSName

string

param DNSName

The first name in the lexicographic ordering of domain names that you want the ListHostedZonesByNameRequest request to list.

If the request returned more than one page of results, submit another request and specify the value of NextDNSName and NextHostedZoneId from the last response in the DNSName and HostedZoneId parameters to get the next page of results.

type HostedZoneId

string

param HostedZoneId

If the request returned more than one page of results, submit another request and specify the value of NextDNSName and NextHostedZoneId from the last response in the DNSName and HostedZoneId parameters to get the next page of results.

type MaxItems

string

param MaxItems

Specify the maximum number of hosted zones to return per page of results.

rtype

dict

returns

Response Syntax

{
    'HostedZones': [
        {
            'Id': 'string',
            'Name': 'string',
            'CallerReference': 'string',
            'Config': {
                'Comment': 'string',
                'PrivateZone': True|False
            },
            'ResourceRecordSetCount': 123
        },
    ],
    'DNSName': 'string',
    'HostedZoneId': 'string',
    'IsTruncated': True|False,
    'NextDNSName': 'string',
    'NextHostedZoneId': 'string',
    'MaxItems': 'string'
}

Response Structure

  • (dict) --

    A complex type that contains the response for the request.

    • HostedZones (list) --

      A complex type that contains information about the hosted zones associated with the current AWS account.

      • (dict) --

        A complex type that contain information about the specified hosted zone.

        • Id (string) --

          The ID of the specified hosted zone.

        • Name (string) --

          The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

          This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet .

        • CallerReference (string) --

          A unique string that identifies the request to create the hosted zone.

        • Config (dict) --

          A complex type that contains the Comment element.

          • Comment (string) --

            An optional comment about your hosted zone. If you don't want to specify a comment, you can omit the HostedZoneConfig and Comment elements from the XML document.

          • PrivateZone (boolean) --

            A value that indicates whether this is a private hosted zone. The value is returned in the response; do not specify it in the request.

        • ResourceRecordSetCount (integer) --

          Total number of resource record sets in the hosted zone.

    • DNSName (string) --

      The DNSName value sent in the request.

    • HostedZoneId (string) --

      The HostedZoneId value sent in the request.

    • IsTruncated (boolean) --

      A flag indicating whether there are more hosted zones to be listed. If your results were truncated, you can make a follow-up request for the next page of results by using the NextDNSName and NextHostedZoneId elements.

      Valid Values: true | false

    • NextDNSName (string) --

      If ListHostedZonesByNameResponse$IsTruncated is true , there are more hosted zones associated with the current AWS account. To get the next page of results, make another request to ListHostedZonesByName . Specify the value of ListHostedZonesByNameResponse$NextDNSName in the ListHostedZonesByNameRequest$DNSName element and ListHostedZonesByNameResponse$NextHostedZoneId in the ListHostedZonesByNameRequest$HostedZoneId element.

    • NextHostedZoneId (string) --

      If ListHostedZonesByNameResponse$IsTruncated is true , there are more hosted zones associated with the current AWS account. To get the next page of results, make another request to ListHostedZonesByName . Specify the value of ListHostedZonesByNameResponse$NextDNSName in the ListHostedZonesByNameRequest$DNSName element and ListHostedZonesByNameResponse$NextHostedZoneId in the ListHostedZonesByNameRequest$HostedZoneId element.

    • MaxItems (string) --

      The maximum number of hosted zones to be included in the response body. If the number of hosted zones associated with this AWS account exceeds MaxItems , the value of ListHostedZonesByNameResponse$IsTruncated in the response is true . Call ListHostedZonesByName again and specify the value of ListHostedZonesByNameResponse$NextDNSName and ListHostedZonesByNameResponse$NextHostedZoneId elements respectively to get the next page of results.

GetHostedZoneCount (new) Link ¶

To retrieve a count of all your hosted zones, send a GET request to the 2013-04-01/hostedzonecount resource.

Request Syntax

client.get_hosted_zone_count()
rtype

dict

returns

Response Syntax

{
    'HostedZoneCount': 123
}

Response Structure

  • (dict) --

    A complex type that contains the count of hosted zones associated with the current AWS account.

    • HostedZoneCount (integer) --

      The number of hosted zones associated with the current AWS account.