tagResource method
Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.
May throw ConcurrentModificationException.
May throw InternalServerException.
May throw InvalidParameterValueException.
May throw ResourceNotFoundException.
May throw TooManyTagsException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the given Amazon Translate resource to
which you want to associate the tags.
Parameter tags :
Tags being associated with a specific Amazon Translate resource. There can
be a maximum of 50 tags (both existing and pending) associated with a
specific resource.
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': 'AWSShineFrontendService_20170701.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
'Tags': tags,
},
);
}