:doc:`PolicyVersion <index>` / Action / set_as_default

**************
set_as_default
**************



.. py:method:: IAM.PolicyVersion.set_as_default()

  

  Sets the specified version of the specified policy as the policy's default (operative) version.

   

  This operation affects all users, groups, and roles that the policy is attached to. To list the users, groups, and roles that the policy is attached to, use `ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`__.

   

  For information about managed policies, see `Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetDefaultPolicyVersion>`_  


  **Request Syntax**
  ::

    response = policy_version.set_as_default()
    
    
  
  :returns: None