tagResource method
Adds or updates a tag on a given resource.
May throw BadRequestException.
May throw ConflictException.
May throw LimitExceededException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter resourceArn :
The ARN of a resource that can be tagged.
Parameter tags :
The key-value map of strings. The valid character set is
[a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not
start with aws:. The tag value can be up to 256 characters.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
final $payload = <String, dynamic>{
'tags': tags,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}