updateQuerySuggestionsBlockList method

Future<void> updateQuerySuggestionsBlockList({
  1. required String id,
  2. required String indexId,
  3. String? description,
  4. String? name,
  5. String? roleArn,
  6. S3Path? sourceS3Path,
})

Updates a block list used for query suggestions for an index.

Updates to a block list might not take effect right away. Amazon Kendra needs to refresh the entire suggestions list to apply any updates to the block list. Other changes not related to the block list apply immediately.

If a block list is updating, then you need to wait for the first update to finish before submitting another update.

Amazon Kendra supports partial updates, so you only need to provide the fields you want to update.

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

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

Parameter id : The identifier of the block list you want to update.

Parameter indexId : The identifier of the index for the block list.

Parameter description : A new description for the block list.

Parameter name : A new name for the block list.

Parameter roleArn : The IAM (Identity and Access Management) role used to access the block list text file in S3.

Parameter sourceS3Path : The S3 path where your block list text file sits in S3.

If you update your block list and provide the same path to the block list text file in S3, then Amazon Kendra reloads the file to refresh the block list. Amazon Kendra does not automatically refresh your block list. You need to call the UpdateQuerySuggestionsBlockList API to refresh you block list.

If you update your block list, then Amazon Kendra asynchronously refreshes all query suggestions with the latest content in the S3 file. This means changes might not take effect immediately.

Implementation

Future<void> updateQuerySuggestionsBlockList({
  required String id,
  required String indexId,
  String? description,
  String? name,
  String? roleArn,
  S3Path? sourceS3Path,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSKendraFrontendService.UpdateQuerySuggestionsBlockList'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      'IndexId': indexId,
      if (description != null) 'Description': description,
      if (name != null) 'Name': name,
      if (roleArn != null) 'RoleArn': roleArn,
      if (sourceS3Path != null) 'SourceS3Path': sourceS3Path,
    },
  );
}