:doc:`ManagedGrafana <../../grafana>` / Client / list_workspace_service_accounts

*******************************
list_workspace_service_accounts
*******************************



.. py:method:: ManagedGrafana.Client.list_workspace_service_accounts(**kwargs)

  

  Returns a list of service accounts for a workspace.

   

  Service accounts are only available for workspaces that are compatible with Grafana version 9 and above.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/ListWorkspaceServiceAccounts>`_  


  **Request Syntax**
  ::

    response = client.list_workspace_service_accounts(
        maxResults=123,
        nextToken='string',
        workspaceId='string'
    )
    
  :type maxResults: integer
  :param maxResults: 

    The maximum number of service accounts to include in the results.

    

  
  :type nextToken: string
  :param nextToken: 

    The token for the next set of service accounts to return. (You receive this token from a previous ``ListWorkspaceServiceAccounts`` operation.)

    

  
  :type workspaceId: string
  :param workspaceId: **[REQUIRED]** 

    The workspace for which to list service accounts.

    

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

    
    ::

      {
          'nextToken': 'string',
          'serviceAccounts': [
              {
                  'grafanaRole': 'ADMIN'|'EDITOR'|'VIEWER',
                  'id': 'string',
                  'isDisabled': 'string',
                  'name': 'string'
              },
          ],
          'workspaceId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **nextToken** *(string) --* 

        The token to use when requesting the next set of service accounts.

        
      

      - **serviceAccounts** *(list) --* 

        An array of structures containing information about the service accounts.

        
        

        - *(dict) --* 

          A structure that contains the information about one service account.

          
          

          - **grafanaRole** *(string) --* 

            The role of the service account, which sets the permission level used when calling Grafana APIs.

            
          

          - **id** *(string) --* 

            The unique ID of the service account.

            
          

          - **isDisabled** *(string) --* 

            Returns true if the service account is disabled. Service accounts can be disabled and enabled in the Amazon Managed Grafana console.

            
          

          - **name** *(string) --* 

            The name of the service account.

            
      
    
      

      - **workspaceId** *(string) --* 

        The workspace to which the service accounts are associated.

        
  
  **Exceptions**
  
  *   :py:class:`ManagedGrafana.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`ManagedGrafana.Client.exceptions.ConflictException`

  
  *   :py:class:`ManagedGrafana.Client.exceptions.ValidationException`

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

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

  