listTagsForResource method

Future<ListTagsForResourceResponse> listTagsForResource({
  1. required String resourceARN,
})

Gets a list of tags associated with a specified resource. Indexes, FAQs, and data sources can have tags associated with them.

May throw ValidationException. May throw ResourceUnavailableException. May throw ThrottlingException. May throw AccessDeniedException. May throw InternalServerException.

Parameter resourceARN : The Amazon Resource Name (ARN) of the index, FAQ, or data source to get a list of tags for.

Implementation

Future<ListTagsForResourceResponse> listTagsForResource({
  required String resourceARN,
}) async {
  ArgumentError.checkNotNull(resourceARN, 'resourceARN');
  _s.validateStringLength(
    'resourceARN',
    resourceARN,
    1,
    1011,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSKendraFrontendService.ListTagsForResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceARN': resourceARN,
    },
  );

  return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}