tagResource method
An API operation for adding tags to a resource.
May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw InvalidTaggingRequestException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource. Tagging is only supported
for directories.
Parameter tags
:
A list of tag key-value pairs.
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: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/tags/add',
exceptionFnMap: _exceptionFns,
);
}