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

********************************
delete_workspace_service_account
********************************



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

  

  Deletes a workspace service account from the workspace.

   

  This will delete any tokens created for the service account, as well. If the tokens are currently in use, the will fail to authenticate / authorize after they are deleted.

   

  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/DeleteWorkspaceServiceAccount>`_  


  **Request Syntax**
  ::

    response = client.delete_workspace_service_account(
        serviceAccountId='string',
        workspaceId='string'
    )
    
  :type serviceAccountId: string
  :param serviceAccountId: **[REQUIRED]** 

    The ID of the service account to delete.

    

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

    The ID of the workspace where the service account resides.

    

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

    
    ::

      {
          'serviceAccountId': 'string',
          'workspaceId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **serviceAccountId** *(string) --* 

        The ID of the service account deleted.

        
      

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

        The ID of the workspace where the service account was deleted.

        
  
  **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`

  