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
Request Syntax
response = client.update_license_specifications_for_resource(
ResourceArn='string',
AddLicenseSpecifications=[
{
'LicenseConfigurationArn': 'string',
'AmiAssociationScope': 'string'
},
],
RemoveLicenseSpecifications=[
{
'LicenseConfigurationArn': 'string',
'AmiAssociationScope': 'string'
},
]
)
[REQUIRED]
Amazon Resource Name (ARN) of the Amazon Web Services resource.
ARNs of the license configurations to add.
Details for associating a license configuration with a resource.
Amazon Resource Name (ARN) of the license configuration.
Scope of AMI associations. The possible value is cross-account
.
ARNs of the license configurations to remove.
Details for associating a license configuration with a resource.
Amazon Resource Name (ARN) of the license configuration.
Scope of AMI associations. The possible value is cross-account
.
dict
Response Syntax
{}
Response Structure
Exceptions
LicenseManager.Client.exceptions.InvalidParameterValueException
LicenseManager.Client.exceptions.InvalidResourceStateException
LicenseManager.Client.exceptions.LicenseUsageException
LicenseManager.Client.exceptions.ServerInternalException
LicenseManager.Client.exceptions.AuthorizationException
LicenseManager.Client.exceptions.AccessDeniedException
LicenseManager.Client.exceptions.RateLimitExceededException