com.amazonaws.services.kendra.AWSkendraClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-kendra Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.kendra;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.kendra.AWSkendraClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.kendra.model.*;
import com.amazonaws.services.kendra.model.transform.*;
/**
* Client for accessing kendra. All service calls made using this client are blocking, and will not return until the
* service call completes.
*
*
* Amazon Kendra is a service for indexing large document sets.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSkendraClient extends AmazonWebServiceClient implements AWSkendra {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSkendra.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "kendra";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.InvalidRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceUnavailableException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ResourceUnavailableExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceInUseException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ResourceInUseExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("FeaturedResultsConflictException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.FeaturedResultsConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistException").withExceptionUnmarshaller(
com.amazonaws.services.kendra.model.transform.ResourceAlreadyExistExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.kendra.model.AWSkendraException.class));
public static AWSkendraClientBuilder builder() {
return AWSkendraClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on kendra using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSkendraClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on kendra using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSkendraClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("kendra.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/kendra/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/kendra/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Grants users or groups in your IAM Identity Center identity source access to your Amazon Kendra experience. You
* can create an Amazon Kendra experience such as a search application. For more information on creating a search
* application experience, see Building a search
* experience with no code.
*
*
* @param associateEntitiesToExperienceRequest
* @return Result of the AssociateEntitiesToExperience operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ResourceAlreadyExistException
* The resource you want to use already exists. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.AssociateEntitiesToExperience
* @see AWS API Documentation
*/
@Override
public AssociateEntitiesToExperienceResult associateEntitiesToExperience(AssociateEntitiesToExperienceRequest request) {
request = beforeClientExecution(request);
return executeAssociateEntitiesToExperience(request);
}
@SdkInternalApi
final AssociateEntitiesToExperienceResult executeAssociateEntitiesToExperience(AssociateEntitiesToExperienceRequest associateEntitiesToExperienceRequest) {
ExecutionContext executionContext = createExecutionContext(associateEntitiesToExperienceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociateEntitiesToExperienceRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(associateEntitiesToExperienceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateEntitiesToExperience");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AssociateEntitiesToExperienceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Defines the specific permissions of users or groups in your IAM Identity Center identity source with access to
* your Amazon Kendra experience. You can create an Amazon Kendra experience such as a search application. For more
* information on creating a search application experience, see Building a search
* experience with no code.
*
*
* @param associatePersonasToEntitiesRequest
* @return Result of the AssociatePersonasToEntities operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ResourceAlreadyExistException
* The resource you want to use already exists. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.AssociatePersonasToEntities
* @see AWS API Documentation
*/
@Override
public AssociatePersonasToEntitiesResult associatePersonasToEntities(AssociatePersonasToEntitiesRequest request) {
request = beforeClientExecution(request);
return executeAssociatePersonasToEntities(request);
}
@SdkInternalApi
final AssociatePersonasToEntitiesResult executeAssociatePersonasToEntities(AssociatePersonasToEntitiesRequest associatePersonasToEntitiesRequest) {
ExecutionContext executionContext = createExecutionContext(associatePersonasToEntitiesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociatePersonasToEntitiesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(associatePersonasToEntitiesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociatePersonasToEntities");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AssociatePersonasToEntitiesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes one or more documents from an index. The documents must have been added with the
* BatchPutDocument
API.
*
*
* The documents are deleted asynchronously. You can see the progress of the deletion by using Amazon Web Services
* CloudWatch. Any error messages related to the processing of the batch are sent to your Amazon Web Services
* CloudWatch log. You can also use the BatchGetDocumentStatus
API to monitor the progress of deleting
* your documents.
*
*
* Deleting documents from an index using BatchDeleteDocument
could take up to an hour or more,
* depending on the number of documents you want to delete.
*
*
* @param batchDeleteDocumentRequest
* @return Result of the BatchDeleteDocument operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.BatchDeleteDocument
* @see AWS API
* Documentation
*/
@Override
public BatchDeleteDocumentResult batchDeleteDocument(BatchDeleteDocumentRequest request) {
request = beforeClientExecution(request);
return executeBatchDeleteDocument(request);
}
@SdkInternalApi
final BatchDeleteDocumentResult executeBatchDeleteDocument(BatchDeleteDocumentRequest batchDeleteDocumentRequest) {
ExecutionContext executionContext = createExecutionContext(batchDeleteDocumentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchDeleteDocumentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchDeleteDocumentRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteDocument");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDeleteDocumentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes one or more sets of featured results. Features results are placed above all other results for certain
* queries. If there's an exact match of a query, then one or more specific documents are featured in the search
* results.
*
*
* @param batchDeleteFeaturedResultsSetRequest
* @return Result of the BatchDeleteFeaturedResultsSet operation returned by the service.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.BatchDeleteFeaturedResultsSet
* @see AWS API Documentation
*/
@Override
public BatchDeleteFeaturedResultsSetResult batchDeleteFeaturedResultsSet(BatchDeleteFeaturedResultsSetRequest request) {
request = beforeClientExecution(request);
return executeBatchDeleteFeaturedResultsSet(request);
}
@SdkInternalApi
final BatchDeleteFeaturedResultsSetResult executeBatchDeleteFeaturedResultsSet(BatchDeleteFeaturedResultsSetRequest batchDeleteFeaturedResultsSetRequest) {
ExecutionContext executionContext = createExecutionContext(batchDeleteFeaturedResultsSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchDeleteFeaturedResultsSetRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchDeleteFeaturedResultsSetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteFeaturedResultsSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchDeleteFeaturedResultsSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the indexing status for one or more documents submitted with the BatchPutDocument API.
*
*
* When you use the BatchPutDocument
API, documents are indexed asynchronously. You can use the
* BatchGetDocumentStatus
API to get the current status of a list of documents so that you can
* determine if they have been successfully indexed.
*
*
* You can also use the BatchGetDocumentStatus
API to check the status of the BatchDeleteDocument API.
* When a document is deleted from the index, Amazon Kendra returns NOT_FOUND
as the status.
*
*
* @param batchGetDocumentStatusRequest
* @return Result of the BatchGetDocumentStatus operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.BatchGetDocumentStatus
* @see AWS
* API Documentation
*/
@Override
public BatchGetDocumentStatusResult batchGetDocumentStatus(BatchGetDocumentStatusRequest request) {
request = beforeClientExecution(request);
return executeBatchGetDocumentStatus(request);
}
@SdkInternalApi
final BatchGetDocumentStatusResult executeBatchGetDocumentStatus(BatchGetDocumentStatusRequest batchGetDocumentStatusRequest) {
ExecutionContext executionContext = createExecutionContext(batchGetDocumentStatusRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetDocumentStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetDocumentStatusRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetDocumentStatus");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchGetDocumentStatusResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds one or more documents to an index.
*
*
* The BatchPutDocument
API enables you to ingest inline documents or a set of documents stored in an
* Amazon S3 bucket. Use this API to ingest your text and unstructured text into an index, add custom attributes to
* the documents, and to attach an access control list to the documents added to the index.
*
*
* The documents are indexed asynchronously. You can see the progress of the batch using Amazon Web Services
* CloudWatch. Any error messages related to processing the batch are sent to your Amazon Web Services CloudWatch
* log. You can also use the BatchGetDocumentStatus
API to monitor the progress of indexing your
* documents.
*
*
* For an example of ingesting inline documents using Python and Java SDKs, see Adding files directly to an
* index.
*
*
* @param batchPutDocumentRequest
* @return Result of the BatchPutDocument operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.BatchPutDocument
* @see AWS API
* Documentation
*/
@Override
public BatchPutDocumentResult batchPutDocument(BatchPutDocumentRequest request) {
request = beforeClientExecution(request);
return executeBatchPutDocument(request);
}
@SdkInternalApi
final BatchPutDocumentResult executeBatchPutDocument(BatchPutDocumentRequest batchPutDocumentRequest) {
ExecutionContext executionContext = createExecutionContext(batchPutDocumentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchPutDocumentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchPutDocumentRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchPutDocument");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchPutDocumentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Clears existing query suggestions from an index.
*
*
* This deletes existing suggestions only, not the queries in the query log. After you clear suggestions, Amazon
* Kendra learns new suggestions based on new queries added to the query log from the time you cleared suggestions.
* If you do not see any new suggestions, then please allow Amazon Kendra to collect enough queries to learn new
* suggestions.
*
*
* ClearQuerySuggestions
is currently not supported in the Amazon Web Services GovCloud (US-West)
* region.
*
*
* @param clearQuerySuggestionsRequest
* @return Result of the ClearQuerySuggestions operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ClearQuerySuggestions
* @see AWS
* API Documentation
*/
@Override
public ClearQuerySuggestionsResult clearQuerySuggestions(ClearQuerySuggestionsRequest request) {
request = beforeClientExecution(request);
return executeClearQuerySuggestions(request);
}
@SdkInternalApi
final ClearQuerySuggestionsResult executeClearQuerySuggestions(ClearQuerySuggestionsRequest clearQuerySuggestionsRequest) {
ExecutionContext executionContext = createExecutionContext(clearQuerySuggestionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ClearQuerySuggestionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(clearQuerySuggestionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ClearQuerySuggestions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ClearQuerySuggestionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an access configuration for your documents. This includes user and group access information for your
* documents. This is useful for user context filtering, where search results are filtered based on the user or
* their group access to documents.
*
*
* You can use this to re-configure your existing document level access control without indexing all of your
* documents again. For example, your index contains top-secret company documents that only certain employees or
* users should access. One of these users leaves the company or switches to a team that should be blocked from
* accessing top-secret documents. The user still has access to top-secret documents because the user had access
* when your documents were previously indexed. You can create a specific access control configuration for the user
* with deny access. You can later update the access control configuration to allow access if the user returns to
* the company and re-joins the 'top-secret' team. You can re-configure access control for your documents as
* circumstances change.
*
*
* To apply your access control configuration to certain documents, you call the BatchPutDocument API with the
* AccessControlConfigurationId
included in the Document object. If you use an S3
* bucket as a data source, you update the .metadata.json
with the
* AccessControlConfigurationId
and synchronize your data source. Amazon Kendra currently only supports
* access control configuration for S3 data sources and documents indexed using the BatchPutDocument
* API.
*
*
* @param createAccessControlConfigurationRequest
* @return Result of the CreateAccessControlConfiguration operation returned by the service.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateAccessControlConfiguration
* @see AWS API Documentation
*/
@Override
public CreateAccessControlConfigurationResult createAccessControlConfiguration(CreateAccessControlConfigurationRequest request) {
request = beforeClientExecution(request);
return executeCreateAccessControlConfiguration(request);
}
@SdkInternalApi
final CreateAccessControlConfigurationResult executeCreateAccessControlConfiguration(
CreateAccessControlConfigurationRequest createAccessControlConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(createAccessControlConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAccessControlConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createAccessControlConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAccessControlConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateAccessControlConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a data source connector that you want to use with an Amazon Kendra index.
*
*
* You specify a name, data source connector type and description for your data source. You also specify
* configuration information for the data source connector.
*
*
* CreateDataSource
is a synchronous operation. The operation returns 200 if the data source was
* successfully created. Otherwise, an exception is raised.
*
*
* For an example of creating an index and data source using the Python SDK, see Getting started with Python SDK. For an
* example of creating an index and data source using the Java SDK, see Getting started with Java SDK.
*
*
* @param createDataSourceRequest
* @return Result of the CreateDataSource operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ResourceAlreadyExistException
* The resource you want to use already exists. Please check you have provided the correct resource and try
* again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateDataSource
* @see AWS API
* Documentation
*/
@Override
public CreateDataSourceResult createDataSource(CreateDataSourceRequest request) {
request = beforeClientExecution(request);
return executeCreateDataSource(request);
}
@SdkInternalApi
final CreateDataSourceResult executeCreateDataSource(CreateDataSourceRequest createDataSourceRequest) {
ExecutionContext executionContext = createExecutionContext(createDataSourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDataSourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDataSource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDataSourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an Amazon Kendra experience such as a search application. For more information on creating a search
* application experience, including using the Python and Java SDKs, see Building a search
* experience with no code.
*
*
* @param createExperienceRequest
* @return Result of the CreateExperience operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateExperience
* @see AWS API
* Documentation
*/
@Override
public CreateExperienceResult createExperience(CreateExperienceRequest request) {
request = beforeClientExecution(request);
return executeCreateExperience(request);
}
@SdkInternalApi
final CreateExperienceResult executeCreateExperience(CreateExperienceRequest createExperienceRequest) {
ExecutionContext executionContext = createExecutionContext(createExperienceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateExperienceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createExperienceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateExperience");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateExperienceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a set of frequently ask questions (FAQs) using a specified FAQ file stored in an Amazon S3 bucket.
*
*
* Adding FAQs to an index is an asynchronous operation.
*
*
* For an example of adding an FAQ to an index using Python and Java SDKs, see Using your FAQ file.
*
*
* @param createFaqRequest
* @return Result of the CreateFaq operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateFaq
* @see AWS API
* Documentation
*/
@Override
public CreateFaqResult createFaq(CreateFaqRequest request) {
request = beforeClientExecution(request);
return executeCreateFaq(request);
}
@SdkInternalApi
final CreateFaqResult executeCreateFaq(CreateFaqRequest createFaqRequest) {
ExecutionContext executionContext = createExecutionContext(createFaqRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateFaqRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createFaqRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateFaq");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateFaqResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a set of featured results to display at the top of the search results page. Featured results are placed
* above all other results for certain queries. You map specific queries to specific documents for featuring in the
* results. If a query contains an exact match, then one or more specific documents are featured in the search
* results.
*
*
* You can create up to 50 sets of featured results per index. You can request to increase this limit by contacting
* Support.
*
*
* @param createFeaturedResultsSetRequest
* @return Result of the CreateFeaturedResultsSet operation returned by the service.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws FeaturedResultsConflictException
* An error message with a list of conflicting queries used across different sets of featured results. This
* occurred with the request for a new featured results set. Check that the queries you specified for
* featured results are unique per featured results set for each index.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateFeaturedResultsSet
* @see AWS API Documentation
*/
@Override
public CreateFeaturedResultsSetResult createFeaturedResultsSet(CreateFeaturedResultsSetRequest request) {
request = beforeClientExecution(request);
return executeCreateFeaturedResultsSet(request);
}
@SdkInternalApi
final CreateFeaturedResultsSetResult executeCreateFeaturedResultsSet(CreateFeaturedResultsSetRequest createFeaturedResultsSetRequest) {
ExecutionContext executionContext = createExecutionContext(createFeaturedResultsSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateFeaturedResultsSetRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createFeaturedResultsSetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateFeaturedResultsSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateFeaturedResultsSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an Amazon Kendra index. Index creation is an asynchronous API. To determine if index creation has
* completed, check the Status
field returned from a call to DescribeIndex
. The
* Status
field is set to ACTIVE
when the index is ready to use.
*
*
* Once the index is active, you can index your documents using the BatchPutDocument
API or using one
* of the supported data sources.
*
*
* For an example of creating an index and data source using the Python SDK, see Getting started with Python SDK. For an
* example of creating an index and data source using the Java SDK, see Getting started with Java SDK.
*
*
* @param createIndexRequest
* @return Result of the CreateIndex operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceAlreadyExistException
* The resource you want to use already exists. Please check you have provided the correct resource and try
* again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateIndex
* @see AWS API
* Documentation
*/
@Override
public CreateIndexResult createIndex(CreateIndexRequest request) {
request = beforeClientExecution(request);
return executeCreateIndex(request);
}
@SdkInternalApi
final CreateIndexResult executeCreateIndex(CreateIndexRequest createIndexRequest) {
ExecutionContext executionContext = createExecutionContext(createIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateIndexRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createIndexRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateIndex");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateIndexResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* 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.
*
*
* @param createQuerySuggestionsBlockListRequest
* @return Result of the CreateQuerySuggestionsBlockList operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateQuerySuggestionsBlockList
* @see AWS API Documentation
*/
@Override
public CreateQuerySuggestionsBlockListResult createQuerySuggestionsBlockList(CreateQuerySuggestionsBlockListRequest request) {
request = beforeClientExecution(request);
return executeCreateQuerySuggestionsBlockList(request);
}
@SdkInternalApi
final CreateQuerySuggestionsBlockListResult executeCreateQuerySuggestionsBlockList(
CreateQuerySuggestionsBlockListRequest createQuerySuggestionsBlockListRequest) {
ExecutionContext executionContext = createExecutionContext(createQuerySuggestionsBlockListRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateQuerySuggestionsBlockListRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createQuerySuggestionsBlockListRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateQuerySuggestionsBlockList");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateQuerySuggestionsBlockListResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a thesaurus for an index. The thesaurus contains a list of synonyms in Solr format.
*
*
* For an example of adding a thesaurus file to an index, see Adding custom
* synonyms to an index.
*
*
* @param createThesaurusRequest
* @return Result of the CreateThesaurus operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.CreateThesaurus
* @see AWS API
* Documentation
*/
@Override
public CreateThesaurusResult createThesaurus(CreateThesaurusRequest request) {
request = beforeClientExecution(request);
return executeCreateThesaurus(request);
}
@SdkInternalApi
final CreateThesaurusResult executeCreateThesaurus(CreateThesaurusRequest createThesaurusRequest) {
ExecutionContext executionContext = createExecutionContext(createThesaurusRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateThesaurusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createThesaurusRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateThesaurus");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateThesaurusResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an access control configuration that you created for your documents in an index. This includes user and
* group access information for your documents. This is useful for user context filtering, where search results are
* filtered based on the user or their group access to documents.
*
*
* @param deleteAccessControlConfigurationRequest
* @return Result of the DeleteAccessControlConfiguration operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteAccessControlConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteAccessControlConfigurationResult deleteAccessControlConfiguration(DeleteAccessControlConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteAccessControlConfiguration(request);
}
@SdkInternalApi
final DeleteAccessControlConfigurationResult executeDeleteAccessControlConfiguration(
DeleteAccessControlConfigurationRequest deleteAccessControlConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAccessControlConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAccessControlConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteAccessControlConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAccessControlConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteAccessControlConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an Amazon Kendra data source connector. An exception is not thrown if the data source is already being
* deleted. While the data source is being deleted, the Status
field returned by a call to the
* DescribeDataSource
API is set to DELETING
. For more information, see Deleting Data Sources.
*
*
* Deleting an entire data source or re-syncing your index after deleting specific documents from a data source
* could take up to an hour or more, depending on the number of documents you want to delete.
*
*
* @param deleteDataSourceRequest
* @return Result of the DeleteDataSource operation returned by the service.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteDataSource
* @see AWS API
* Documentation
*/
@Override
public DeleteDataSourceResult deleteDataSource(DeleteDataSourceRequest request) {
request = beforeClientExecution(request);
return executeDeleteDataSource(request);
}
@SdkInternalApi
final DeleteDataSourceResult executeDeleteDataSource(DeleteDataSourceRequest deleteDataSourceRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDataSourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDataSourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDataSource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDataSourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes your Amazon Kendra experience such as a search application. For more information on creating a search
* application experience, see Building a search
* experience with no code.
*
*
* @param deleteExperienceRequest
* @return Result of the DeleteExperience operation returned by the service.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteExperience
* @see AWS API
* Documentation
*/
@Override
public DeleteExperienceResult deleteExperience(DeleteExperienceRequest request) {
request = beforeClientExecution(request);
return executeDeleteExperience(request);
}
@SdkInternalApi
final DeleteExperienceResult executeDeleteExperience(DeleteExperienceRequest deleteExperienceRequest) {
ExecutionContext executionContext = createExecutionContext(deleteExperienceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteExperienceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteExperienceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteExperience");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteExperienceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes an FAQ from an index.
*
*
* @param deleteFaqRequest
* @return Result of the DeleteFaq operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteFaq
* @see AWS API
* Documentation
*/
@Override
public DeleteFaqResult deleteFaq(DeleteFaqRequest request) {
request = beforeClientExecution(request);
return executeDeleteFaq(request);
}
@SdkInternalApi
final DeleteFaqResult executeDeleteFaq(DeleteFaqRequest deleteFaqRequest) {
ExecutionContext executionContext = createExecutionContext(deleteFaqRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteFaqRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteFaqRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFaq");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFaqResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an Amazon Kendra index. An exception is not thrown if the index is already being deleted. While the index
* is being deleted, the Status
field returned by a call to the DescribeIndex
API is set
* to DELETING
.
*
*
* @param deleteIndexRequest
* @return Result of the DeleteIndex operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteIndex
* @see AWS API
* Documentation
*/
@Override
public DeleteIndexResult deleteIndex(DeleteIndexRequest request) {
request = beforeClientExecution(request);
return executeDeleteIndex(request);
}
@SdkInternalApi
final DeleteIndexResult executeDeleteIndex(DeleteIndexRequest deleteIndexRequest) {
ExecutionContext executionContext = createExecutionContext(deleteIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteIndexRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteIndexRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIndex");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteIndexResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a group so that all users and sub groups that belong to the group can no longer access documents only
* available to that group.
*
*
* For example, after deleting the group "Summer Interns", all interns who belonged to that group no longer see
* intern-only documents in their search results.
*
*
* If you want to delete or replace users or sub groups of a group, you need to use the
* PutPrincipalMapping
operation. For example, if a user in the group "Engineering" leaves the
* engineering team and another user takes their place, you provide an updated list of users or sub groups that
* belong to the "Engineering" group when calling PutPrincipalMapping
. You can update your internal
* list of users or sub groups and input this list when calling PutPrincipalMapping
.
*
*
* DeletePrincipalMapping
is currently not supported in the Amazon Web Services GovCloud (US-West)
* region.
*
*
* @param deletePrincipalMappingRequest
* @return Result of the DeletePrincipalMapping operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeletePrincipalMapping
* @see AWS
* API Documentation
*/
@Override
public DeletePrincipalMappingResult deletePrincipalMapping(DeletePrincipalMappingRequest request) {
request = beforeClientExecution(request);
return executeDeletePrincipalMapping(request);
}
@SdkInternalApi
final DeletePrincipalMappingResult executeDeletePrincipalMapping(DeletePrincipalMappingRequest deletePrincipalMappingRequest) {
ExecutionContext executionContext = createExecutionContext(deletePrincipalMappingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePrincipalMappingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePrincipalMappingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePrincipalMapping");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeletePrincipalMappingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a block list used for query suggestions for an index.
*
*
* A deleted block list might not take effect right away. Amazon Kendra needs to refresh the entire suggestions list
* to add back the queries that were previously blocked.
*
*
* DeleteQuerySuggestionsBlockList
is currently not supported in the Amazon Web Services GovCloud
* (US-West) region.
*
*
* @param deleteQuerySuggestionsBlockListRequest
* @return Result of the DeleteQuerySuggestionsBlockList operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteQuerySuggestionsBlockList
* @see AWS API Documentation
*/
@Override
public DeleteQuerySuggestionsBlockListResult deleteQuerySuggestionsBlockList(DeleteQuerySuggestionsBlockListRequest request) {
request = beforeClientExecution(request);
return executeDeleteQuerySuggestionsBlockList(request);
}
@SdkInternalApi
final DeleteQuerySuggestionsBlockListResult executeDeleteQuerySuggestionsBlockList(
DeleteQuerySuggestionsBlockListRequest deleteQuerySuggestionsBlockListRequest) {
ExecutionContext executionContext = createExecutionContext(deleteQuerySuggestionsBlockListRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteQuerySuggestionsBlockListRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteQuerySuggestionsBlockListRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteQuerySuggestionsBlockList");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteQuerySuggestionsBlockListResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an Amazon Kendra thesaurus.
*
*
* @param deleteThesaurusRequest
* @return Result of the DeleteThesaurus operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DeleteThesaurus
* @see AWS API
* Documentation
*/
@Override
public DeleteThesaurusResult deleteThesaurus(DeleteThesaurusRequest request) {
request = beforeClientExecution(request);
return executeDeleteThesaurus(request);
}
@SdkInternalApi
final DeleteThesaurusResult executeDeleteThesaurus(DeleteThesaurusRequest deleteThesaurusRequest) {
ExecutionContext executionContext = createExecutionContext(deleteThesaurusRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteThesaurusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteThesaurusRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteThesaurus");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteThesaurusResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about an access control configuration that you created for your documents in an index. This
* includes user and group access information for your documents. This is useful for user context filtering, where
* search results are filtered based on the user or their group access to documents.
*
*
* @param describeAccessControlConfigurationRequest
* @return Result of the DescribeAccessControlConfiguration operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeAccessControlConfiguration
* @see AWS API Documentation
*/
@Override
public DescribeAccessControlConfigurationResult describeAccessControlConfiguration(DescribeAccessControlConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeAccessControlConfiguration(request);
}
@SdkInternalApi
final DescribeAccessControlConfigurationResult executeDescribeAccessControlConfiguration(
DescribeAccessControlConfigurationRequest describeAccessControlConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeAccessControlConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAccessControlConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeAccessControlConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAccessControlConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeAccessControlConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about an Amazon Kendra data source connector.
*
*
* @param describeDataSourceRequest
* @return Result of the DescribeDataSource operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeDataSource
* @see AWS API
* Documentation
*/
@Override
public DescribeDataSourceResult describeDataSource(DescribeDataSourceRequest request) {
request = beforeClientExecution(request);
return executeDescribeDataSource(request);
}
@SdkInternalApi
final DescribeDataSourceResult executeDescribeDataSource(DescribeDataSourceRequest describeDataSourceRequest) {
ExecutionContext executionContext = createExecutionContext(describeDataSourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDataSourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDataSource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDataSourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about your Amazon Kendra experience such as a search application. For more information on
* creating a search application experience, see Building a search
* experience with no code.
*
*
* @param describeExperienceRequest
* @return Result of the DescribeExperience operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeExperience
* @see AWS API
* Documentation
*/
@Override
public DescribeExperienceResult describeExperience(DescribeExperienceRequest request) {
request = beforeClientExecution(request);
return executeDescribeExperience(request);
}
@SdkInternalApi
final DescribeExperienceResult executeDescribeExperience(DescribeExperienceRequest describeExperienceRequest) {
ExecutionContext executionContext = createExecutionContext(describeExperienceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeExperienceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeExperienceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeExperience");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeExperienceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about an FAQ list.
*
*
* @param describeFaqRequest
* @return Result of the DescribeFaq operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeFaq
* @see AWS API
* Documentation
*/
@Override
public DescribeFaqResult describeFaq(DescribeFaqRequest request) {
request = beforeClientExecution(request);
return executeDescribeFaq(request);
}
@SdkInternalApi
final DescribeFaqResult executeDescribeFaq(DescribeFaqRequest describeFaqRequest) {
ExecutionContext executionContext = createExecutionContext(describeFaqRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeFaqRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeFaqRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFaq");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeFaqResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about a set of featured results. Features results are placed above all other results for certain
* queries. If there's an exact match of a query, then one or more specific documents are featured in the search
* results.
*
*
* @param describeFeaturedResultsSetRequest
* @return Result of the DescribeFeaturedResultsSet operation returned by the service.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeFeaturedResultsSet
* @see AWS API Documentation
*/
@Override
public DescribeFeaturedResultsSetResult describeFeaturedResultsSet(DescribeFeaturedResultsSetRequest request) {
request = beforeClientExecution(request);
return executeDescribeFeaturedResultsSet(request);
}
@SdkInternalApi
final DescribeFeaturedResultsSetResult executeDescribeFeaturedResultsSet(DescribeFeaturedResultsSetRequest describeFeaturedResultsSetRequest) {
ExecutionContext executionContext = createExecutionContext(describeFeaturedResultsSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeFeaturedResultsSetRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeFeaturedResultsSetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFeaturedResultsSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeFeaturedResultsSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about an Amazon Kendra index.
*
*
* @param describeIndexRequest
* @return Result of the DescribeIndex operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeIndex
* @see AWS API
* Documentation
*/
@Override
public DescribeIndexResult describeIndex(DescribeIndexRequest request) {
request = beforeClientExecution(request);
return executeDescribeIndex(request);
}
@SdkInternalApi
final DescribeIndexResult executeDescribeIndex(DescribeIndexRequest describeIndexRequest) {
ExecutionContext executionContext = createExecutionContext(describeIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeIndexRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeIndexRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeIndex");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeIndexResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the processing of PUT
and DELETE
actions for mapping users to their groups.
* This includes information on the status of actions currently processing or yet to be processed, when actions were
* last updated, when actions were received by Amazon Kendra, the latest action that should process and apply after
* other actions, and useful error messages if an action could not be processed.
*
*
* DescribePrincipalMapping
is currently not supported in the Amazon Web Services GovCloud (US-West)
* region.
*
*
* @param describePrincipalMappingRequest
* @return Result of the DescribePrincipalMapping operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribePrincipalMapping
* @see AWS API Documentation
*/
@Override
public DescribePrincipalMappingResult describePrincipalMapping(DescribePrincipalMappingRequest request) {
request = beforeClientExecution(request);
return executeDescribePrincipalMapping(request);
}
@SdkInternalApi
final DescribePrincipalMappingResult executeDescribePrincipalMapping(DescribePrincipalMappingRequest describePrincipalMappingRequest) {
ExecutionContext executionContext = createExecutionContext(describePrincipalMappingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribePrincipalMappingRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describePrincipalMappingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePrincipalMapping");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribePrincipalMappingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about a block list used for query suggestions for an index.
*
*
* This is used to check the current settings that are applied to a block list.
*
*
* DescribeQuerySuggestionsBlockList
is currently not supported in the Amazon Web Services GovCloud
* (US-West) region.
*
*
* @param describeQuerySuggestionsBlockListRequest
* @return Result of the DescribeQuerySuggestionsBlockList operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeQuerySuggestionsBlockList
* @see AWS API Documentation
*/
@Override
public DescribeQuerySuggestionsBlockListResult describeQuerySuggestionsBlockList(DescribeQuerySuggestionsBlockListRequest request) {
request = beforeClientExecution(request);
return executeDescribeQuerySuggestionsBlockList(request);
}
@SdkInternalApi
final DescribeQuerySuggestionsBlockListResult executeDescribeQuerySuggestionsBlockList(
DescribeQuerySuggestionsBlockListRequest describeQuerySuggestionsBlockListRequest) {
ExecutionContext executionContext = createExecutionContext(describeQuerySuggestionsBlockListRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeQuerySuggestionsBlockListRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeQuerySuggestionsBlockListRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeQuerySuggestionsBlockList");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeQuerySuggestionsBlockListResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information on the settings of query suggestions for an index.
*
*
* This is used to check the current settings applied to query suggestions.
*
*
* DescribeQuerySuggestionsConfig
is currently not supported in the Amazon Web Services GovCloud
* (US-West) region.
*
*
* @param describeQuerySuggestionsConfigRequest
* @return Result of the DescribeQuerySuggestionsConfig operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeQuerySuggestionsConfig
* @see AWS API Documentation
*/
@Override
public DescribeQuerySuggestionsConfigResult describeQuerySuggestionsConfig(DescribeQuerySuggestionsConfigRequest request) {
request = beforeClientExecution(request);
return executeDescribeQuerySuggestionsConfig(request);
}
@SdkInternalApi
final DescribeQuerySuggestionsConfigResult executeDescribeQuerySuggestionsConfig(DescribeQuerySuggestionsConfigRequest describeQuerySuggestionsConfigRequest) {
ExecutionContext executionContext = createExecutionContext(describeQuerySuggestionsConfigRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeQuerySuggestionsConfigRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeQuerySuggestionsConfigRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeQuerySuggestionsConfig");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeQuerySuggestionsConfigResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about an Amazon Kendra thesaurus.
*
*
* @param describeThesaurusRequest
* @return Result of the DescribeThesaurus operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DescribeThesaurus
* @see AWS API
* Documentation
*/
@Override
public DescribeThesaurusResult describeThesaurus(DescribeThesaurusRequest request) {
request = beforeClientExecution(request);
return executeDescribeThesaurus(request);
}
@SdkInternalApi
final DescribeThesaurusResult executeDescribeThesaurus(DescribeThesaurusRequest describeThesaurusRequest) {
ExecutionContext executionContext = createExecutionContext(describeThesaurusRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeThesaurusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeThesaurusRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeThesaurus");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeThesaurusResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Prevents users or groups in your IAM Identity Center identity source from accessing your Amazon Kendra
* experience. You can create an Amazon Kendra experience such as a search application. For more information on
* creating a search application experience, see Building a search
* experience with no code.
*
*
* @param disassociateEntitiesFromExperienceRequest
* @return Result of the DisassociateEntitiesFromExperience operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DisassociateEntitiesFromExperience
* @see AWS API Documentation
*/
@Override
public DisassociateEntitiesFromExperienceResult disassociateEntitiesFromExperience(DisassociateEntitiesFromExperienceRequest request) {
request = beforeClientExecution(request);
return executeDisassociateEntitiesFromExperience(request);
}
@SdkInternalApi
final DisassociateEntitiesFromExperienceResult executeDisassociateEntitiesFromExperience(
DisassociateEntitiesFromExperienceRequest disassociateEntitiesFromExperienceRequest) {
ExecutionContext executionContext = createExecutionContext(disassociateEntitiesFromExperienceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisassociateEntitiesFromExperienceRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(disassociateEntitiesFromExperienceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateEntitiesFromExperience");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisassociateEntitiesFromExperienceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes the specific permissions of users or groups in your IAM Identity Center identity source with access to
* your Amazon Kendra experience. You can create an Amazon Kendra experience such as a search application. For more
* information on creating a search application experience, see Building a search
* experience with no code.
*
*
* @param disassociatePersonasFromEntitiesRequest
* @return Result of the DisassociatePersonasFromEntities operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.DisassociatePersonasFromEntities
* @see AWS API Documentation
*/
@Override
public DisassociatePersonasFromEntitiesResult disassociatePersonasFromEntities(DisassociatePersonasFromEntitiesRequest request) {
request = beforeClientExecution(request);
return executeDisassociatePersonasFromEntities(request);
}
@SdkInternalApi
final DisassociatePersonasFromEntitiesResult executeDisassociatePersonasFromEntities(
DisassociatePersonasFromEntitiesRequest disassociatePersonasFromEntitiesRequest) {
ExecutionContext executionContext = createExecutionContext(disassociatePersonasFromEntitiesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisassociatePersonasFromEntitiesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(disassociatePersonasFromEntitiesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociatePersonasFromEntities");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisassociatePersonasFromEntitiesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Fetches the queries that are suggested to your users.
*
*
* GetQuerySuggestions
is currently not supported in the Amazon Web Services GovCloud (US-West) region.
*
*
* @param getQuerySuggestionsRequest
* @return Result of the GetQuerySuggestions operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.GetQuerySuggestions
* @see AWS API
* Documentation
*/
@Override
public GetQuerySuggestionsResult getQuerySuggestions(GetQuerySuggestionsRequest request) {
request = beforeClientExecution(request);
return executeGetQuerySuggestions(request);
}
@SdkInternalApi
final GetQuerySuggestionsResult executeGetQuerySuggestions(GetQuerySuggestionsRequest getQuerySuggestionsRequest) {
ExecutionContext executionContext = createExecutionContext(getQuerySuggestionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetQuerySuggestionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getQuerySuggestionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetQuerySuggestions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetQuerySuggestionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves search metrics data. The data provides a snapshot of how your users interact with your search
* application and how effective the application is.
*
*
* @param getSnapshotsRequest
* @return Result of the GetSnapshots operation returned by the service.
* @throws InvalidRequestException
* The input to the request is not valid. Please provide the correct input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.GetSnapshots
* @see AWS API
* Documentation
*/
@Override
public GetSnapshotsResult getSnapshots(GetSnapshotsRequest request) {
request = beforeClientExecution(request);
return executeGetSnapshots(request);
}
@SdkInternalApi
final GetSnapshotsResult executeGetSnapshots(GetSnapshotsRequest getSnapshotsRequest) {
ExecutionContext executionContext = createExecutionContext(getSnapshotsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetSnapshotsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getSnapshotsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSnapshots");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetSnapshotsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists one or more access control configurations for an index. This includes user and group access information for
* your documents. This is useful for user context filtering, where search results are filtered based on the user or
* their group access to documents.
*
*
* @param listAccessControlConfigurationsRequest
* @return Result of the ListAccessControlConfigurations operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListAccessControlConfigurations
* @see AWS API Documentation
*/
@Override
public ListAccessControlConfigurationsResult listAccessControlConfigurations(ListAccessControlConfigurationsRequest request) {
request = beforeClientExecution(request);
return executeListAccessControlConfigurations(request);
}
@SdkInternalApi
final ListAccessControlConfigurationsResult executeListAccessControlConfigurations(
ListAccessControlConfigurationsRequest listAccessControlConfigurationsRequest) {
ExecutionContext executionContext = createExecutionContext(listAccessControlConfigurationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAccessControlConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listAccessControlConfigurationsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAccessControlConfigurations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListAccessControlConfigurationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets statistics about synchronizing a data source connector.
*
*
* @param listDataSourceSyncJobsRequest
* @return Result of the ListDataSourceSyncJobs operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListDataSourceSyncJobs
* @see AWS
* API Documentation
*/
@Override
public ListDataSourceSyncJobsResult listDataSourceSyncJobs(ListDataSourceSyncJobsRequest request) {
request = beforeClientExecution(request);
return executeListDataSourceSyncJobs(request);
}
@SdkInternalApi
final ListDataSourceSyncJobsResult executeListDataSourceSyncJobs(ListDataSourceSyncJobsRequest listDataSourceSyncJobsRequest) {
ExecutionContext executionContext = createExecutionContext(listDataSourceSyncJobsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDataSourceSyncJobsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDataSourceSyncJobsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDataSourceSyncJobs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListDataSourceSyncJobsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the data source connectors that you have created.
*
*
* @param listDataSourcesRequest
* @return Result of the ListDataSources operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListDataSources
* @see AWS API
* Documentation
*/
@Override
public ListDataSourcesResult listDataSources(ListDataSourcesRequest request) {
request = beforeClientExecution(request);
return executeListDataSources(request);
}
@SdkInternalApi
final ListDataSourcesResult executeListDataSources(ListDataSourcesRequest listDataSourcesRequest) {
ExecutionContext executionContext = createExecutionContext(listDataSourcesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDataSourcesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDataSourcesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDataSources");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDataSourcesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists specific permissions of users and groups with access to your Amazon Kendra experience.
*
*
* @param listEntityPersonasRequest
* @return Result of the ListEntityPersonas operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListEntityPersonas
* @see AWS API
* Documentation
*/
@Override
public ListEntityPersonasResult listEntityPersonas(ListEntityPersonasRequest request) {
request = beforeClientExecution(request);
return executeListEntityPersonas(request);
}
@SdkInternalApi
final ListEntityPersonasResult executeListEntityPersonas(ListEntityPersonasRequest listEntityPersonasRequest) {
ExecutionContext executionContext = createExecutionContext(listEntityPersonasRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListEntityPersonasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEntityPersonasRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEntityPersonas");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEntityPersonasResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists users or groups in your IAM Identity Center identity source that are granted access to your Amazon Kendra
* experience. You can create an Amazon Kendra experience such as a search application. For more information on
* creating a search application experience, see Building a search
* experience with no code.
*
*
* @param listExperienceEntitiesRequest
* @return Result of the ListExperienceEntities operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListExperienceEntities
* @see AWS
* API Documentation
*/
@Override
public ListExperienceEntitiesResult listExperienceEntities(ListExperienceEntitiesRequest request) {
request = beforeClientExecution(request);
return executeListExperienceEntities(request);
}
@SdkInternalApi
final ListExperienceEntitiesResult executeListExperienceEntities(ListExperienceEntitiesRequest listExperienceEntitiesRequest) {
ExecutionContext executionContext = createExecutionContext(listExperienceEntitiesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListExperienceEntitiesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listExperienceEntitiesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListExperienceEntities");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListExperienceEntitiesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists one or more Amazon Kendra experiences. You can create an Amazon Kendra experience such as a search
* application. For more information on creating a search application experience, see Building a search
* experience with no code.
*
*
* @param listExperiencesRequest
* @return Result of the ListExperiences operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListExperiences
* @see AWS API
* Documentation
*/
@Override
public ListExperiencesResult listExperiences(ListExperiencesRequest request) {
request = beforeClientExecution(request);
return executeListExperiences(request);
}
@SdkInternalApi
final ListExperiencesResult executeListExperiences(ListExperiencesRequest listExperiencesRequest) {
ExecutionContext executionContext = createExecutionContext(listExperiencesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListExperiencesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listExperiencesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListExperiences");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListExperiencesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets a list of FAQ lists associated with an index.
*
*
* @param listFaqsRequest
* @return Result of the ListFaqs operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListFaqs
* @see AWS API
* Documentation
*/
@Override
public ListFaqsResult listFaqs(ListFaqsRequest request) {
request = beforeClientExecution(request);
return executeListFaqs(request);
}
@SdkInternalApi
final ListFaqsResult executeListFaqs(ListFaqsRequest listFaqsRequest) {
ExecutionContext executionContext = createExecutionContext(listFaqsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListFaqsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFaqsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFaqs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFaqsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all your sets of featured results for a given index. Features results are placed above all other results
* for certain queries. If there's an exact match of a query, then one or more specific documents are featured in
* the search results.
*
*
* @param listFeaturedResultsSetsRequest
* @return Result of the ListFeaturedResultsSets operation returned by the service.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListFeaturedResultsSets
* @see AWS
* API Documentation
*/
@Override
public ListFeaturedResultsSetsResult listFeaturedResultsSets(ListFeaturedResultsSetsRequest request) {
request = beforeClientExecution(request);
return executeListFeaturedResultsSets(request);
}
@SdkInternalApi
final ListFeaturedResultsSetsResult executeListFeaturedResultsSets(ListFeaturedResultsSetsRequest listFeaturedResultsSetsRequest) {
ExecutionContext executionContext = createExecutionContext(listFeaturedResultsSetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListFeaturedResultsSetsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listFeaturedResultsSetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFeaturedResultsSets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListFeaturedResultsSetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides a list of groups that are mapped to users before a given ordering or timestamp identifier.
*
*
* ListGroupsOlderThanOrderingId
is currently not supported in the Amazon Web Services GovCloud
* (US-West) region.
*
*
* @param listGroupsOlderThanOrderingIdRequest
* @return Result of the ListGroupsOlderThanOrderingId operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListGroupsOlderThanOrderingId
* @see AWS API Documentation
*/
@Override
public ListGroupsOlderThanOrderingIdResult listGroupsOlderThanOrderingId(ListGroupsOlderThanOrderingIdRequest request) {
request = beforeClientExecution(request);
return executeListGroupsOlderThanOrderingId(request);
}
@SdkInternalApi
final ListGroupsOlderThanOrderingIdResult executeListGroupsOlderThanOrderingId(ListGroupsOlderThanOrderingIdRequest listGroupsOlderThanOrderingIdRequest) {
ExecutionContext executionContext = createExecutionContext(listGroupsOlderThanOrderingIdRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListGroupsOlderThanOrderingIdRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listGroupsOlderThanOrderingIdRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListGroupsOlderThanOrderingId");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListGroupsOlderThanOrderingIdResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the Amazon Kendra indexes that you created.
*
*
* @param listIndicesRequest
* @return Result of the ListIndices operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListIndices
* @see AWS API
* Documentation
*/
@Override
public ListIndicesResult listIndices(ListIndicesRequest request) {
request = beforeClientExecution(request);
return executeListIndices(request);
}
@SdkInternalApi
final ListIndicesResult executeListIndices(ListIndicesRequest listIndicesRequest) {
ExecutionContext executionContext = createExecutionContext(listIndicesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListIndicesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIndicesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIndices");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIndicesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* 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.
*
*
* @param listQuerySuggestionsBlockListsRequest
* @return Result of the ListQuerySuggestionsBlockLists operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListQuerySuggestionsBlockLists
* @see AWS API Documentation
*/
@Override
public ListQuerySuggestionsBlockListsResult listQuerySuggestionsBlockLists(ListQuerySuggestionsBlockListsRequest request) {
request = beforeClientExecution(request);
return executeListQuerySuggestionsBlockLists(request);
}
@SdkInternalApi
final ListQuerySuggestionsBlockListsResult executeListQuerySuggestionsBlockLists(ListQuerySuggestionsBlockListsRequest listQuerySuggestionsBlockListsRequest) {
ExecutionContext executionContext = createExecutionContext(listQuerySuggestionsBlockListsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListQuerySuggestionsBlockListsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listQuerySuggestionsBlockListsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListQuerySuggestionsBlockLists");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListQuerySuggestionsBlockListsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets a list of tags associated with a specified resource. Indexes, FAQs, and data sources can have tags
* associated with them.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceUnavailableException
* The resource you want to use isn't available. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListTagsForResource
* @see AWS API
* Documentation
*/
@Override
public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) {
request = beforeClientExecution(request);
return executeListTagsForResource(request);
}
@SdkInternalApi
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {
ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the thesauri for an index.
*
*
* @param listThesauriRequest
* @return Result of the ListThesauri operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.ListThesauri
* @see AWS API
* Documentation
*/
@Override
public ListThesauriResult listThesauri(ListThesauriRequest request) {
request = beforeClientExecution(request);
return executeListThesauri(request);
}
@SdkInternalApi
final ListThesauriResult executeListThesauri(ListThesauriRequest listThesauriRequest) {
ExecutionContext executionContext = createExecutionContext(listThesauriRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListThesauriRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listThesauriRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListThesauri");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListThesauriResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Maps users to their groups so that you only need to provide the user ID when you issue the query.
*
*
* You can also map sub groups to groups. For example, the group "Company Intellectual Property Teams" includes sub
* groups "Research" and "Engineering". These sub groups include their own list of users or people who work in these
* teams. Only users who work in research and engineering, and therefore belong in the intellectual property group,
* can see top-secret company documents in their search results.
*
*
* This is useful for user context filtering, where search results are filtered based on the user or their group
* access to documents. For more information, see Filtering on user context.
*
*
* If more than five PUT
actions for a group are currently processing, a validation exception is
* thrown.
*
*
* @param putPrincipalMappingRequest
* @return Result of the PutPrincipalMapping operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.PutPrincipalMapping
* @see AWS API
* Documentation
*/
@Override
public PutPrincipalMappingResult putPrincipalMapping(PutPrincipalMappingRequest request) {
request = beforeClientExecution(request);
return executePutPrincipalMapping(request);
}
@SdkInternalApi
final PutPrincipalMappingResult executePutPrincipalMapping(PutPrincipalMappingRequest putPrincipalMappingRequest) {
ExecutionContext executionContext = createExecutionContext(putPrincipalMappingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutPrincipalMappingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putPrincipalMappingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutPrincipalMapping");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutPrincipalMappingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Searches an index given an input query.
*
*
*
* If you are working with large language models (LLMs) or implementing retrieval augmented generation (RAG)
* systems, you can use Amazon Kendra's Retrieve API, which can
* return longer semantically relevant passages. We recommend using the Retrieve
API instead of filing
* a service limit increase to increase the Query
API document excerpt length.
*
*
*
* You can configure boosting or relevance tuning at the query level to override boosting at the index level, filter
* based on document fields/attributes and faceted search, and filter based on the user or their group access to
* documents. You can also include certain fields in the response that might provide useful additional information.
*
*
* A query response contains three types of results.
*
*
* -
*
* Relevant suggested answers. The answers can be either a text excerpt or table excerpt. The answer can be
* highlighted in the excerpt.
*
*
* -
*
* Matching FAQs or questions-answer from your FAQ file.
*
*
* -
*
* Relevant documents. This result type includes an excerpt of the document with the document title. The searched
* terms can be highlighted in the excerpt.
*
*
*
*
* You can specify that the query return only one type of result using the QueryResultTypeFilter
* parameter. Each query returns the 100 most relevant results. If you filter result type to only question-answers,
* a maximum of four results are returned. If you filter result type to only answers, a maximum of three results are
* returned.
*
*
* @param queryRequest
* @return Result of the Query operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.Query
* @see AWS API
* Documentation
*/
@Override
public QueryResult query(QueryRequest request) {
request = beforeClientExecution(request);
return executeQuery(request);
}
@SdkInternalApi
final QueryResult executeQuery(QueryRequest queryRequest) {
ExecutionContext executionContext = createExecutionContext(queryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new QueryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(queryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "Query");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new QueryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves relevant passages or text excerpts given an input query.
*
*
* This API is similar to the Query API. However, by default,
* the Query
API only returns excerpt passages of up to 100 token words. With the Retrieve
* API, you can retrieve longer passages of up to 200 token words and up to 100 semantically relevant passages. This
* doesn't include question-answer or FAQ type responses from your index. The passages are text excerpts that can be
* semantically extracted from multiple documents and multiple parts of the same document. If in extreme cases your
* documents produce zero passages using the Retrieve
API, you can alternatively use the
* Query
API and its types of responses.
*
*
* You can also do the following:
*
*
* -
*
* Override boosting at the index level
*
*
* -
*
* Filter based on document fields or attributes
*
*
* -
*
* Filter based on the user or their group access to documents
*
*
* -
*
* View the confidence score bucket for a retrieved passage result. The confidence bucket provides a relative
* ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.
*
*
*
* Confidence score buckets are currently available only for English.
*
*
*
*
* You can also include certain fields in the response that might provide useful additional information.
*
*
* The Retrieve
API shares the number of query capacity
* units that you set for your index. For more information on what's included in a single capacity unit and the
* default base capacity for an index, see Adjusting capacity.
*
*
* @param retrieveRequest
* @return Result of the Retrieve operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.Retrieve
* @see AWS API
* Documentation
*/
@Override
public RetrieveResult retrieve(RetrieveRequest request) {
request = beforeClientExecution(request);
return executeRetrieve(request);
}
@SdkInternalApi
final RetrieveResult executeRetrieve(RetrieveRequest retrieveRequest) {
ExecutionContext executionContext = createExecutionContext(retrieveRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new RetrieveRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(retrieveRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "Retrieve");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new RetrieveResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Starts a synchronization job for a data source connector. If a synchronization job is already in progress, Amazon
* Kendra returns a ResourceInUseException
exception.
*
*
* Re-syncing your data source with your index after modifying, adding, or deleting documents from your data source
* respository could take up to an hour or more, depending on the number of documents to sync.
*
*
* @param startDataSourceSyncJobRequest
* @return Result of the StartDataSourceSyncJob operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ResourceInUseException
* The resource you want to use is currently in use. Please check you have provided the correct resource and
* try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.StartDataSourceSyncJob
* @see AWS
* API Documentation
*/
@Override
public StartDataSourceSyncJobResult startDataSourceSyncJob(StartDataSourceSyncJobRequest request) {
request = beforeClientExecution(request);
return executeStartDataSourceSyncJob(request);
}
@SdkInternalApi
final StartDataSourceSyncJobResult executeStartDataSourceSyncJob(StartDataSourceSyncJobRequest startDataSourceSyncJobRequest) {
ExecutionContext executionContext = createExecutionContext(startDataSourceSyncJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartDataSourceSyncJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startDataSourceSyncJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartDataSourceSyncJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StartDataSourceSyncJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Stops a synchronization job that is currently running. You can't stop a scheduled synchronization job.
*
*
* @param stopDataSourceSyncJobRequest
* @return Result of the StopDataSourceSyncJob operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.StopDataSourceSyncJob
* @see AWS
* API Documentation
*/
@Override
public StopDataSourceSyncJobResult stopDataSourceSyncJob(StopDataSourceSyncJobRequest request) {
request = beforeClientExecution(request);
return executeStopDataSourceSyncJob(request);
}
@SdkInternalApi
final StopDataSourceSyncJobResult executeStopDataSourceSyncJob(StopDataSourceSyncJobRequest stopDataSourceSyncJobRequest) {
ExecutionContext executionContext = createExecutionContext(stopDataSourceSyncJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StopDataSourceSyncJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopDataSourceSyncJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopDataSourceSyncJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StopDataSourceSyncJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Enables you to provide feedback to Amazon Kendra to improve the performance of your index.
*
*
* SubmitFeedback
is currently not supported in the Amazon Web Services GovCloud (US-West) region.
*
*
* @param submitFeedbackRequest
* @return Result of the SubmitFeedback operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceUnavailableException
* The resource you want to use isn't available. Please check you have provided the correct resource and try
* again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.SubmitFeedback
* @see AWS API
* Documentation
*/
@Override
public SubmitFeedbackResult submitFeedback(SubmitFeedbackRequest request) {
request = beforeClientExecution(request);
return executeSubmitFeedback(request);
}
@SdkInternalApi
final SubmitFeedbackResult executeSubmitFeedback(SubmitFeedbackRequest submitFeedbackRequest) {
ExecutionContext executionContext = createExecutionContext(submitFeedbackRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SubmitFeedbackRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(submitFeedbackRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SubmitFeedback");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SubmitFeedbackResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds the specified tag to the specified index, FAQ, or data source resource. If the tag already exists, the
* existing value is replaced with the new value.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceUnavailableException
* The resource you want to use isn't available. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.TagResource
* @see AWS API
* Documentation
*/
@Override
public TagResourceResult tagResource(TagResourceRequest request) {
request = beforeClientExecution(request);
return executeTagResource(request);
}
@SdkInternalApi
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(tagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes a tag from an index, FAQ, or a data source.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceUnavailableException
* The resource you want to use isn't available. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UntagResource
* @see AWS API
* Documentation
*/
@Override
public UntagResourceResult untagResource(UntagResourceRequest request) {
request = beforeClientExecution(request);
return executeUntagResource(request);
}
@SdkInternalApi
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(untagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an access control configuration for your documents in an index. This includes user and group access
* information for your documents. This is useful for user context filtering, where search results are filtered
* based on the user or their group access to documents.
*
*
* You can update an access control configuration you created without indexing all of your documents again. For
* example, your index contains top-secret company documents that only certain employees or users should access. You
* created an 'allow' access control configuration for one user who recently joined the 'top-secret' team, switching
* from a team with 'deny' access to top-secret documents. However, the user suddenly returns to their previous team
* and should no longer have access to top secret documents. You can update the access control configuration to
* re-configure access control for your documents as circumstances change.
*
*
* You call the BatchPutDocument API to apply
* the updated access control configuration, with the AccessControlConfigurationId
included in the Document object. If you use an S3
* bucket as a data source, you synchronize your data source to apply the AccessControlConfigurationId
* in the .metadata.json
file. Amazon Kendra currently only supports access control configuration for
* S3 data sources and documents indexed using the BatchPutDocument
API.
*
*
* @param updateAccessControlConfigurationRequest
* @return Result of the UpdateAccessControlConfiguration operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateAccessControlConfiguration
* @see AWS API Documentation
*/
@Override
public UpdateAccessControlConfigurationResult updateAccessControlConfiguration(UpdateAccessControlConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateAccessControlConfiguration(request);
}
@SdkInternalApi
final UpdateAccessControlConfigurationResult executeUpdateAccessControlConfiguration(
UpdateAccessControlConfigurationRequest updateAccessControlConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(updateAccessControlConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAccessControlConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateAccessControlConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAccessControlConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateAccessControlConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an Amazon Kendra data source connector.
*
*
* @param updateDataSourceRequest
* @return Result of the UpdateDataSource operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateDataSource
* @see AWS API
* Documentation
*/
@Override
public UpdateDataSourceResult updateDataSource(UpdateDataSourceRequest request) {
request = beforeClientExecution(request);
return executeUpdateDataSource(request);
}
@SdkInternalApi
final UpdateDataSourceResult executeUpdateDataSource(UpdateDataSourceRequest updateDataSourceRequest) {
ExecutionContext executionContext = createExecutionContext(updateDataSourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDataSourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDataSource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDataSourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates your Amazon Kendra experience such as a search application. For more information on creating a search
* application experience, see Building a search
* experience with no code.
*
*
* @param updateExperienceRequest
* @return Result of the UpdateExperience operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateExperience
* @see AWS API
* Documentation
*/
@Override
public UpdateExperienceResult updateExperience(UpdateExperienceRequest request) {
request = beforeClientExecution(request);
return executeUpdateExperience(request);
}
@SdkInternalApi
final UpdateExperienceResult executeUpdateExperience(UpdateExperienceRequest updateExperienceRequest) {
ExecutionContext executionContext = createExecutionContext(updateExperienceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateExperienceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateExperienceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateExperience");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateExperienceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates a set of featured results. Features results are placed above all other results for certain queries. You
* map specific queries to specific documents for featuring in the results. If a query contains an exact match of a
* query, then one or more specific documents are featured in the search results.
*
*
* @param updateFeaturedResultsSetRequest
* @return Result of the UpdateFeaturedResultsSet operation returned by the service.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws FeaturedResultsConflictException
* An error message with a list of conflicting queries used across different sets of featured results. This
* occurred with the request for a new featured results set. Check that the queries you specified for
* featured results are unique per featured results set for each index.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateFeaturedResultsSet
* @see AWS API Documentation
*/
@Override
public UpdateFeaturedResultsSetResult updateFeaturedResultsSet(UpdateFeaturedResultsSetRequest request) {
request = beforeClientExecution(request);
return executeUpdateFeaturedResultsSet(request);
}
@SdkInternalApi
final UpdateFeaturedResultsSetResult executeUpdateFeaturedResultsSet(UpdateFeaturedResultsSetRequest updateFeaturedResultsSetRequest) {
ExecutionContext executionContext = createExecutionContext(updateFeaturedResultsSetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateFeaturedResultsSetRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateFeaturedResultsSetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFeaturedResultsSet");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateFeaturedResultsSetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an Amazon Kendra index.
*
*
* @param updateIndexRequest
* @return Result of the UpdateIndex operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ServiceQuotaExceededException
* You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or
* contact Support to inquire about an increase of limits.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateIndex
* @see AWS API
* Documentation
*/
@Override
public UpdateIndexResult updateIndex(UpdateIndexRequest request) {
request = beforeClientExecution(request);
return executeUpdateIndex(request);
}
@SdkInternalApi
final UpdateIndexResult executeUpdateIndex(UpdateIndexRequest updateIndexRequest) {
ExecutionContext executionContext = createExecutionContext(updateIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateIndexRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateIndexRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateIndex");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateIndexResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* 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.
*
*
* @param updateQuerySuggestionsBlockListRequest
* @return Result of the UpdateQuerySuggestionsBlockList operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateQuerySuggestionsBlockList
* @see AWS API Documentation
*/
@Override
public UpdateQuerySuggestionsBlockListResult updateQuerySuggestionsBlockList(UpdateQuerySuggestionsBlockListRequest request) {
request = beforeClientExecution(request);
return executeUpdateQuerySuggestionsBlockList(request);
}
@SdkInternalApi
final UpdateQuerySuggestionsBlockListResult executeUpdateQuerySuggestionsBlockList(
UpdateQuerySuggestionsBlockListRequest updateQuerySuggestionsBlockListRequest) {
ExecutionContext executionContext = createExecutionContext(updateQuerySuggestionsBlockListRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateQuerySuggestionsBlockListRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateQuerySuggestionsBlockListRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateQuerySuggestionsBlockList");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateQuerySuggestionsBlockListResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the settings of query suggestions for an index.
*
*
* Amazon Kendra supports partial updates, so you only need to provide the fields you want to update.
*
*
* If an update is currently processing, you need to wait for the update to finish before making another update.
*
*
* Updates to query suggestions settings might not take effect right away. The time for your updated settings to
* take effect depends on the updates made and the number of search queries in your index.
*
*
* You can still enable/disable query suggestions at any time.
*
*
* UpdateQuerySuggestionsConfig
is currently not supported in the Amazon Web Services GovCloud
* (US-West) region.
*
*
* @param updateQuerySuggestionsConfigRequest
* @return Result of the UpdateQuerySuggestionsConfig operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateQuerySuggestionsConfig
* @see AWS API Documentation
*/
@Override
public UpdateQuerySuggestionsConfigResult updateQuerySuggestionsConfig(UpdateQuerySuggestionsConfigRequest request) {
request = beforeClientExecution(request);
return executeUpdateQuerySuggestionsConfig(request);
}
@SdkInternalApi
final UpdateQuerySuggestionsConfigResult executeUpdateQuerySuggestionsConfig(UpdateQuerySuggestionsConfigRequest updateQuerySuggestionsConfigRequest) {
ExecutionContext executionContext = createExecutionContext(updateQuerySuggestionsConfigRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateQuerySuggestionsConfigRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateQuerySuggestionsConfigRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateQuerySuggestionsConfig");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateQuerySuggestionsConfigResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates a thesaurus for an index.
*
*
* @param updateThesaurusRequest
* @return Result of the UpdateThesaurus operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct
* input and try again.
* @throws ResourceNotFoundException
* The resource you want to use doesn’t exist. Please check you have provided the correct resource and try
* again.
* @throws ThrottlingException
* The request was denied due to request throttling. Please reduce the number of requests and try again.
* @throws AccessDeniedException
* You don't have sufficient access to perform this action. Please ensure you have the required permission
* policies and user accounts and try again.
* @throws ConflictException
* A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
* @throws InternalServerException
* An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes
* and try again, or contact Support for help.
* @sample AWSkendra.UpdateThesaurus
* @see AWS API
* Documentation
*/
@Override
public UpdateThesaurusResult updateThesaurus(UpdateThesaurusRequest request) {
request = beforeClientExecution(request);
return executeUpdateThesaurus(request);
}
@SdkInternalApi
final UpdateThesaurusResult executeUpdateThesaurus(UpdateThesaurusRequest updateThesaurusRequest) {
ExecutionContext executionContext = createExecutionContext(updateThesaurusRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateThesaurusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateThesaurusRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateThesaurus");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateThesaurusResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns additional metadata for a previously executed successful, request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext) {
return invoke(request, responseHandler, executionContext, null, null);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
}
/**
* Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
* be ignored for this operation.
**/
private Response anonymousInvoke(Request request,
HttpResponseHandler> responseHandler, ExecutionContext executionContext) {
return doInvoke(request, responseHandler, executionContext, null, null);
}
/**
* Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
* ExecutionContext beforehand.
**/
private Response doInvoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
if (discoveredEndpoint != null) {
request.setEndpoint(discoveredEndpoint);
request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
} else if (uriFromEndpointTrait != null) {
request.setEndpoint(uriFromEndpointTrait);
} else {
request.setEndpoint(endpoint);
}
request.setTimeOffset(timeOffset);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
return client.execute(request, responseHandler, errorResponseHandler, executionContext);
}
@com.amazonaws.annotation.SdkInternalApi
static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() {
return protocolFactory;
}
@Override
public void shutdown() {
super.shutdown();
}
}