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

************************
delete_workspace_api_key
************************



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

  

  Deletes a Grafana API key for the workspace.

   

  .. note::

    

    In workspaces compatible with Grafana version 9 or above, use workspace service accounts instead of API keys. API keys will be removed in a future release.

    

  

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


  **Request Syntax**
  ::

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

    The name of the API key to delete.

    

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

    The ID of the workspace to delete.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **keyName** *(string) --* 

        The name of the key that was deleted.

        
      

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

        The ID of the workspace where the key 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`

  