tagResource method
Adds tags to an IoT Greengrass resource. If a tag already exists for the resource, this operation updates the tag's value.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter resourceArn :
The ARN
of the resource to tag.
Parameter tags :
A list of key-value pairs that contain metadata for the resource. For more
information, see Tag
your resources in the IoT Greengrass V2 Developer Guide.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
final $payload = <String, dynamic>{
'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}