:doc:`SSOAdmin <../../sso-admin>` / Client / attach_managed_policy_to_permission_set

***************************************
attach_managed_policy_to_permission_set
***************************************



.. py:method:: SSOAdmin.Client.attach_managed_policy_to_permission_set(**kwargs)

  

  Attaches an Amazon Web Services managed policy ARN to a permission set.

   

  .. note::

    

    If the permission set is already referenced by one or more account assignments, you will need to call ``ProvisionPermissionSet`` after this operation. Calling ``ProvisionPermissionSet`` applies the corresponding IAM policy updates to all assigned accounts.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sso-admin-2020-07-20/AttachManagedPolicyToPermissionSet>`_  


  **Request Syntax**
  ::

    response = client.attach_managed_policy_to_permission_set(
        InstanceArn='string',
        PermissionSetArn='string',
        ManagedPolicyArn='string'
    )
    
  :type InstanceArn: string
  :param InstanceArn: **[REQUIRED]** 

    The ARN of the IAM Identity Center instance under which the operation will be executed. For more information about ARNs, see `Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces </general/latest/gr/aws-arns-and-namespaces.html>`__ in the *Amazon Web Services General Reference*.

    

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

    The ARN of the  PermissionSet that the managed policy should be attached to.

    

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

    The Amazon Web Services managed policy ARN to be attached to a permission set.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SSOAdmin.Client.exceptions.ServiceQuotaExceededException`

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

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

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

  
  *   :py:class:`SSOAdmin.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`SSOAdmin.Client.exceptions.ValidationException`

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

  