aws-sdk-kendra 1.59.0 → 1.61.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-kendra/client.rb +37 -10
- data/lib/aws-sdk-kendra/client_api.rb +25 -0
- data/lib/aws-sdk-kendra/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-kendra/endpoint_provider.rb +111 -0
- data/lib/aws-sdk-kendra/endpoints.rb +855 -0
- data/lib/aws-sdk-kendra/plugins/endpoints.rb +188 -0
- data/lib/aws-sdk-kendra/types.rb +193 -67
- data/lib/aws-sdk-kendra.rb +5 -1
- metadata +8 -4
@@ -0,0 +1,188 @@
|
|
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_get_document_status
|
66
|
+
Aws::Kendra::Endpoints::BatchGetDocumentStatus.build(context)
|
67
|
+
when :batch_put_document
|
68
|
+
Aws::Kendra::Endpoints::BatchPutDocument.build(context)
|
69
|
+
when :clear_query_suggestions
|
70
|
+
Aws::Kendra::Endpoints::ClearQuerySuggestions.build(context)
|
71
|
+
when :create_access_control_configuration
|
72
|
+
Aws::Kendra::Endpoints::CreateAccessControlConfiguration.build(context)
|
73
|
+
when :create_data_source
|
74
|
+
Aws::Kendra::Endpoints::CreateDataSource.build(context)
|
75
|
+
when :create_experience
|
76
|
+
Aws::Kendra::Endpoints::CreateExperience.build(context)
|
77
|
+
when :create_faq
|
78
|
+
Aws::Kendra::Endpoints::CreateFaq.build(context)
|
79
|
+
when :create_index
|
80
|
+
Aws::Kendra::Endpoints::CreateIndex.build(context)
|
81
|
+
when :create_query_suggestions_block_list
|
82
|
+
Aws::Kendra::Endpoints::CreateQuerySuggestionsBlockList.build(context)
|
83
|
+
when :create_thesaurus
|
84
|
+
Aws::Kendra::Endpoints::CreateThesaurus.build(context)
|
85
|
+
when :delete_access_control_configuration
|
86
|
+
Aws::Kendra::Endpoints::DeleteAccessControlConfiguration.build(context)
|
87
|
+
when :delete_data_source
|
88
|
+
Aws::Kendra::Endpoints::DeleteDataSource.build(context)
|
89
|
+
when :delete_experience
|
90
|
+
Aws::Kendra::Endpoints::DeleteExperience.build(context)
|
91
|
+
when :delete_faq
|
92
|
+
Aws::Kendra::Endpoints::DeleteFaq.build(context)
|
93
|
+
when :delete_index
|
94
|
+
Aws::Kendra::Endpoints::DeleteIndex.build(context)
|
95
|
+
when :delete_principal_mapping
|
96
|
+
Aws::Kendra::Endpoints::DeletePrincipalMapping.build(context)
|
97
|
+
when :delete_query_suggestions_block_list
|
98
|
+
Aws::Kendra::Endpoints::DeleteQuerySuggestionsBlockList.build(context)
|
99
|
+
when :delete_thesaurus
|
100
|
+
Aws::Kendra::Endpoints::DeleteThesaurus.build(context)
|
101
|
+
when :describe_access_control_configuration
|
102
|
+
Aws::Kendra::Endpoints::DescribeAccessControlConfiguration.build(context)
|
103
|
+
when :describe_data_source
|
104
|
+
Aws::Kendra::Endpoints::DescribeDataSource.build(context)
|
105
|
+
when :describe_experience
|
106
|
+
Aws::Kendra::Endpoints::DescribeExperience.build(context)
|
107
|
+
when :describe_faq
|
108
|
+
Aws::Kendra::Endpoints::DescribeFaq.build(context)
|
109
|
+
when :describe_index
|
110
|
+
Aws::Kendra::Endpoints::DescribeIndex.build(context)
|
111
|
+
when :describe_principal_mapping
|
112
|
+
Aws::Kendra::Endpoints::DescribePrincipalMapping.build(context)
|
113
|
+
when :describe_query_suggestions_block_list
|
114
|
+
Aws::Kendra::Endpoints::DescribeQuerySuggestionsBlockList.build(context)
|
115
|
+
when :describe_query_suggestions_config
|
116
|
+
Aws::Kendra::Endpoints::DescribeQuerySuggestionsConfig.build(context)
|
117
|
+
when :describe_thesaurus
|
118
|
+
Aws::Kendra::Endpoints::DescribeThesaurus.build(context)
|
119
|
+
when :disassociate_entities_from_experience
|
120
|
+
Aws::Kendra::Endpoints::DisassociateEntitiesFromExperience.build(context)
|
121
|
+
when :disassociate_personas_from_entities
|
122
|
+
Aws::Kendra::Endpoints::DisassociatePersonasFromEntities.build(context)
|
123
|
+
when :get_query_suggestions
|
124
|
+
Aws::Kendra::Endpoints::GetQuerySuggestions.build(context)
|
125
|
+
when :get_snapshots
|
126
|
+
Aws::Kendra::Endpoints::GetSnapshots.build(context)
|
127
|
+
when :list_access_control_configurations
|
128
|
+
Aws::Kendra::Endpoints::ListAccessControlConfigurations.build(context)
|
129
|
+
when :list_data_source_sync_jobs
|
130
|
+
Aws::Kendra::Endpoints::ListDataSourceSyncJobs.build(context)
|
131
|
+
when :list_data_sources
|
132
|
+
Aws::Kendra::Endpoints::ListDataSources.build(context)
|
133
|
+
when :list_entity_personas
|
134
|
+
Aws::Kendra::Endpoints::ListEntityPersonas.build(context)
|
135
|
+
when :list_experience_entities
|
136
|
+
Aws::Kendra::Endpoints::ListExperienceEntities.build(context)
|
137
|
+
when :list_experiences
|
138
|
+
Aws::Kendra::Endpoints::ListExperiences.build(context)
|
139
|
+
when :list_faqs
|
140
|
+
Aws::Kendra::Endpoints::ListFaqs.build(context)
|
141
|
+
when :list_groups_older_than_ordering_id
|
142
|
+
Aws::Kendra::Endpoints::ListGroupsOlderThanOrderingId.build(context)
|
143
|
+
when :list_indices
|
144
|
+
Aws::Kendra::Endpoints::ListIndices.build(context)
|
145
|
+
when :list_query_suggestions_block_lists
|
146
|
+
Aws::Kendra::Endpoints::ListQuerySuggestionsBlockLists.build(context)
|
147
|
+
when :list_tags_for_resource
|
148
|
+
Aws::Kendra::Endpoints::ListTagsForResource.build(context)
|
149
|
+
when :list_thesauri
|
150
|
+
Aws::Kendra::Endpoints::ListThesauri.build(context)
|
151
|
+
when :put_principal_mapping
|
152
|
+
Aws::Kendra::Endpoints::PutPrincipalMapping.build(context)
|
153
|
+
when :query
|
154
|
+
Aws::Kendra::Endpoints::Query.build(context)
|
155
|
+
when :start_data_source_sync_job
|
156
|
+
Aws::Kendra::Endpoints::StartDataSourceSyncJob.build(context)
|
157
|
+
when :stop_data_source_sync_job
|
158
|
+
Aws::Kendra::Endpoints::StopDataSourceSyncJob.build(context)
|
159
|
+
when :submit_feedback
|
160
|
+
Aws::Kendra::Endpoints::SubmitFeedback.build(context)
|
161
|
+
when :tag_resource
|
162
|
+
Aws::Kendra::Endpoints::TagResource.build(context)
|
163
|
+
when :untag_resource
|
164
|
+
Aws::Kendra::Endpoints::UntagResource.build(context)
|
165
|
+
when :update_access_control_configuration
|
166
|
+
Aws::Kendra::Endpoints::UpdateAccessControlConfiguration.build(context)
|
167
|
+
when :update_data_source
|
168
|
+
Aws::Kendra::Endpoints::UpdateDataSource.build(context)
|
169
|
+
when :update_experience
|
170
|
+
Aws::Kendra::Endpoints::UpdateExperience.build(context)
|
171
|
+
when :update_index
|
172
|
+
Aws::Kendra::Endpoints::UpdateIndex.build(context)
|
173
|
+
when :update_query_suggestions_block_list
|
174
|
+
Aws::Kendra::Endpoints::UpdateQuerySuggestionsBlockList.build(context)
|
175
|
+
when :update_query_suggestions_config
|
176
|
+
Aws::Kendra::Endpoints::UpdateQuerySuggestionsConfig.build(context)
|
177
|
+
when :update_thesaurus
|
178
|
+
Aws::Kendra::Endpoints::UpdateThesaurus.build(context)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
def add_handlers(handlers, _config)
|
184
|
+
handlers.add(Handler, step: :build, priority: 75)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|