aws-sdk-kendra 1.39.0 → 1.74.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,9 @@ module Aws::Kendra
29
29
  # ## Error Classes
30
30
  # * {AccessDeniedException}
31
31
  # * {ConflictException}
32
+ # * {FeaturedResultsConflictException}
32
33
  # * {InternalServerException}
34
+ # * {InvalidRequestException}
33
35
  # * {ResourceAlreadyExistException}
34
36
  # * {ResourceInUseException}
35
37
  # * {ResourceNotFoundException}
@@ -74,6 +76,26 @@ module Aws::Kendra
74
76
  end
75
77
  end
76
78
 
79
+ class FeaturedResultsConflictException < ServiceError
80
+
81
+ # @param [Seahorse::Client::RequestContext] context
82
+ # @param [String] message
83
+ # @param [Aws::Kendra::Types::FeaturedResultsConflictException] data
84
+ def initialize(context, message, data = Aws::EmptyStructure.new)
85
+ super(context, message, data)
86
+ end
87
+
88
+ # @return [String]
89
+ def message
90
+ @message || @data[:message]
91
+ end
92
+
93
+ # @return [String]
94
+ def conflicting_items
95
+ @data[:conflicting_items]
96
+ end
97
+ end
98
+
77
99
  class InternalServerException < ServiceError
78
100
 
79
101
  # @param [Seahorse::Client::RequestContext] context
@@ -89,6 +111,21 @@ module Aws::Kendra
89
111
  end
90
112
  end
91
113
 
114
+ class InvalidRequestException < ServiceError
115
+
116
+ # @param [Seahorse::Client::RequestContext] context
117
+ # @param [String] message
118
+ # @param [Aws::Kendra::Types::InvalidRequestException] data
119
+ def initialize(context, message, data = Aws::EmptyStructure.new)
120
+ super(context, message, data)
121
+ end
122
+
123
+ # @return [String]
124
+ def message
125
+ @message || @data[:message]
126
+ end
127
+ end
128
+
92
129
  class ResourceAlreadyExistException < ServiceError
93
130
 
