tagResource method
Adds the specified tags to the specified resource. The following resources support tagging in License Manager:
- Licenses
- Grants
- License configurations
- Report generators
May throw AccessDeniedException.
May throw AuthorizationException.
May throw InvalidParameterValueException.
May throw RateLimitExceededException.
May throw ServerInternalException.
May throw ValidationException.
Parameter resourceArn :
Amazon Resource Name (ARN) of the resource. The following examples provide
an example ARN for each supported resource in License Manager:
-
Licenses -
arn:aws:license-manager::111122223333:license:l-EXAMPLE2da7646d6861033667f20e895 -
Grants -
arn:aws:license-manager::111122223333:grant:g-EXAMPLE7b19f4a0ab73679b0beb52707 -
License configurations -
arn:aws:license-manager:us-east-1:111122223333:license-configuration:lic-EXAMPLE6a788d4c8acd4264ff0ecf2ed2d -
Report generators -
arn:aws:license-manager:us-east-1:111122223333:report-generator:r-EXAMPLE825b4a4f8fe5a3e0c88824e5fc6
Parameter tags :
One or more tags.
Implementation
Future<void> tagResource({
required String resourceArn,
required List<Tag> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
'Tags': tags,
},
);
}