tagResource method
Assigns tags to resources. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize your Amazon Web Services resources by attributes such as purpose, owner, or environment. When you have many resources of the same type, you can quickly identify a specific resource based on the tags you've assigned to it.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter resourceArn :
The Amazon Resource Name (ARN) that identifies the resource to list the
tags for. Currently, the supported resources are Amazon EMR Serverless
applications and job runs.
Parameter tags :
The tags to add to the resource. A tag is an array of key-value pairs.
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,
);
}