tagResource method
Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.
May throw InvalidRequestException. May throw InternalFailureException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw LimitExceededException.
Parameter resourceArn
:
The ARN of the resource.
Parameter tags
:
The new or modified tags for the resource.
Implementation
Future<void> tagResource({
required String resourceArn,
required List<Tag> tags,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
ArgumentError.checkNotNull(tags, 'tags');
final $payload = <String, dynamic>{
'resourceArn': resourceArn,
'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags',
exceptionFnMap: _exceptionFns,
);
}