Class: Aws::Kendra::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Kendra::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-kendra/client.rb
Overview
An API client for Kendra. To construct a client, you need to configure a `:region` and `:credentials`.
client = Aws::Kendra::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#batch_delete_document(params = {}) ⇒ Types::BatchDeleteDocumentResponse
Removes one or more documents from an index.
-
#batch_put_document(params = {}) ⇒ Types::BatchPutDocumentResponse
Adds one or more documents to an index.
-
#create_data_source(params = {}) ⇒ Types::CreateDataSourceResponse
Creates a data source that you use to with an Amazon Kendra index.
-
#create_faq(params = {}) ⇒ Types::CreateFaqResponse
Creates an new set of frequently asked question (FAQ) questions and answers.
-
#create_index(params = {}) ⇒ Types::CreateIndexResponse
Creates a new Amazon Kendra index.
-
#create_thesaurus(params = {}) ⇒ Types::CreateThesaurusResponse
Creates a thesaurus for an index.
-
#delete_data_source(params = {}) ⇒ Struct
Deletes an Amazon Kendra data source.
-
#delete_faq(params = {}) ⇒ Struct
Removes an FAQ from an index.
-
#delete_index(params = {}) ⇒ Struct
Deletes an existing Amazon Kendra index.
-
#delete_thesaurus(params = {}) ⇒ Struct
Deletes an existing Amazon Kendra thesaurus.
-
#describe_data_source(params = {}) ⇒ Types::DescribeDataSourceResponse
Gets information about a Amazon Kendra data source.
-
#describe_faq(params = {}) ⇒ Types::DescribeFaqResponse
Gets information about an FAQ list.
-
#describe_index(params = {}) ⇒ Types::DescribeIndexResponse
Describes an existing Amazon Kendra index.
-
#describe_thesaurus(params = {}) ⇒ Types::DescribeThesaurusResponse
Describes an existing Amazon Kendra thesaurus.
-
#list_data_source_sync_jobs(params = {}) ⇒ Types::ListDataSourceSyncJobsResponse
Gets statistics about synchronizing Amazon Kendra with a data source.
-
#list_data_sources(params = {}) ⇒ Types::ListDataSourcesResponse
Lists the data sources that you have created.
-
#list_faqs(params = {}) ⇒ Types::ListFaqsResponse
Gets a list of FAQ lists associated with an index.
-
#list_indices(params = {}) ⇒ Types::ListIndicesResponse
Lists the Amazon Kendra indexes that you have created.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Gets a list of tags associated with a specified resource.
-
#list_thesauri(params = {}) ⇒ Types::ListThesauriResponse
Lists the Amazon Kendra thesauri associated with an index.
-
#query(params = {}) ⇒ Types::QueryResult
Searches an active index.
-
#start_data_source_sync_job(params = {}) ⇒ Types::StartDataSourceSyncJobResponse
Starts a synchronization job for a data source.
-
#stop_data_source_sync_job(params = {}) ⇒ Struct
Stops a running synchronization job.
-
#submit_feedback(params = {}) ⇒ Struct
Enables you to provide feedback to Amazon Kendra to improve the performance of the service.
-
#tag_resource(params = {}) ⇒ Struct
Adds the specified tag to the specified index, FAQ, or data source resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes a tag from an index, FAQ, or a data source.
-
#update_data_source(params = {}) ⇒ Struct
Updates an existing Amazon Kendra data source.
-
#update_index(params = {}) ⇒ Struct
Updates an existing Amazon Kendra index.
-
#update_thesaurus(params = {}) ⇒ Struct
Updates a thesaurus file associated with an index.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
334 335 336 |
# File 'lib/aws-sdk-kendra/client.rb', line 334 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2861 2862 2863 |
# File 'lib/aws-sdk-kendra/client.rb', line 2861 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2864 2865 2866 |
# File 'lib/aws-sdk-kendra/client.rb', line 2864 def errors_module Errors end |
Instance Method Details
#batch_delete_document(params = {}) ⇒ Types::BatchDeleteDocumentResponse
Removes one or more documents from an index. The documents must have been added with the BatchPutDocument operation.
The documents are deleted asynchronously. You can see the progress of the deletion by using AWS CloudWatch. Any error messages releated to the processing of the batch are sent to you CloudWatch log.
382 383 384 385 |
# File 'lib/aws-sdk-kendra/client.rb', line 382 def batch_delete_document(params = {}, = {}) req = build_request(:batch_delete_document, params) req.send_request() end |
#batch_put_document(params = {}) ⇒ Types::BatchPutDocumentResponse
Adds one or more documents to an index.
The `BatchPutDocument` operation enables you to ingest inline documents or a set of documents stored in an Amazon S3 bucket. Use this operation 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 AWS CloudWatch. Any error messages related to processing the batch are sent to your AWS CloudWatch log.
482 483 484 485 |
# File 'lib/aws-sdk-kendra/client.rb', line 482 def batch_put_document(params = {}, = {}) req = build_request(:batch_put_document, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 |
# File 'lib/aws-sdk-kendra/client.rb', line 2839 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-kendra' context[:gem_version] = '1.21.0' Seahorse::Client::Request.new(handlers, context) end |
#create_data_source(params = {}) ⇒ Types::CreateDataSourceResponse
Creates a data source that you use to with an Amazon Kendra index.
You specify a name, data source connector type and description for your data source. You also specify configuration information such as document metadata (author, source URI, and so on) and user context information.
`CreateDataSource` is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.
851 852 853 854 |
# File 'lib/aws-sdk-kendra/client.rb', line 851 def create_data_source(params = {}, = {}) req = build_request(:create_data_source, params) req.send_request() end |
#create_faq(params = {}) ⇒ Types::CreateFaqResponse
Creates an new set of frequently asked question (FAQ) questions and answers.
940 941 942 943 |
# File 'lib/aws-sdk-kendra/client.rb', line 940 def create_faq(params = {}, = {}) req = build_request(:create_faq, params) req.send_request() end |
#create_index(params = {}) ⇒ Types::CreateIndexResponse
Creates a new Amazon Kendra index. Index creation is an asynchronous operation. To determine if index creation has completed, check the `Status` field returned from a call to . 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 operation or using one of the supported data sources.
1060 1061 1062 1063 |
# File 'lib/aws-sdk-kendra/client.rb', line 1060 def create_index(params = {}, = {}) req = build_request(:create_index, params) req.send_request() end |
#create_thesaurus(params = {}) ⇒ Types::CreateThesaurusResponse
Creates a thesaurus for an index. The thesaurus contains a list of synonyms in Solr format.
1130 1131 1132 1133 |
# File 'lib/aws-sdk-kendra/client.rb', line 1130 def create_thesaurus(params = {}, = {}) req = build_request(:create_thesaurus, params) req.send_request() end |
#delete_data_source(params = {}) ⇒ Struct
Deletes an Amazon Kendra data source. 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 operation is set to `DELETING`. For more information, see [Deleting Data Sources].
[1]: docs.aws.amazon.com/kendra/latest/dg/delete-data-source.html
1164 1165 1166 1167 |
# File 'lib/aws-sdk-kendra/client.rb', line 1164 def delete_data_source(params = {}, = {}) req = build_request(:delete_data_source, params) req.send_request() end |
#delete_faq(params = {}) ⇒ Struct
Removes an FAQ from an index.
1190 1191 1192 1193 |
# File 'lib/aws-sdk-kendra/client.rb', line 1190 def delete_faq(params = {}, = {}) req = build_request(:delete_faq, params) req.send_request() end |
#delete_index(params = {}) ⇒ Struct
Deletes an existing 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 operation is set to `DELETING`.
1215 1216 1217 1218 |
# File 'lib/aws-sdk-kendra/client.rb', line 1215 def delete_index(params = {}, = {}) req = build_request(:delete_index, params) req.send_request() end |
#delete_thesaurus(params = {}) ⇒ Struct
Deletes an existing Amazon Kendra thesaurus.
1241 1242 1243 1244 |
# File 'lib/aws-sdk-kendra/client.rb', line 1241 def delete_thesaurus(params = {}, = {}) req = build_request(:delete_thesaurus, params) req.send_request() end |
#describe_data_source(params = {}) ⇒ Types::DescribeDataSourceResponse
Gets information about a Amazon Kendra data source.
1477 1478 1479 1480 |
# File 'lib/aws-sdk-kendra/client.rb', line 1477 def describe_data_source(params = {}, = {}) req = build_request(:describe_data_source, params) req.send_request() end |
#describe_faq(params = {}) ⇒ Types::DescribeFaqResponse
Gets information about an FAQ list.
1530 1531 1532 1533 |
# File 'lib/aws-sdk-kendra/client.rb', line 1530 def describe_faq(params = {}, = {}) req = build_request(:describe_faq, params) req.send_request() end |
#describe_index(params = {}) ⇒ Types::DescribeIndexResponse
Describes an existing Amazon Kendra index
1610 1611 1612 1613 |
# File 'lib/aws-sdk-kendra/client.rb', line 1610 def describe_index(params = {}, = {}) req = build_request(:describe_index, params) req.send_request() end |
#describe_thesaurus(params = {}) ⇒ Types::DescribeThesaurusResponse
Describes an existing Amazon Kendra thesaurus.
1667 1668 1669 1670 |
# File 'lib/aws-sdk-kendra/client.rb', line 1667 def describe_thesaurus(params = {}, = {}) req = build_request(:describe_thesaurus, params) req.send_request() end |
#list_data_source_sync_jobs(params = {}) ⇒ Types::ListDataSourceSyncJobsResponse
Gets statistics about synchronizing Amazon Kendra with a data source.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1739 1740 1741 1742 |
# File 'lib/aws-sdk-kendra/client.rb', line 1739 def list_data_source_sync_jobs(params = {}, = {}) req = build_request(:list_data_source_sync_jobs, params) req.send_request() end |
#list_data_sources(params = {}) ⇒ Types::ListDataSourcesResponse
Lists the data sources that you have created.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1788 1789 1790 1791 |
# File 'lib/aws-sdk-kendra/client.rb', line 1788 def list_data_sources(params = {}, = {}) req = build_request(:list_data_sources, params) req.send_request() end |
#list_faqs(params = {}) ⇒ Types::ListFaqsResponse
Gets a list of FAQ lists associated with an index.
1835 1836 1837 1838 |
# File 'lib/aws-sdk-kendra/client.rb', line 1835 def list_faqs(params = {}, = {}) req = build_request(:list_faqs, params) req.send_request() end |
#list_indices(params = {}) ⇒ Types::ListIndicesResponse
Lists the Amazon Kendra indexes that you have created.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1880 1881 1882 1883 |
# File 'lib/aws-sdk-kendra/client.rb', line 1880 def list_indices(params = {}, = {}) req = build_request(:list_indices, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Gets a list of tags associated with a specified resource. Indexes, FAQs, and data sources can have tags associated with them.
1912 1913 1914 1915 |
# File 'lib/aws-sdk-kendra/client.rb', line 1912 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#list_thesauri(params = {}) ⇒ Types::ListThesauriResponse
Lists the Amazon Kendra thesauri associated with an index.
1958 1959 1960 1961 |
# File 'lib/aws-sdk-kendra/client.rb', line 1958 def list_thesauri(params = {}, = {}) req = build_request(:list_thesauri, params) req.send_request() end |
#query(params = {}) ⇒ Types::QueryResult
Searches an active index. Use this API to search your documents using query. The `Query` operation enables to do faceted search and to filter results based on document attributes.
It also enables you to provide user context that Amazon Kendra uses to enforce document access control in the search results.
Amazon Kendra searches your index for text content and question and answer (FAQ) content. By default the response contains three types of results.
-
Relevant passages
-
Matching FAQs
-
Relevant documents
You can specify that the query return only one type of result using the `QueryResultTypeConfig` parameter.
Each query returns the 100 most relevant results.
2208 2209 2210 2211 |
# File 'lib/aws-sdk-kendra/client.rb', line 2208 def query(params = {}, = {}) req = build_request(:query, params) req.send_request() end |
#start_data_source_sync_job(params = {}) ⇒ Types::StartDataSourceSyncJobResponse
Starts a synchronization job for a data source. If a synchronization job is already in progress, Amazon Kendra returns a `ResourceInUseException` exception.
2242 2243 2244 2245 |
# File 'lib/aws-sdk-kendra/client.rb', line 2242 def start_data_source_sync_job(params = {}, = {}) req = build_request(:start_data_source_sync_job, params) req.send_request() end |
#stop_data_source_sync_job(params = {}) ⇒ Struct
Stops a running synchronization job. You can't stop a scheduled synchronization job.
2270 2271 2272 2273 |
# File 'lib/aws-sdk-kendra/client.rb', line 2270 def stop_data_source_sync_job(params = {}, = {}) req = build_request(:stop_data_source_sync_job, params) req.send_request() end |
#submit_feedback(params = {}) ⇒ Struct
Enables you to provide feedback to Amazon Kendra to improve the performance of the service.
2318 2319 2320 2321 |
# File 'lib/aws-sdk-kendra/client.rb', line 2318 def submit_feedback(params = {}, = {}) req = build_request(:submit_feedback, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
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.
2353 2354 2355 2356 |
# File 'lib/aws-sdk-kendra/client.rb', line 2353 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes a tag from an index, FAQ, or a data source.
2381 2382 2383 2384 |
# File 'lib/aws-sdk-kendra/client.rb', line 2381 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_data_source(params = {}) ⇒ Struct
Updates an existing Amazon Kendra data source.
2690 2691 2692 2693 |
# File 'lib/aws-sdk-kendra/client.rb', line 2690 def update_data_source(params = {}, = {}) req = build_request(:update_data_source, params) req.send_request() end |
#update_index(params = {}) ⇒ Struct
Updates an existing Amazon Kendra index.
2785 2786 2787 2788 |
# File 'lib/aws-sdk-kendra/client.rb', line 2785 def update_index(params = {}, = {}) req = build_request(:update_index, params) req.send_request() end |
#update_thesaurus(params = {}) ⇒ Struct
Updates a thesaurus file associated with an index.
2830 2831 2832 2833 |
# File 'lib/aws-sdk-kendra/client.rb', line 2830 def update_thesaurus(params = {}, = {}) req = build_request(:update_thesaurus, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2854 2855 2856 |
# File 'lib/aws-sdk-kendra/client.rb', line 2854 def waiter_names [] end |