listQuerySuggestionsBlockLists method

Future<ListQuerySuggestionsBlockListsResponse> listQuerySuggestionsBlockLists({
  1. required String indexId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the block lists used for query suggestions for an index.

For information on the current quota limits for block lists, see Quotas for Amazon Kendra.

ListQuerySuggestionsBlockLists is currently not supported in the Amazon Web Services GovCloud (US-West) region.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter indexId : The identifier of the index for a list of all block lists that exist for that index.

For information on the current quota limits for block lists, see Quotas for Amazon Kendra.

Parameter maxResults : The maximum number of block lists to return.

Parameter nextToken : If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of block lists (BlockListSummaryItems).

Implementation

Future<ListQuerySuggestionsBlockListsResponse>
    listQuerySuggestionsBlockLists({
  required String indexId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSKendraFrontendService.ListQuerySuggestionsBlockLists'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'IndexId': indexId,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListQuerySuggestionsBlockListsResponse.fromJson(jsonResponse.body);
}