:doc:`CloudHSMV2 <../../cloudhsmv2>` / Client / delete_hsm

**********
delete_hsm
**********



.. py:method:: CloudHSMV2.Client.delete_hsm(**kwargs)

  

  Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM's elastic network interface (ENI), or the ID of the HSM's ENI. You need to specify only one of these values. To find these values, use  DescribeClusters.

   

  **Cross-account use:** No. You cannot perform this operation on an CloudHSM hsm in a different Amazon Web Services account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm>`_  


  **Request Syntax**
  ::

    response = client.delete_hsm(
        ClusterId='string',
        HsmId='string',
        EniId='string',
        EniIp='string'
    )
    
  :type ClusterId: string
  :param ClusterId: **[REQUIRED]** 

    The identifier (ID) of the cluster that contains the HSM that you are deleting.

    

  
  :type HsmId: string
  :param HsmId: 

    The identifier (ID) of the HSM that you are deleting.

    

  
  :type EniId: string
  :param EniId: 

    The identifier (ID) of the elastic network interface (ENI) of the HSM that you are deleting.

    

  
  :type EniIp: string
  :param EniIp: 

    The IP address of the elastic network interface (ENI) of the HSM that you are deleting.

    

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

    
    ::

      {
          'HsmId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **HsmId** *(string) --* 

        The identifier (ID) of the HSM that was deleted.

        
  
  **Exceptions**
  
  *   :py:class:`CloudHSMV2.Client.exceptions.CloudHsmInternalFailureException`

  
  *   :py:class:`CloudHSMV2.Client.exceptions.CloudHsmServiceException`

  
  *   :py:class:`CloudHSMV2.Client.exceptions.CloudHsmResourceNotFoundException`

  
  *   :py:class:`CloudHSMV2.Client.exceptions.CloudHsmInvalidRequestException`

  
  *   :py:class:`CloudHSMV2.Client.exceptions.CloudHsmAccessDeniedException`

  