aws-sdk-personalize 1.43.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-personalize/client.rb +301 -3
- data/lib/aws-sdk-personalize/client_api.rb +181 -0
- data/lib/aws-sdk-personalize/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-personalize/endpoint_provider.rb +112 -0
- data/lib/aws-sdk-personalize/endpoints.rb +939 -0
- data/lib/aws-sdk-personalize/plugins/endpoints.rb +200 -0
- data/lib/aws-sdk-personalize/types.rb +493 -3
- data/lib/aws-sdk-personalize.rb +5 -1
- metadata +8 -4
@@ -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::Personalize
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::Personalize::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::Personalize::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::Personalize::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 :create_batch_inference_job
|
60
|
+
Aws::Personalize::Endpoints::CreateBatchInferenceJob.build(context)
|
61
|
+
when :create_batch_segment_job
|
62
|
+
Aws::Personalize::Endpoints::CreateBatchSegmentJob.build(context)
|
63
|
+
when :create_campaign
|
64
|
+
Aws::Personalize::Endpoints::CreateCampaign.build(context)
|
65
|
+
when :create_dataset
|
66
|
+
Aws::Personalize::Endpoints::CreateDataset.build(context)
|
67
|
+
when :create_dataset_export_job
|
68
|
+
Aws::Personalize::Endpoints::CreateDatasetExportJob.build(context)
|
69
|
+
when :create_dataset_group
|
70
|
+
Aws::Personalize::Endpoints::CreateDatasetGroup.build(context)
|
71
|
+
when :create_dataset_import_job
|
72
|
+
Aws::Personalize::Endpoints::CreateDatasetImportJob.build(context)
|
73
|
+
when :create_event_tracker
|
74
|
+
Aws::Personalize::Endpoints::CreateEventTracker.build(context)
|
75
|
+
when :create_filter
|
76
|
+
Aws::Personalize::Endpoints::CreateFilter.build(context)
|
77
|
+
when :create_metric_attribution
|
78
|
+
Aws::Personalize::Endpoints::CreateMetricAttribution.build(context)
|
79
|
+
when :create_recommender
|
80
|
+
Aws::Personalize::Endpoints::CreateRecommender.build(context)
|
81
|
+
when :create_schema
|
82
|
+
Aws::Personalize::Endpoints::CreateSchema.build(context)
|
83
|
+
when :create_solution
|
84
|
+
Aws::Personalize::Endpoints::CreateSolution.build(context)
|
85
|
+
when :create_solution_version
|
86
|
+
Aws::Personalize::Endpoints::CreateSolutionVersion.build(context)
|
87
|
+
when :delete_campaign
|
88
|
+
Aws::Personalize::Endpoints::DeleteCampaign.build(context)
|
89
|
+
when :delete_dataset
|
90
|
+
Aws::Personalize::Endpoints::DeleteDataset.build(context)
|
91
|
+
when :delete_dataset_group
|
92
|
+
Aws::Personalize::Endpoints::DeleteDatasetGroup.build(context)
|
93
|
+
when :delete_event_tracker
|
94
|
+
Aws::Personalize::Endpoints::DeleteEventTracker.build(context)
|
95
|
+
when :delete_filter
|
96
|
+
Aws::Personalize::Endpoints::DeleteFilter.build(context)
|
97
|
+
when :delete_metric_attribution
|
98
|
+
Aws::Personalize::Endpoints::DeleteMetricAttribution.build(context)
|
99
|
+
when :delete_recommender
|
100
|
+
Aws::Personalize::Endpoints::DeleteRecommender.build(context)
|
101
|
+
when :delete_schema
|
102
|
+
Aws::Personalize::Endpoints::DeleteSchema.build(context)
|
103
|
+
when :delete_solution
|
104
|
+
Aws::Personalize::Endpoints::DeleteSolution.build(context)
|
105
|
+
when :describe_algorithm
|
106
|
+
Aws::Personalize::Endpoints::DescribeAlgorithm.build(context)
|
107
|
+
when :describe_batch_inference_job
|
108
|
+
Aws::Personalize::Endpoints::DescribeBatchInferenceJob.build(context)
|
109
|
+
when :describe_batch_segment_job
|
110
|
+
Aws::Personalize::Endpoints::DescribeBatchSegmentJob.build(context)
|
111
|
+
when :describe_campaign
|
112
|
+
Aws::Personalize::Endpoints::DescribeCampaign.build(context)
|
113
|
+
when :describe_dataset
|
114
|
+
Aws::Personalize::Endpoints::DescribeDataset.build(context)
|
115
|
+
when :describe_dataset_export_job
|
116
|
+
Aws::Personalize::Endpoints::DescribeDatasetExportJob.build(context)
|
117
|
+
when :describe_dataset_group
|
118
|
+
Aws::Personalize::Endpoints::DescribeDatasetGroup.build(context)
|
119
|
+
when :describe_dataset_import_job
|
120
|
+
Aws::Personalize::Endpoints::DescribeDatasetImportJob.build(context)
|
121
|
+
when :describe_event_tracker
|
122
|
+
Aws::Personalize::Endpoints::DescribeEventTracker.build(context)
|
123
|
+
when :describe_feature_transformation
|
124
|
+
Aws::Personalize::Endpoints::DescribeFeatureTransformation.build(context)
|
125
|
+
when :describe_filter
|
126
|
+
Aws::Personalize::Endpoints::DescribeFilter.build(context)
|
127
|
+
when :describe_metric_attribution
|
128
|
+
Aws::Personalize::Endpoints::DescribeMetricAttribution.build(context)
|
129
|
+
when :describe_recipe
|
130
|
+
Aws::Personalize::Endpoints::DescribeRecipe.build(context)
|
131
|
+
when :describe_recommender
|
132
|
+
Aws::Personalize::Endpoints::DescribeRecommender.build(context)
|
133
|
+
when :describe_schema
|
134
|
+
Aws::Personalize::Endpoints::DescribeSchema.build(context)
|
135
|
+
when :describe_solution
|
136
|
+
Aws::Personalize::Endpoints::DescribeSolution.build(context)
|
137
|
+
when :describe_solution_version
|
138
|
+
Aws::Personalize::Endpoints::DescribeSolutionVersion.build(context)
|
139
|
+
when :get_solution_metrics
|
140
|
+
Aws::Personalize::Endpoints::GetSolutionMetrics.build(context)
|
141
|
+
when :list_batch_inference_jobs
|
142
|
+
Aws::Personalize::Endpoints::ListBatchInferenceJobs.build(context)
|
143
|
+
when :list_batch_segment_jobs
|
144
|
+
Aws::Personalize::Endpoints::ListBatchSegmentJobs.build(context)
|
145
|
+
when :list_campaigns
|
146
|
+
Aws::Personalize::Endpoints::ListCampaigns.build(context)
|
147
|
+
when :list_dataset_export_jobs
|
148
|
+
Aws::Personalize::Endpoints::ListDatasetExportJobs.build(context)
|
149
|
+
when :list_dataset_groups
|
150
|
+
Aws::Personalize::Endpoints::ListDatasetGroups.build(context)
|
151
|
+
when :list_dataset_import_jobs
|
152
|
+
Aws::Personalize::Endpoints::ListDatasetImportJobs.build(context)
|
153
|
+
when :list_datasets
|
154
|
+
Aws::Personalize::Endpoints::ListDatasets.build(context)
|
155
|
+
when :list_event_trackers
|
156
|
+
Aws::Personalize::Endpoints::ListEventTrackers.build(context)
|
157
|
+
when :list_filters
|
158
|
+
Aws::Personalize::Endpoints::ListFilters.build(context)
|
159
|
+
when :list_metric_attribution_metrics
|
160
|
+
Aws::Personalize::Endpoints::ListMetricAttributionMetrics.build(context)
|
161
|
+
when :list_metric_attributions
|
162
|
+
Aws::Personalize::Endpoints::ListMetricAttributions.build(context)
|
163
|
+
when :list_recipes
|
164
|
+
Aws::Personalize::Endpoints::ListRecipes.build(context)
|
165
|
+
when :list_recommenders
|
166
|
+
Aws::Personalize::Endpoints::ListRecommenders.build(context)
|
167
|
+
when :list_schemas
|
168
|
+
Aws::Personalize::Endpoints::ListSchemas.build(context)
|
169
|
+
when :list_solution_versions
|
170
|
+
Aws::Personalize::Endpoints::ListSolutionVersions.build(context)
|
171
|
+
when :list_solutions
|
172
|
+
Aws::Personalize::Endpoints::ListSolutions.build(context)
|
173
|
+
when :list_tags_for_resource
|
174
|
+
Aws::Personalize::Endpoints::ListTagsForResource.build(context)
|
175
|
+
when :start_recommender
|
176
|
+
Aws::Personalize::Endpoints::StartRecommender.build(context)
|
177
|
+
when :stop_recommender
|
178
|
+
Aws::Personalize::Endpoints::StopRecommender.build(context)
|
179
|
+
when :stop_solution_version_creation
|
180
|
+
Aws::Personalize::Endpoints::StopSolutionVersionCreation.build(context)
|
181
|
+
when :tag_resource
|
182
|
+
Aws::Personalize::Endpoints::TagResource.build(context)
|
183
|
+
when :untag_resource
|
184
|
+
Aws::Personalize::Endpoints::UntagResource.build(context)
|
185
|
+
when :update_campaign
|
186
|
+
Aws::Personalize::Endpoints::UpdateCampaign.build(context)
|
187
|
+
when :update_metric_attribution
|
188
|
+
Aws::Personalize::Endpoints::UpdateMetricAttribution.build(context)
|
189
|
+
when :update_recommender
|
190
|
+
Aws::Personalize::Endpoints::UpdateRecommender.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
|