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

**************************
set_default_policy_version
**************************



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

  

  Sets the specified version of the specified policy as the policy's default (operative) version. This action affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the  ListPrincipalPolicies action.

   

  Requires permission to access the `SetDefaultPolicyVersion <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/SetDefaultPolicyVersion>`_  


  **Request Syntax**
  ::

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

    The policy name.

    

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

    The policy version ID.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :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`

  