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

*********************
delete_policy_version
*********************



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

  

  Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this action. To delete the default version of a policy, use  DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

   

  Requires permission to access the `DeletePolicyVersion <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

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


  **Request Syntax**
  ::

    response = client.delete_policy_version(
        policyName='string',
        policyVersionId='string'
    )
    
  :type policyName: string
  :param policyName: **[REQUIRED]** 

    The name of the policy.

    

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

    The policy version ID.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.DeleteConflictException`

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

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

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

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

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

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

  