:doc:`IoT <../../iot>` / Client / delete_command

**************
delete_command
**************



.. py:method:: IoT.Client.delete_command(**kwargs)

  

  Delete a command resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/DeleteCommand>`_  


  **Request Syntax**
  ::

    response = client.delete_command(
        commandId='string'
    )
    
  :type commandId: string
  :param commandId: **[REQUIRED]** 

    The unique identifier of the command to be deleted.

    

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

    
    ::

      {
          'statusCode': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **statusCode** *(integer) --* 

        The status code for the command deletion request. The status code is in the 200 range for a successful request.

         

        
        * If the command hasn't been deprecated, or has been deprecated for a duration that is shorter than the maximum time out duration of 12 hours, when calling the ``DeleteCommand`` request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a ``pendingDeletion`` state. Once the time out duration has been reached, the command will be permanently removed from your account.
         
        * If the command has been deprecated for a duration that is longer than the maximum time out duration of 12 hours, when calling the ``DeleteCommand`` request, the command will be deleted immediately and a 204 status code will be returned.
        

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.ValidationException`

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

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

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

  