tagResource method
Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value.
May throw InternalServiceException.
May throw InvalidParametersException.
May throw ThrottledRequestException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the resource to tag.
Parameter tags :
The tags to add to the resource.
Implementation
Future<TagResourceOutput> tagResource({
required String resourceArn,
required List<Tag> tags,
}) async {
final $payload = <String, dynamic>{
'resourceArn': resourceArn,
'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/tags/tag-resource',
exceptionFnMap: _exceptionFns,
);
return TagResourceOutput.fromJson(response);
}