Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
Synopsis
- data CreateQuerySuggestionsBlockList = CreateQuerySuggestionsBlockList' {}
- newCreateQuerySuggestionsBlockList :: Text -> Text -> S3Path -> Text -> CreateQuerySuggestionsBlockList
- createQuerySuggestionsBlockList_clientToken :: Lens' CreateQuerySuggestionsBlockList (Maybe Text)
- createQuerySuggestionsBlockList_description :: Lens' CreateQuerySuggestionsBlockList (Maybe Text)
- createQuerySuggestionsBlockList_tags :: Lens' CreateQuerySuggestionsBlockList (Maybe [Tag])
- createQuerySuggestionsBlockList_indexId :: Lens' CreateQuerySuggestionsBlockList Text
- createQuerySuggestionsBlockList_name :: Lens' CreateQuerySuggestionsBlockList Text
- createQuerySuggestionsBlockList_sourceS3Path :: Lens' CreateQuerySuggestionsBlockList S3Path
- createQuerySuggestionsBlockList_roleArn :: Lens' CreateQuerySuggestionsBlockList Text
- data CreateQuerySuggestionsBlockListResponse = CreateQuerySuggestionsBlockListResponse' {
- id :: Maybe Text
- httpStatus :: Int
- newCreateQuerySuggestionsBlockListResponse :: Int -> CreateQuerySuggestionsBlockListResponse
- createQuerySuggestionsBlockListResponse_id :: Lens' CreateQuerySuggestionsBlockListResponse (Maybe Text)
- createQuerySuggestionsBlockListResponse_httpStatus :: Lens' CreateQuerySuggestionsBlockListResponse Int
Creating a Request
data CreateQuerySuggestionsBlockList Source #
See: newCreateQuerySuggestionsBlockList
smart constructor.
CreateQuerySuggestionsBlockList' | |
|
Instances
newCreateQuerySuggestionsBlockList Source #
:: Text | |
-> Text | |
-> S3Path | |
-> Text | |
-> CreateQuerySuggestionsBlockList |
Create a value of CreateQuerySuggestionsBlockList
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientToken:CreateQuerySuggestionsBlockList'
, createQuerySuggestionsBlockList_clientToken
- A token that you provide to identify the request to create a query
suggestions block list.
$sel:description:CreateQuerySuggestionsBlockList'
, createQuerySuggestionsBlockList_description
- A user-friendly description for the block list.
For example, the description "List of all offensive words that can appear in user queries and need to be blocked from suggestions."
$sel:tags:CreateQuerySuggestionsBlockList'
, createQuerySuggestionsBlockList_tags
- A tag that you can assign to a block list that categorizes the block
list.
$sel:indexId:CreateQuerySuggestionsBlockList'
, createQuerySuggestionsBlockList_indexId
- The identifier of the index you want to create a query suggestions block
list for.
CreateQuerySuggestionsBlockList
, createQuerySuggestionsBlockList_name
- A user friendly name for the block list.
For example, the block list named 'offensive-words' includes all offensive words that could appear in user queries and need to be blocked from suggestions.
$sel:sourceS3Path:CreateQuerySuggestionsBlockList'
, createQuerySuggestionsBlockList_sourceS3Path
- The S3 path to your block list text file in your S3 bucket.
Each block word or phrase should be on a separate line in a text file.
For information on the current quota limits for block lists, see Quotas for Amazon Kendra.
CreateQuerySuggestionsBlockList
, createQuerySuggestionsBlockList_roleArn
- The IAM (Identity and Access Management) role used by Amazon Kendra to
access the block list text file in your S3 bucket.
You need permissions to the role ARN (Amazon Web Services Resource Name). The role needs S3 read permissions to your file in S3 and needs to give STS (Security Token Service) assume role permissions to Amazon Kendra.
Request Lenses
createQuerySuggestionsBlockList_clientToken :: Lens' CreateQuerySuggestionsBlockList (Maybe Text) Source #
A token that you provide to identify the request to create a query suggestions block list.
createQuerySuggestionsBlockList_description :: Lens' CreateQuerySuggestionsBlockList (Maybe Text) Source #
A user-friendly description for the block list.
For example, the description "List of all offensive words that can appear in user queries and need to be blocked from suggestions."
createQuerySuggestionsBlockList_tags :: Lens' CreateQuerySuggestionsBlockList (Maybe [Tag]) Source #
A tag that you can assign to a block list that categorizes the block list.
createQuerySuggestionsBlockList_indexId :: Lens' CreateQuerySuggestionsBlockList Text Source #
The identifier of the index you want to create a query suggestions block list for.
createQuerySuggestionsBlockList_name :: Lens' CreateQuerySuggestionsBlockList Text Source #
A user friendly name for the block list.
For example, the block list named 'offensive-words' includes all offensive words that could appear in user queries and need to be blocked from suggestions.
createQuerySuggestionsBlockList_sourceS3Path :: Lens' CreateQuerySuggestionsBlockList S3Path Source #
The S3 path to your block list text file in your S3 bucket.
Each block word or phrase should be on a separate line in a text file.
For information on the current quota limits for block lists, see Quotas for Amazon Kendra.
createQuerySuggestionsBlockList_roleArn :: Lens' CreateQuerySuggestionsBlockList Text Source #
The IAM (Identity and Access Management) role used by Amazon Kendra to access the block list text file in your S3 bucket.
You need permissions to the role ARN (Amazon Web Services Resource Name). The role needs S3 read permissions to your file in S3 and needs to give STS (Security Token Service) assume role permissions to Amazon Kendra.
Destructuring the Response
data CreateQuerySuggestionsBlockListResponse Source #
See: newCreateQuerySuggestionsBlockListResponse
smart constructor.
CreateQuerySuggestionsBlockListResponse' | |
|
Instances
newCreateQuerySuggestionsBlockListResponse Source #
Create a value of CreateQuerySuggestionsBlockListResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateQuerySuggestionsBlockListResponse
, createQuerySuggestionsBlockListResponse_id
- The identifier of the created block list.
$sel:httpStatus:CreateQuerySuggestionsBlockListResponse'
, createQuerySuggestionsBlockListResponse_httpStatus
- The response's http status code.
Response Lenses
createQuerySuggestionsBlockListResponse_id :: Lens' CreateQuerySuggestionsBlockListResponse (Maybe Text) Source #
The identifier of the created block list.
createQuerySuggestionsBlockListResponse_httpStatus :: Lens' CreateQuerySuggestionsBlockListResponse Int Source #
The response's http status code.