:doc:`Route53Domains <../../route53domains>` / Client / list_domains

************
list_domains
************



.. py:method:: Route53Domains.Client.list_domains(**kwargs)

  

  This operation returns all the domain names registered with Amazon Route 53 for the current Amazon Web Services account if no filtering conditions are used.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListDomains>`_  


  **Request Syntax**
  ::

    response = client.list_domains(
        FilterConditions=[
            {
                'Name': 'DomainName'|'Expiry',
                'Operator': 'LE'|'GE'|'BEGINS_WITH',
                'Values': [
                    'string',
                ]
            },
        ],
        SortCondition={
            'Name': 'DomainName'|'Expiry',
            'SortOrder': 'ASC'|'DESC'
        },
        Marker='string',
        MaxItems=123
    )
    
  :type FilterConditions: list
  :param FilterConditions: 

    A complex type that contains information about the filters applied during the ``ListDomains`` request. The filter conditions can include domain name and domain expiration.

    

  
    - *(dict) --* 

      Information for the filtering of a list of domains returned by `ListDomains <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains__ListDomains.html>`__.

      

    
      - **Name** *(string) --* **[REQUIRED]** 

        Name of the field which should be used for filtering the list of domains.

        

      
      - **Operator** *(string) --* **[REQUIRED]** 

        The operator values for filtering domain names. The values can be:

         

        
        * ``LE``: Less than, or equal to
         
        * ``GE``: Greater than, or equal to
         
        * ``BEGINS_WITH``: Begins with
        

        

      
      - **Values** *(list) --* **[REQUIRED]** 

        An array of strings presenting values to compare. Only 1 item in the list is currently supported.

        

      
        - *(string) --* 

        
    
    

  :type SortCondition: dict
  :param SortCondition: 

    A complex type that contains information about the requested ordering of domains in the returned list.

    

  
    - **Name** *(string) --* **[REQUIRED]** 

      Field to be used for sorting the list of domains. It can be either the name or the expiration for a domain. Note that if ``filterCondition`` is used in the same `ListDomains <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains__ListDomains.html>`__ call, the field used for sorting has to be the same as the field used for filtering.

      

    
    - **SortOrder** *(string) --* **[REQUIRED]** 

      The sort order for a list of domains. Either ascending (ASC) or descending (DES).

      

    
  
  :type Marker: string
  :param Marker: 

    For an initial request for a list of domains, omit this element. If the number of domains that are associated with the current Amazon Web Services account is greater than the value that you specified for ``MaxItems``, you can use ``Marker`` to return additional domains. Get the value of ``NextPageMarker`` from the previous response, and submit another request that includes the value of ``NextPageMarker`` in the ``Marker`` element.

     

    Constraints: The marker must match the value specified in the previous request.

    

  
  :type MaxItems: integer
  :param MaxItems: 

    Number of domains to be returned.

     

    Default: 20

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Domains': [
              {
                  'DomainName': 'string',
                  'AutoRenew': True|False,
                  'TransferLock': True|False,
                  'Expiry': datetime(2015, 1, 1)
              },
          ],
          'NextPageMarker': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The ListDomains response includes the following elements.

      
      

      - **Domains** *(list) --* 

        A list of domains.

        
        

        - *(dict) --* 

          Summary information about one domain.

          
          

          - **DomainName** *(string) --* 

            The name of the domain that the summary information applies to.

            
          

          - **AutoRenew** *(boolean) --* 

            Indicates whether the domain is automatically renewed upon expiration.

            
          

          - **TransferLock** *(boolean) --* 

            Indicates whether a domain is locked from unauthorized transfer to another party.

            
          

          - **Expiry** *(datetime) --* 

            Expiration date of the domain in Unix time format and Coordinated Universal Time (UTC).

            
      
    
      

      - **NextPageMarker** *(string) --* 

        If there are more domains than you specified for ``MaxItems`` in the request, submit another request and include the value of ``NextPageMarker`` in the value of ``Marker``.

        
  
  **Exceptions**
  
  *   :py:class:`Route53Domains.Client.exceptions.InvalidInput`

  