:doc:`Connect <../../connect>` / Client / list_workspaces

***************
list_workspaces
***************



.. py:method:: Connect.Client.list_workspaces(**kwargs)

  

  Lists the workspaces in an Amazon Connect instance.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/ListWorkspaces>`_  


  **Request Syntax**
  ::

    response = client.list_workspaces(
        InstanceId='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return per page.

    

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

    
    ::

      {
          'NextToken': 'string',
          'WorkspaceSummaryList': [
              {
                  'Id': 'string',
                  'Name': 'string',
                  'Arn': 'string',
                  'LastModifiedTime': datetime(2015, 1, 1),
                  'LastModifiedRegion': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        If there are additional results, this is the token for the next set of results.

        
      

      - **WorkspaceSummaryList** *(list) --* 

        A summary list of workspaces.

        
        

        - *(dict) --* 

          Contains summary information about a workspace.

          
          

          - **Id** *(string) --* 

            The unique identifier of the workspace.

            
          

          - **Name** *(string) --* 

            The name of the workspace.

            
          

          - **Arn** *(string) --* 

            The Amazon Resource Name (ARN) of the workspace.

            
          

          - **LastModifiedTime** *(datetime) --* 

            The timestamp when the workspace was last modified.

            
          

          - **LastModifiedRegion** *(string) --* 

            The Amazon Web Services Region where the workspace was last modified.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

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

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

  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

  