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

************************
list_workspace_instances
************************



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

  

  Retrieves a collection of WorkSpaces Instances based on specified filters.

  

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


  **Request Syntax**
  ::

    response = client.list_workspace_instances(
        ProvisionStates=[
            'ALLOCATING'|'ALLOCATED'|'DEALLOCATING'|'DEALLOCATED'|'ERROR_ALLOCATING'|'ERROR_DEALLOCATING',
        ],
        MaxResults=123,
        NextToken='string'
    )
    
  :type ProvisionStates: list
  :param ProvisionStates: 

    Filter WorkSpaces Instances by their current provisioning states.

    

  
    - *(string) --* 

    

  :type MaxResults: integer
  :param MaxResults: 

    Maximum number of WorkSpaces Instances to return in a single response.

    

  
  :type NextToken: string
  :param NextToken: 

    Pagination token for retrieving subsequent pages of WorkSpaces Instances.

    

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

    
    ::

      {
          'WorkspaceInstances': [
              {
                  'ProvisionState': 'ALLOCATING'|'ALLOCATED'|'DEALLOCATING'|'DEALLOCATED'|'ERROR_ALLOCATING'|'ERROR_DEALLOCATING',
                  'WorkspaceInstanceId': 'string',
                  'EC2ManagedInstance': {
                      'InstanceId': 'string'
                  }
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the list of WorkSpaces Instances matching the specified criteria.

      
      

      - **WorkspaceInstances** *(list) --* 

        Collection of WorkSpaces Instances returned by the query.

        
        

        - *(dict) --* 

          Represents a single WorkSpace Instance.

          
          

          - **ProvisionState** *(string) --* 

            Current provisioning state of the WorkSpace Instance.

            
          

          - **WorkspaceInstanceId** *(string) --* 

            Unique identifier for the WorkSpace Instance.

            
          

          - **EC2ManagedInstance** *(dict) --* 

            Details of the associated EC2 managed instance.

            
            

            - **InstanceId** *(string) --* 

              Unique identifier of the managed EC2 instance.

              
        
      
    
      

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

        Token for retrieving additional WorkSpaces Instances 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`

  