tagResource method
Tags the resource with a tag key and value.
For more information, see Tagging your Amazon Web Services resources in the Tagging Amazon Web Services Resources User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter arn :
The Amazon Resource Name (ARN) to use to tag a resource.
Parameter tags :
A map of tags assigned to a resource. A tag is a string-to-string map of
key-value pairs.
Implementation
Future<void> tagResource({
required String arn,
required Map<String, String> tags,
}) async {
final $payload = <String, dynamic>{
'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(arn)}',
exceptionFnMap: _exceptionFns,
);
}