94
131
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,200 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::Kendra
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Kendra::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Kendra::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Kendra::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :associate_entities_to_experience
60
+ Aws::Kendra::Endpoints::AssociateEntitiesToExperience.build(context)
61
+ when :associate_personas_to_entities
62
+ Aws::Kendra::Endpoints::AssociatePersonasToEntities.build(context)
63
+ when :batch_delete_document
64
+ Aws::Kendra::Endpoints::BatchDeleteDocument.build(context)
65
+ when :batch_delete_featured_results_set
66
+ Aws::Kendra::Endpoints::BatchDeleteFeaturedResultsSet.build(context)
67
+ when :batch_get_document_status
68
+ Aws::Kendra::Endpoints::BatchGetDocumentStatus.build(context)
69
+ when :batch_put_document
70
+ Aws::Kendra::Endpoints::BatchPutDocument.build(context)
71
+ when :clear_query_suggestions
72
+ Aws::Kendra::Endpoints::ClearQuerySuggestions.build(context)
73
+ when :create_access_control_configuration
74
+ Aws::Kendra::Endpoints::CreateAccessControlConfiguration.build(context)
75
+ when :create_data_source
76
+ Aws::Kendra::Endpoints::CreateDataSource.build(context)
77
+ when :create_experience
78
+ Aws::Kendra::Endpoints::CreateExperience.build(context)
79
+ when :create_faq
80
+ Aws::Kendra::Endpoints::CreateFaq.build(context)
81
+ when :create_featured_results_set
82
+ Aws::Kendra::Endpoints::CreateFeaturedResultsSet.build(context)
83
+ when :create_index
84
+ Aws::Kendra::Endpoints::CreateIndex.build(context)
85
+ when :create_query_suggestions_block_list
86
+ Aws::Kendra::Endpoints::CreateQuerySuggestionsBlockList.build(context)
87
+ when :create_thesaurus
88
+ Aws::Kendra::Endpoints::CreateThesaurus.build(context)
89
+ when :delete_access_control_configuration
90
+ Aws::Kendra::Endpoints::DeleteAccessControlConfiguration.build(context)
91
+ when :delete_data_source
92
+ Aws::Kendra::Endpoints::DeleteDataSource.build(context)
93
+ when :delete_experience
94
+ Aws::Kendra::Endpoints::DeleteExperience.build(context)
95
+ when :delete_faq
96
+ Aws::Kendra::Endpoints::DeleteFaq.build(context)
97
+ when :delete_index
98
+ Aws::Kendra::Endpoints::DeleteIndex.build(context)
99
+ when :delete_principal_mapping
100
+ Aws::Kendra::Endpoints::DeletePrincipalMapping.build(context)
101
+ when :delete_query_suggestions_block_list
102
+ Aws::Kendra::Endpoints::DeleteQuerySuggestionsBlockList.build(context)
103
+ when :delete_thesaurus
104
+ Aws::Kendra::Endpoints::DeleteThesaurus.build(context)
105
+ when :describe_access_control_configuration
106
+ Aws::Kendra::Endpoints::DescribeAccessControlConfiguration.build(context)
107
+ when :describe_data_source
108
+ Aws::Kendra::Endpoints::DescribeDataSource.build(context)
109
+ when :describe_experience
110
+ Aws::Kendra::Endpoints::DescribeExperience.build(context)
111
+ when :describe_faq
112
+ Aws::Kendra::Endpoints::DescribeFaq.build(context)
113
+ when :describe_featured_results_set
114
+ Aws::Kendra::Endpoints::DescribeFeaturedResultsSet.build(context)
115
+ when :describe_index
116
+ Aws::Kendra::Endpoints::DescribeIndex.build(context)
117
+ when :describe_principal_mapping
118
+ Aws::Kendra::Endpoints::DescribePrincipalMapping.build(context)
119
+ when :describe_query_suggestions_block_list
120
+ Aws::Kendra::Endpoints::DescribeQuerySuggestionsBlockList.build(context)
121
+ when :describe_query_suggestions_config
122
+ Aws::Kendra::Endpoints::DescribeQuerySuggestionsConfig.build(context)
123
+ when :describe_thesaurus
124
+ Aws::Kendra::Endpoints::DescribeThesaurus.build(context)
125
+ when :disassociate_entities_from_experience
126
+ Aws::Kendra::Endpoints::DisassociateEntitiesFromExperience.build(context)
127
+ when :disassociate_personas_from_entities
128
+ Aws::Kendra::Endpoints::DisassociatePersonasFromEntities.build(context)
129
+ when :get_query_suggestions
130
+ Aws::Kendra::Endpoints::GetQuerySuggestions.build(context)
131
+ when :get_snapshots
132
+ Aws::Kendra::Endpoints::GetSnapshots.build(context)
133
+ when :list_access_control_configurations
134
+ Aws::Kendra::Endpoints::ListAccessControlConfigurations.build(context)
135
+ when :list_data_source_sync_jobs
136
+ Aws::Kendra::Endpoints::ListDataSourceSyncJobs.build(context)
137
+ when :list_data_sources
138
+ Aws::Kendra::Endpoints::ListDataSources.build(context)
139
+ when :list_entity_personas
140
+ Aws::Kendra::Endpoints::ListEntityPersonas.build(context)
141
+ when :list_experience_entities
142
+ Aws::Kendra::Endpoints::ListExperienceEntities.build(context)
143
+ when :list_experiences
144
+ Aws::Kendra::Endpoints::ListExperiences.build(context)
145
+ when :list_faqs
146
+ Aws::Kendra::Endpoints::ListFaqs.build(context)
147
+ when :list_featured_results_sets
148
+ Aws::Kendra::Endpoints::ListFeaturedResultsSets.build(context)
149
+ when :list_groups_older_than_ordering_id
150
+ Aws::Kendra::Endpoints::ListGroupsOlderThanOrderingId.build(context)
151
+ when :list_indices
152
+ Aws::Kendra::Endpoints::ListIndices.build(context)
153
+ when :list_query_suggestions_block_lists
154
+ Aws::Kendra::Endpoints::ListQuerySuggestionsBlockLists.build(context)
155
+ when :list_tags_for_resource
156
+ Aws::Kendra::Endpoints::ListTagsForResource.build(context)
157
+ when :list_thesauri
158
+ Aws::Kendra::Endpoints::ListThesauri.build(context)
159
+ when :put_principal_mapping
160
+ Aws::Kendra::Endpoints::PutPrincipalMapping.build(context)
161
+ when :query
162
+ Aws::Kendra::Endpoints::Query.build(context)
163
+ when :retrieve
164
+ Aws::Kendra::Endpoints::Retrieve.build(context)
165
+ when :start_data_source_sync_job
166
+ Aws::Kendra::Endpoints::StartDataSourceSyncJob.build(context)
167
+ when :stop_data_source_sync_job
168
+ Aws::Kendra::Endpoints::StopDataSourceSyncJob.build(context)
169
+ when :submit_feedback
170
+ Aws::Kendra::Endpoints::SubmitFeedback.build(context)
171
+ when :tag_resource
172
+ Aws::Kendra::Endpoints::TagResource.build(context)
173
+ when :untag_resource
174
+ Aws::Kendra::Endpoints::UntagResource.build(context)
175
+ when :update_access_control_configuration
176
+ Aws::Kendra::Endpoints::UpdateAccessControlConfiguration.build(context)
177
+ when :update_data_source
178
+ Aws::Kendra::Endpoints::UpdateDataSource.build(context)
179
+ when :update_experience
180
+ Aws::Kendra::Endpoints::UpdateExperience.build(context)
181
+ when :update_featured_results_set
182
+ Aws::Kendra::Endpoints::UpdateFeaturedResultsSet.build(context)
183
+ when :update_index
184
+ Aws::Kendra::Endpoints::UpdateIndex.build(context)
185
+ when :update_query_suggestions_block_list
186
+ Aws::Kendra::Endpoints::UpdateQuerySuggestionsBlockList.build(context)
187
+ when :update_query_suggestions_config
188
+ Aws::Kendra::Endpoints::UpdateQuerySuggestionsConfig.build(context)
189
+ when :update_thesaurus
190
+ Aws::Kendra::Endpoints::UpdateThesaurus.build(context)
191
+ end
192
+ end
193
+ end
194
+
195
+ def add_handlers(handlers, _config)
196
+ handlers.add(Handler, step: :build, priority: 75)
197
+ end
198
+ end
199
+ end
200
+ end