addTags method
Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, listeners, and rules.
Each tag consists of a key and an optional value. If a resource already
has a tag with the same key, AddTags
updates its value.
May throw DuplicateTagKeysException. May throw TooManyTagsException. May throw LoadBalancerNotFoundException. May throw TargetGroupNotFoundException.
Parameter resourceArns
:
The Amazon Resource Name (ARN) of the resource.
Parameter tags
:
The tags.
Implementation
Future<void> addTags({
required List<String> resourceArns,
required List<Tag> tags,
}) async {
ArgumentError.checkNotNull(resourceArns, 'resourceArns');
ArgumentError.checkNotNull(tags, 'tags');
final $request = <String, dynamic>{};
$request['ResourceArns'] = resourceArns;
$request['Tags'] = tags;
await _protocol.send(
$request,
action: 'AddTags',
version: '2015-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['AddTagsInput'],
shapes: shapes,
resultWrapper: 'AddTagsResult',
);
}