tagResource method
Assigns a tag to a resource.
May throw InvalidParameterException. May throw DependencyException. May throw ResourceNotFoundException.
Parameter resourceArn
:
ARN of a resource tag.
Parameter tags
:
Tags assigned to a 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,
);
}