tagResource method
Add tags to a resource.
May throw NotFoundException. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException.
Parameter resourceArn
:
The ARN of the resource.
Parameter tags
:
Tags associated with the resource.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
ArgumentError.checkNotNull(tags, 'tags');
final $payload = <String, dynamic>{
'tags': tags,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}