tagResource method
Adds tags to a Greengrass resource. Valid resources are 'Group', 'ConnectorDefinition', 'CoreDefinition', 'DeviceDefinition', 'FunctionDefinition', 'LoggerDefinition', 'SubscriptionDefinition', 'ResourceDefinition', and 'BulkDeployment'.
May throw BadRequestException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource.
Implementation
Future<void> tagResource({
required String resourceArn,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
final $payload = <String, dynamic>{
if (tags != null) 'tags': tags,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}