tagResource method
Use to assign one or more tags to a resource.
May throw InternalServerException. May throw ValidationException. May throw ResourceNotFoundException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource that the tags are added to.
Parameter tags
:
The list of tags that are added to the specified 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,
);
}