addTags method
Attaches tags to an existing domain. Tags are a set of case-sensitive key value pairs. An domain can have up to 10 tags. See Tagging Amazon OpenSearch Service domains for more information.
May throw BaseException. May throw LimitExceededException. May throw ValidationException. May throw InternalException.
Parameter arn
:
Specify the ARN
of the domain you want to add tags to.
Parameter tagList
:
List of Tag
to add to the domain.
Implementation
Future<void> addTags({
required String arn,
required List<Tag> tagList,
}) async {
ArgumentError.checkNotNull(arn, 'arn');
_s.validateStringLength(
'arn',
arn,
20,
2048,
isRequired: true,
);
ArgumentError.checkNotNull(tagList, 'tagList');
final $payload = <String, dynamic>{
'ARN': arn,
'TagList': tagList,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2021-01-01/tags',
exceptionFnMap: _exceptionFns,
);
}