:doc:`LicenseManager <../../license-manager>` / Client / update_license_specifications_for_resource

******************************************
update_license_specifications_for_resource
******************************************



.. py:method:: LicenseManager.Client.update_license_specifications_for_resource(**kwargs)

  

  Adds or removes the specified license configurations for the specified Amazon Web Services resource.

   

  You can update the license specifications of AMIs, instances, and hosts. You cannot update the license specifications for launch templates and CloudFormation templates, as they send license configurations to the operation that creates the resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseSpecificationsForResource>`_  


  **Request Syntax**
  ::

    response = client.update_license_specifications_for_resource(
        ResourceArn='string',
        AddLicenseSpecifications=[
            {
                'LicenseConfigurationArn': 'string',
                'AmiAssociationScope': 'string'
            },
        ],
        RemoveLicenseSpecifications=[
            {
                'LicenseConfigurationArn': 'string',
                'AmiAssociationScope': 'string'
            },
        ]
    )
    
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    Amazon Resource Name (ARN) of the Amazon Web Services resource.

    

  
  :type AddLicenseSpecifications: list
  :param AddLicenseSpecifications: 

    ARNs of the license configurations to add.

    

  
    - *(dict) --* 

      Details for associating a license configuration with a resource.

      

    
      - **LicenseConfigurationArn** *(string) --* **[REQUIRED]** 

        Amazon Resource Name (ARN) of the license configuration.

        

      
      - **AmiAssociationScope** *(string) --* 

        Scope of AMI associations. The possible value is ``cross-account``.

        

      
    

  :type RemoveLicenseSpecifications: list
  :param RemoveLicenseSpecifications: 

    ARNs of the license configurations to remove.

    

  
    - *(dict) --* 

      Details for associating a license configuration with a resource.

      

    
      - **LicenseConfigurationArn** *(string) --* **[REQUIRED]** 

        Amazon Resource Name (ARN) of the license configuration.

        

      
      - **AmiAssociationScope** *(string) --* 

        Scope of AMI associations. The possible value is ``cross-account``.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`LicenseManager.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`LicenseManager.Client.exceptions.InvalidResourceStateException`

  
  *   :py:class:`LicenseManager.Client.exceptions.LicenseUsageException`

  
  *   :py:class:`LicenseManager.Client.exceptions.ServerInternalException`

  
  *   :py:class:`LicenseManager.Client.exceptions.AuthorizationException`

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

  
  *   :py:class:`LicenseManager.Client.exceptions.RateLimitExceededException`

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

  