tagResource method
Tags the resource with a tag key and value.
May throw InternalFailureException. May throw BadRequestException. May throw ResourceNotFoundException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) to use to tag a resource.
Parameter tags
:
The tags used to tag 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,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}