:doc:`LocationService <../../location>` / Client / delete_key

**********
delete_key
**********



.. py:method:: LocationService.Client.delete_key(**kwargs)

  

  Deletes the specified API key. The API key must have been deactivated more than 90 days previously.

   

  For more information, see `Use API keys to authenticate <https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html>`__ in the *Amazon Location Service Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/location-2020-11-19/DeleteKey>`_  


  **Request Syntax**
  ::

    response = client.delete_key(
        KeyName='string',
        ForceDelete=True|False
    )
    
  :type KeyName: string
  :param KeyName: **[REQUIRED]** 

    The name of the API key to delete.

    

  
  :type ForceDelete: boolean
  :param ForceDelete: 

    ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter ``true`` to delete the key or to ``false`` to not preemptively delete the API key.

     

    Valid values: ``true``, or ``false``.

     

    Required: No

     

    .. note::

      

      This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.

      

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`LocationService.Client.exceptions.InternalServerException`

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

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

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

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

  