/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace KendraRanking
{
/**
* Amazon Kendra Intelligent Ranking uses Amazon Kendra semantic search
* capabilities to intelligently re-rank a search service's results.
*/
class AWS_KENDRARANKING_API KendraRankingClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef KendraRankingClientConfiguration ClientConfigurationType;
typedef KendraRankingEndpointProvider EndpointProviderType;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
KendraRankingClient(const Aws::KendraRanking::KendraRankingClientConfiguration& clientConfiguration = Aws::KendraRanking::KendraRankingClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
KendraRankingClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::KendraRanking::KendraRankingClientConfiguration& clientConfiguration = Aws::KendraRanking::KendraRankingClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
KendraRankingClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::KendraRanking::KendraRankingClientConfiguration& clientConfiguration = Aws::KendraRanking::KendraRankingClientConfiguration());
/* Legacy constructors due deprecation */
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
KendraRankingClient(const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
KendraRankingClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
KendraRankingClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~KendraRankingClient();
/**
* Creates a rescore execution plan. A rescore execution plan is an Amazon
* Kendra Intelligent Ranking resource used for provisioning the
* Rescore
API. You set the number of capacity units that you require
* for Amazon Kendra Intelligent Ranking to rescore or re-rank a search service's
* results.
For an example of using the
* CreateRescoreExecutionPlan
API, including using the Python and Java
* SDKs, see Semantically
* ranking a search service's results.
See Also:
AWS
* API Reference
*/
virtual Model::CreateRescoreExecutionPlanOutcome CreateRescoreExecutionPlan(const Model::CreateRescoreExecutionPlanRequest& request) const;
/**
* A Callable wrapper for CreateRescoreExecutionPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateRescoreExecutionPlanOutcomeCallable CreateRescoreExecutionPlanCallable(const CreateRescoreExecutionPlanRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::CreateRescoreExecutionPlan, request);
}
/**
* An Async wrapper for CreateRescoreExecutionPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateRescoreExecutionPlanAsync(const CreateRescoreExecutionPlanRequestT& request, const CreateRescoreExecutionPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::CreateRescoreExecutionPlan, request, handler, context);
}
/**
* Deletes a rescore execution plan. A rescore execution plan is an Amazon
* Kendra Intelligent Ranking resource used for provisioning the
* Rescore
API.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteRescoreExecutionPlanOutcome DeleteRescoreExecutionPlan(const Model::DeleteRescoreExecutionPlanRequest& request) const;
/**
* A Callable wrapper for DeleteRescoreExecutionPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteRescoreExecutionPlanOutcomeCallable DeleteRescoreExecutionPlanCallable(const DeleteRescoreExecutionPlanRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::DeleteRescoreExecutionPlan, request);
}
/**
* An Async wrapper for DeleteRescoreExecutionPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteRescoreExecutionPlanAsync(const DeleteRescoreExecutionPlanRequestT& request, const DeleteRescoreExecutionPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::DeleteRescoreExecutionPlan, request, handler, context);
}
/**
* Gets information about a rescore execution plan. A rescore execution plan is
* an Amazon Kendra Intelligent Ranking resource used for provisioning the
* Rescore
API.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeRescoreExecutionPlanOutcome DescribeRescoreExecutionPlan(const Model::DescribeRescoreExecutionPlanRequest& request) const;
/**
* A Callable wrapper for DescribeRescoreExecutionPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeRescoreExecutionPlanOutcomeCallable DescribeRescoreExecutionPlanCallable(const DescribeRescoreExecutionPlanRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::DescribeRescoreExecutionPlan, request);
}
/**
* An Async wrapper for DescribeRescoreExecutionPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeRescoreExecutionPlanAsync(const DescribeRescoreExecutionPlanRequestT& request, const DescribeRescoreExecutionPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::DescribeRescoreExecutionPlan, request, handler, context);
}
/**
* Lists your rescore execution plans. A rescore execution plan is an Amazon
* Kendra Intelligent Ranking resource used for provisioning the
* Rescore
API.
See Also:
AWS
* API Reference
*/
virtual Model::ListRescoreExecutionPlansOutcome ListRescoreExecutionPlans(const Model::ListRescoreExecutionPlansRequest& request) const;
/**
* A Callable wrapper for ListRescoreExecutionPlans that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListRescoreExecutionPlansOutcomeCallable ListRescoreExecutionPlansCallable(const ListRescoreExecutionPlansRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::ListRescoreExecutionPlans, request);
}
/**
* An Async wrapper for ListRescoreExecutionPlans that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListRescoreExecutionPlansAsync(const ListRescoreExecutionPlansRequestT& request, const ListRescoreExecutionPlansResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::ListRescoreExecutionPlans, request, handler, context);
}
/**
* Gets a list of tags associated with a specified resource. A rescore execution
* plan is an example of a resource that can have tags associated with
* it.
See Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::ListTagsForResource, request);
}
/**
* An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::ListTagsForResource, request, handler, context);
}
/**
* Rescores or re-ranks search results from a search service such as OpenSearch
* (self managed). You use the semantic search capabilities of Amazon Kendra
* Intelligent Ranking to improve the search service's results.
See
* Also:
AWS
* API Reference
*/
virtual Model::RescoreOutcome Rescore(const Model::RescoreRequest& request) const;
/**
* A Callable wrapper for Rescore that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::RescoreOutcomeCallable RescoreCallable(const RescoreRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::Rescore, request);
}
/**
* An Async wrapper for Rescore that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void RescoreAsync(const RescoreRequestT& request, const RescoreResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::Rescore, request, handler, context);
}
/**
* Adds a specified tag to a specified rescore execution plan. A rescore
* execution plan is an Amazon Kendra Intelligent Ranking resource used for
* provisioning the Rescore
API. If the tag already exists, the
* existing value is replaced with the new value.
See Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::TagResource, request);
}
/**
* An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::TagResource, request, handler, context);
}
/**
* Removes a tag from a rescore execution plan. A rescore execution plan is an
* Amazon Kendra Intelligent Ranking resource used for provisioning the
* Rescore
operation.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::UntagResource, request);
}
/**
* An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::UntagResource, request, handler, context);
}
/**
* Updates a rescore execution plan. A rescore execution plan is an Amazon
* Kendra Intelligent Ranking resource used for provisioning the
* Rescore
API. You can update the number of capacity units you
* require for Amazon Kendra Intelligent Ranking to rescore or re-rank a search
* service's results.
See Also:
AWS
* API Reference
*/
virtual Model::UpdateRescoreExecutionPlanOutcome UpdateRescoreExecutionPlan(const Model::UpdateRescoreExecutionPlanRequest& request) const;
/**
* A Callable wrapper for UpdateRescoreExecutionPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UpdateRescoreExecutionPlanOutcomeCallable UpdateRescoreExecutionPlanCallable(const UpdateRescoreExecutionPlanRequestT& request) const
{
return SubmitCallable(&KendraRankingClient::UpdateRescoreExecutionPlan, request);
}
/**
* An Async wrapper for UpdateRescoreExecutionPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UpdateRescoreExecutionPlanAsync(const UpdateRescoreExecutionPlanRequestT& request, const UpdateRescoreExecutionPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&KendraRankingClient::UpdateRescoreExecutionPlan, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const KendraRankingClientConfiguration& clientConfiguration);
KendraRankingClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace KendraRanking
} // namespace Aws