tagResource method
Tags a specified resource.
May throw ValidationException. May throw ServiceQuotaExceededException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ConflictException. May throw ThrottlingException. May throw InternalServerException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource.
Parameter tags
:
The tags to apply to the specified 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>{
'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}