:doc:`WorkspacesInstances <../../workspaces-instances>` / Client / list_regions

************
list_regions
************



.. py:method:: WorkspacesInstances.Client.list_regions(**kwargs)

  

  Retrieves a list of AWS regions supported by Amazon WorkSpaces Instances, enabling region discovery for workspace deployments.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-instances-2022-07-26/ListRegions>`_  


  **Request Syntax**
  ::

    response = client.list_regions(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    Maximum number of regions to return in a single API call. Enables pagination of region results.

    

  
  :type NextToken: string
  :param NextToken: 

    Pagination token for retrieving subsequent pages of region results.

    

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

    
    ::

      {
          'Regions': [
              {
                  'RegionName': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the list of supported AWS regions for WorkSpaces Instances.

      
      

      - **Regions** *(list) --* 

        Collection of AWS regions supported by WorkSpaces Instances.

        
        

        - *(dict) --* 

          Represents an AWS region supported by WorkSpaces Instances.

          
          

          - **RegionName** *(string) --* 

            Name of the AWS region.

            
      
    
      

      - **NextToken** *(string) --* 

        Token for retrieving additional regions if the result set is paginated.

        
  
  **Exceptions**
  
  *   :py:class:`WorkspacesInstances.Client.exceptions.ValidationException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.ThrottlingException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.InternalServerException`

  