tagResource method
Adds the specified tag to the specified index, FAQ, data source, or other resource. If the tag already exists, the existing value is replaced with the new value.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceUnavailableException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceARN :
The Amazon Resource Name (ARN) of the index, FAQ, data source, or other
resource to add a tag. For example, the ARN of an index is constructed as
follows: arn:aws:kendra:your-region:your-account-id:index/index-id
For information on how to construct an ARN for all types of Amazon Kendra
resources, see Resource
types.
Parameter tags :
A list of tag keys to add to the index, FAQ, data source, or other
resource. If a tag already exists, the existing value is replaced with the
new value.
Implementation
Future<void> tagResource({
required String resourceARN,
required List<Tag> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSKendraFrontendService.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
'Tags': tags,
},
);
}