v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1465566486.4 KB

Creates a block list to exlcude certain queries from suggestions.

Any query that contains words or phrases specified in the block list is blocked or filtered out from being shown as a suggestion.

You need to provide the file location of your block list text file in your S3 bucket. In your text file, enter each block word or phrase on a separate line.

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

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

For an example of creating a block list for query suggestions using the Python SDK, see Query suggestions block list.

post/#X-Amz-Target=AWSKendraFrontendService.CreateQuerySuggestionsBlockList

Headers

X-Amz-Target'AWSKendraFrontendService.CreateQuerySuggestionsBlockList' required

Request body

IndexIdstring required

The identifier of the index you want to create a query suggestions block list for.

Namestring required
<p>A name for the block list.</p> <p>For example, the name 'offensive-words', which includes all offensive words that could appear in user queries and need to be blocked from suggestions.</p>
Descriptionstring
<p>A description for the block list.</p> <p>For example, the description "List of all offensive words that can appear in user queries and need to be blocked from suggestions."</p>
ClientTokenstring

A token that you provide to identify the request to create a query suggestions block list.

RoleArnstring required

The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket that contains the block list text file. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM access roles for Amazon Kendra</a>.

Response

Success

Idstring

The identifier of the block list.