aws-sdk-glue 1.119.0 → 1.121.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.
@@ -0,0 +1,440 @@
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::Glue
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Glue::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::Glue::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Glue::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 :batch_create_partition
60
+ Aws::Glue::Endpoints::BatchCreatePartition.build(context)
61
+ when :batch_delete_connection
62
+ Aws::Glue::Endpoints::BatchDeleteConnection.build(context)
63
+ when :batch_delete_partition
64
+ Aws::Glue::Endpoints::BatchDeletePartition.build(context)
65
+ when :batch_delete_table
66
+ Aws::Glue::Endpoints::BatchDeleteTable.build(context)
67
+ when :batch_delete_table_version
68
+ Aws::Glue::Endpoints::BatchDeleteTableVersion.build(context)
69
+ when :batch_get_blueprints
70
+ Aws::Glue::Endpoints::BatchGetBlueprints.build(context)
71
+ when :batch_get_crawlers
72
+ Aws::Glue::Endpoints::BatchGetCrawlers.build(context)
73
+ when :batch_get_custom_entity_types
74
+ Aws::Glue::Endpoints::BatchGetCustomEntityTypes.build(context)
75
+ when :batch_get_dev_endpoints
76
+ Aws::Glue::Endpoints::BatchGetDevEndpoints.build(context)
77
+ when :batch_get_jobs
78
+ Aws::Glue::Endpoints::BatchGetJobs.build(context)
79
+ when :batch_get_partition
80
+ Aws::Glue::Endpoints::BatchGetPartition.build(context)
81
+ when :batch_get_triggers
82
+ Aws::Glue::Endpoints::BatchGetTriggers.build(context)
83
+ when :batch_get_workflows
84
+ Aws::Glue::Endpoints::BatchGetWorkflows.build(context)
85
+ when :batch_stop_job_run
86
+ Aws::Glue::Endpoints::BatchStopJobRun.build(context)
87
+ when :batch_update_partition
88
+ Aws::Glue::Endpoints::BatchUpdatePartition.build(context)
89
+ when :cancel_ml_task_run
90
+ Aws::Glue::Endpoints::CancelMLTaskRun.build(context)
91
+ when :cancel_statement
92
+ Aws::Glue::Endpoints::CancelStatement.build(context)
93
+ when :check_schema_version_validity
94
+ Aws::Glue::Endpoints::CheckSchemaVersionValidity.build(context)
95
+ when :create_blueprint
96
+ Aws::Glue::Endpoints::CreateBlueprint.build(context)
97
+ when :create_classifier
98
+ Aws::Glue::Endpoints::CreateClassifier.build(context)
99
+ when :create_connection
100
+ Aws::Glue::Endpoints::CreateConnection.build(context)
101
+ when :create_crawler
102
+ Aws::Glue::Endpoints::CreateCrawler.build(context)
103
+ when :create_custom_entity_type
104
+ Aws::Glue::Endpoints::CreateCustomEntityType.build(context)
105
+ when :create_database
106
+ Aws::Glue::Endpoints::CreateDatabase.build(context)
107
+ when :create_dev_endpoint
108
+ Aws::Glue::Endpoints::CreateDevEndpoint.build(context)
109
+ when :create_job
110
+ Aws::Glue::Endpoints::CreateJob.build(context)
111
+ when :create_ml_transform
112
+ Aws::Glue::Endpoints::CreateMLTransform.build(context)
113
+ when :create_partition
114
+ Aws::Glue::Endpoints::CreatePartition.build(context)
115
+ when :create_partition_index
116
+ Aws::Glue::Endpoints::CreatePartitionIndex.build(context)
117
+ when :create_registry
118
+ Aws::Glue::Endpoints::CreateRegistry.build(context)
119
+ when :create_schema
120
+ Aws::Glue::Endpoints::CreateSchema.build(context)
121
+ when :create_script
122
+ Aws::Glue::Endpoints::CreateScript.build(context)
123
+ when :create_security_configuration
124
+ Aws::Glue::Endpoints::CreateSecurityConfiguration.build(context)
125
+ when :create_session
126
+ Aws::Glue::Endpoints::CreateSession.build(context)
127
+ when :create_table
128
+ Aws::Glue::Endpoints::CreateTable.build(context)
129
+ when :create_trigger
130
+ Aws::Glue::Endpoints::CreateTrigger.build(context)
131
+ when :create_user_defined_function
132
+ Aws::Glue::Endpoints::CreateUserDefinedFunction.build(context)
133
+ when :create_workflow
134
+ Aws::Glue::Endpoints::CreateWorkflow.build(context)
135
+ when :delete_blueprint
136
+ Aws::Glue::Endpoints::DeleteBlueprint.build(context)
137
+ when :delete_classifier
138
+ Aws::Glue::Endpoints::DeleteClassifier.build(context)
139
+ when :delete_column_statistics_for_partition
140
+ Aws::Glue::Endpoints::DeleteColumnStatisticsForPartition.build(context)
141
+ when :delete_column_statistics_for_table
142
+ Aws::Glue::Endpoints::DeleteColumnStatisticsForTable.build(context)
143
+ when :delete_connection
144
+ Aws::Glue::Endpoints::DeleteConnection.build(context)
145
+ when :delete_crawler
146
+ Aws::Glue::Endpoints::DeleteCrawler.build(context)
147
+ when :delete_custom_entity_type
148
+ Aws::Glue::Endpoints::DeleteCustomEntityType.build(context)
149
+ when :delete_database
150
+ Aws::Glue::Endpoints::DeleteDatabase.build(context)
151
+ when :delete_dev_endpoint
152
+ Aws::Glue::Endpoints::DeleteDevEndpoint.build(context)
153
+ when :delete_job
154
+ Aws::Glue::Endpoints::DeleteJob.build(context)
155
+ when :delete_ml_transform
156
+ Aws::Glue::Endpoints::DeleteMLTransform.build(context)
157
+ when :delete_partition
158
+ Aws::Glue::Endpoints::DeletePartition.build(context)
159
+ when :delete_partition_index
160
+ Aws::Glue::Endpoints::DeletePartitionIndex.build(context)
161
+ when :delete_registry
162
+ Aws::Glue::Endpoints::DeleteRegistry.build(context)
163
+ when :delete_resource_policy
164
+ Aws::Glue::Endpoints::DeleteResourcePolicy.build(context)
165
+ when :delete_schema
166
+ Aws::Glue::Endpoints::DeleteSchema.build(context)
167
+ when :delete_schema_versions
168
+ Aws::Glue::Endpoints::DeleteSchemaVersions.build(context)
169
+ when :delete_security_configuration
170
+ Aws::Glue::Endpoints::DeleteSecurityConfiguration.build(context)
171
+ when :delete_session
172
+ Aws::Glue::Endpoints::DeleteSession.build(context)
173
+ when :delete_table
174
+ Aws::Glue::Endpoints::DeleteTable.build(context)
175
+ when :delete_table_version
176
+ Aws::Glue::Endpoints::DeleteTableVersion.build(context)
177
+ when :delete_trigger
178
+ Aws::Glue::Endpoints::DeleteTrigger.build(context)
179
+ when :delete_user_defined_function
180
+ Aws::Glue::Endpoints::DeleteUserDefinedFunction.build(context)
181
+ when :delete_workflow
182
+ Aws::Glue::Endpoints::DeleteWorkflow.build(context)
183
+ when :get_blueprint
184
+ Aws::Glue::Endpoints::GetBlueprint.build(context)
185
+ when :get_blueprint_run
186
+ Aws::Glue::Endpoints::GetBlueprintRun.build(context)
187
+ when :get_blueprint_runs
188
+ Aws::Glue::Endpoints::GetBlueprintRuns.build(context)
189
+ when :get_catalog_import_status
190
+ Aws::Glue::Endpoints::GetCatalogImportStatus.build(context)
191
+ when :get_classifier
192
+ Aws::Glue::Endpoints::GetClassifier.build(context)
193
+ when :get_classifiers
194
+ Aws::Glue::Endpoints::GetClassifiers.build(context)
195
+ when :get_column_statistics_for_partition
196
+ Aws::Glue::Endpoints::GetColumnStatisticsForPartition.build(context)
197
+ when :get_column_statistics_for_table
198
+ Aws::Glue::Endpoints::GetColumnStatisticsForTable.build(context)
199
+ when :get_connection
200
+ Aws::Glue::Endpoints::GetConnection.build(context)
201
+ when :get_connections
202
+ Aws::Glue::Endpoints::GetConnections.build(context)
203
+ when :get_crawler
204
+ Aws::Glue::Endpoints::GetCrawler.build(context)
205
+ when :get_crawler_metrics
206
+ Aws::Glue::Endpoints::GetCrawlerMetrics.build(context)
207
+ when :get_crawlers
208
+ Aws::Glue::Endpoints::GetCrawlers.build(context)
209
+ when :get_custom_entity_type
210
+ Aws::Glue::Endpoints::GetCustomEntityType.build(context)
211
+ when :get_data_catalog_encryption_settings
212
+ Aws::Glue::Endpoints::GetDataCatalogEncryptionSettings.build(context)
213
+ when :get_database
214
+ Aws::Glue::Endpoints::GetDatabase.build(context)
215
+ when :get_databases
216
+ Aws::Glue::Endpoints::GetDatabases.build(context)
217
+ when :get_dataflow_graph
218
+ Aws::Glue::Endpoints::GetDataflowGraph.build(context)
219
+ when :get_dev_endpoint
220
+ Aws::Glue::Endpoints::GetDevEndpoint.build(context)
221
+ when :get_dev_endpoints
222
+ Aws::Glue::Endpoints::GetDevEndpoints.build(context)
223
+ when :get_job
224
+ Aws::Glue::Endpoints::GetJob.build(context)
225
+ when :get_job_bookmark
226
+ Aws::Glue::Endpoints::GetJobBookmark.build(context)
227
+ when :get_job_run
228
+ Aws::Glue::Endpoints::GetJobRun.build(context)
229
+ when :get_job_runs
230
+ Aws::Glue::Endpoints::GetJobRuns.build(context)
231
+ when :get_jobs
232
+ Aws::Glue::Endpoints::GetJobs.build(context)
233
+ when :get_ml_task_run
234
+ Aws::Glue::Endpoints::GetMLTaskRun.build(context)
235
+ when :get_ml_task_runs
236
+ Aws::Glue::Endpoints::GetMLTaskRuns.build(context)
237
+ when :get_ml_transform
238
+ Aws::Glue::Endpoints::GetMLTransform.build(context)
239
+ when :get_ml_transforms
240
+ Aws::Glue::Endpoints::GetMLTransforms.build(context)
241
+ when :get_mapping
242
+ Aws::Glue::Endpoints::GetMapping.build(context)
243
+ when :get_partition
244
+ Aws::Glue::Endpoints::GetPartition.build(context)
245
+ when :get_partition_indexes
246
+ Aws::Glue::Endpoints::GetPartitionIndexes.build(context)
247
+ when :get_partitions
248
+ Aws::Glue::Endpoints::GetPartitions.build(context)
249
+ when :get_plan
250
+ Aws::Glue::Endpoints::GetPlan.build(context)
251
+ when :get_registry
252
+ Aws::Glue::Endpoints::GetRegistry.build(context)
253
+ when :get_resource_policies
254
+ Aws::Glue::Endpoints::GetResourcePolicies.build(context)
255
+ when :get_resource_policy
256
+ Aws::Glue::Endpoints::GetResourcePolicy.build(context)
257
+ when :get_schema
258
+ Aws::Glue::Endpoints::GetSchema.build(context)
259
+ when :get_schema_by_definition
260
+ Aws::Glue::Endpoints::GetSchemaByDefinition.build(context)
261
+ when :get_schema_version
262
+ Aws::Glue::Endpoints::GetSchemaVersion.build(context)
263
+ when :get_schema_versions_diff
264
+ Aws::Glue::Endpoints::GetSchemaVersionsDiff.build(context)
265
+ when :get_security_configuration
266
+ Aws::Glue::Endpoints::GetSecurityConfiguration.build(context)
267
+ when :get_security_configurations
268
+ Aws::Glue::Endpoints::GetSecurityConfigurations.build(context)
269
+ when :get_session
270
+ Aws::Glue::Endpoints::GetSession.build(context)
271
+ when :get_statement
272
+ Aws::Glue::Endpoints::GetStatement.build(context)
273
+ when :get_table
274
+ Aws::Glue::Endpoints::GetTable.build(context)
275
+ when :get_table_version
276
+ Aws::Glue::Endpoints::GetTableVersion.build(context)
277
+ when :get_table_versions
278
+ Aws::Glue::Endpoints::GetTableVersions.build(context)
279
+ when :get_tables
280
+ Aws::Glue::Endpoints::GetTables.build(context)
281
+ when :get_tags
282
+ Aws::Glue::Endpoints::GetTags.build(context)
283
+ when :get_trigger
284
+ Aws::Glue::Endpoints::GetTrigger.build(context)
285
+ when :get_triggers
286
+ Aws::Glue::Endpoints::GetTriggers.build(context)
287
+ when :get_unfiltered_partition_metadata
288
+ Aws::Glue::Endpoints::GetUnfilteredPartitionMetadata.build(context)
289
+ when :get_unfiltered_partitions_metadata
290
+ Aws::Glue::Endpoints::GetUnfilteredPartitionsMetadata.build(context)
291
+ when :get_unfiltered_table_metadata
292
+ Aws::Glue::Endpoints::GetUnfilteredTableMetadata.build(context)
293
+ when :get_user_defined_function
294
+ Aws::Glue::Endpoints::GetUserDefinedFunction.build(context)
295
+ when :get_user_defined_functions
296
+ Aws::Glue::Endpoints::GetUserDefinedFunctions.build(context)
297
+ when :get_workflow
298
+ Aws::Glue::Endpoints::GetWorkflow.build(context)
299
+ when :get_workflow_run
300
+ Aws::Glue::Endpoints::GetWorkflowRun.build(context)
301
+ when :get_workflow_run_properties
302
+ Aws::Glue::Endpoints::GetWorkflowRunProperties.build(context)
303
+ when :get_workflow_runs
304
+ Aws::Glue::Endpoints::GetWorkflowRuns.build(context)
305
+ when :import_catalog_to_glue
306
+ Aws::Glue::Endpoints::ImportCatalogToGlue.build(context)
307
+ when :list_blueprints
308
+ Aws::Glue::Endpoints::ListBlueprints.build(context)
309
+ when :list_crawlers
310
+ Aws::Glue::Endpoints::ListCrawlers.build(context)
311
+ when :list_crawls
312
+ Aws::Glue::Endpoints::ListCrawls.build(context)
313
+ when :list_custom_entity_types
314
+ Aws::Glue::Endpoints::ListCustomEntityTypes.build(context)
315
+ when :list_dev_endpoints
316
+ Aws::Glue::Endpoints::ListDevEndpoints.build(context)
317
+ when :list_jobs
318
+ Aws::Glue::Endpoints::ListJobs.build(context)
319
+ when :list_ml_transforms
320
+ Aws::Glue::Endpoints::ListMLTransforms.build(context)
321
+ when :list_registries
322
+ Aws::Glue::Endpoints::ListRegistries.build(context)
323
+ when :list_schema_versions
324
+ Aws::Glue::Endpoints::ListSchemaVersions.build(context)
325
+ when :list_schemas
326
+ Aws::Glue::Endpoints::ListSchemas.build(context)
327
+ when :list_sessions
328
+ Aws::Glue::Endpoints::ListSessions.build(context)
329
+ when :list_statements
330
+ Aws::Glue::Endpoints::ListStatements.build(context)
331
+ when :list_triggers
332
+ Aws::Glue::Endpoints::ListTriggers.build(context)
333
+ when :list_workflows
334
+ Aws::Glue::Endpoints::ListWorkflows.build(context)
335
+ when :put_data_catalog_encryption_settings
336
+ Aws::Glue::Endpoints::PutDataCatalogEncryptionSettings.build(context)
337
+ when :put_resource_policy
338
+ Aws::Glue::Endpoints::PutResourcePolicy.build(context)
339
+ when :put_schema_version_metadata
340
+ Aws::Glue::Endpoints::PutSchemaVersionMetadata.build(context)
341
+ when :put_workflow_run_properties
342
+ Aws::Glue::Endpoints::PutWorkflowRunProperties.build(context)
343
+ when :query_schema_version_metadata
344
+ Aws::Glue::Endpoints::QuerySchemaVersionMetadata.build(context)
345
+ when :register_schema_version
346
+ Aws::Glue::Endpoints::RegisterSchemaVersion.build(context)
347
+ when :remove_schema_version_metadata
348
+ Aws::Glue::Endpoints::RemoveSchemaVersionMetadata.build(context)
349
+ when :reset_job_bookmark
350
+ Aws::Glue::Endpoints::ResetJobBookmark.build(context)
351
+ when :resume_workflow_run
352
+ Aws::Glue::Endpoints::ResumeWorkflowRun.build(context)
353
+ when :run_statement
354
+ Aws::Glue::Endpoints::RunStatement.build(context)
355
+ when :search_tables
356
+ Aws::Glue::Endpoints::SearchTables.build(context)
357
+ when :start_blueprint_run
358
+ Aws::Glue::Endpoints::StartBlueprintRun.build(context)
359
+ when :start_crawler
360
+ Aws::Glue::Endpoints::StartCrawler.build(context)
361
+ when :start_crawler_schedule
362
+ Aws::Glue::Endpoints::StartCrawlerSchedule.build(context)
363
+ when :start_export_labels_task_run
364
+ Aws::Glue::Endpoints::StartExportLabelsTaskRun.build(context)
365
+ when :start_import_labels_task_run
366
+ Aws::Glue::Endpoints::StartImportLabelsTaskRun.build(context)
367
+ when :start_job_run
368
+ Aws::Glue::Endpoints::StartJobRun.build(context)
369
+ when :start_ml_evaluation_task_run
370
+ Aws::Glue::Endpoints::StartMLEvaluationTaskRun.build(context)
371
+ when :start_ml_labeling_set_generation_task_run
372
+ Aws::Glue::Endpoints::StartMLLabelingSetGenerationTaskRun.build(context)
373
+ when :start_trigger
374
+ Aws::Glue::Endpoints::StartTrigger.build(context)
375
+ when :start_workflow_run
376
+ Aws::Glue::Endpoints::StartWorkflowRun.build(context)
377
+ when :stop_crawler
378
+ Aws::Glue::Endpoints::StopCrawler.build(context)
379
+ when :stop_crawler_schedule
380
+ Aws::Glue::Endpoints::StopCrawlerSchedule.build(context)
381
+ when :stop_session
382
+ Aws::Glue::Endpoints::StopSession.build(context)
383
+ when :stop_trigger
384
+ Aws::Glue::Endpoints::StopTrigger.build(context)
385
+ when :stop_workflow_run
386
+ Aws::Glue::Endpoints::StopWorkflowRun.build(context)
387
+ when :tag_resource
388
+ Aws::Glue::Endpoints::TagResource.build(context)
389
+ when :untag_resource
390
+ Aws::Glue::Endpoints::UntagResource.build(context)
391
+ when :update_blueprint
392
+ Aws::Glue::Endpoints::UpdateBlueprint.build(context)
393
+ when :update_classifier
394
+ Aws::Glue::Endpoints::UpdateClassifier.build(context)
395
+ when :update_column_statistics_for_partition
396
+ Aws::Glue::Endpoints::UpdateColumnStatisticsForPartition.build(context)
397
+ when :update_column_statistics_for_table
398
+ Aws::Glue::Endpoints::UpdateColumnStatisticsForTable.build(context)
399
+ when :update_connection
400
+ Aws::Glue::Endpoints::UpdateConnection.build(context)
401
+ when :update_crawler
402
+ Aws::Glue::Endpoints::UpdateCrawler.build(context)
403
+ when :update_crawler_schedule
404
+ Aws::Glue::Endpoints::UpdateCrawlerSchedule.build(context)
405
+ when :update_database
406
+ Aws::Glue::Endpoints::UpdateDatabase.build(context)
407
+ when :update_dev_endpoint
408
+ Aws::Glue::Endpoints::UpdateDevEndpoint.build(context)
409
+ when :update_job
410
+ Aws::Glue::Endpoints::UpdateJob.build(context)
411
+ when :update_job_from_source_control
412
+ Aws::Glue::Endpoints::UpdateJobFromSourceControl.build(context)
413
+ when :update_ml_transform
414
+ Aws::Glue::Endpoints::UpdateMLTransform.build(context)
415
+ when :update_partition
416
+ Aws::Glue::Endpoints::UpdatePartition.build(context)
417
+ when :update_registry
418
+ Aws::Glue::Endpoints::UpdateRegistry.build(context)
419
+ when :update_schema
420
+ Aws::Glue::Endpoints::UpdateSchema.build(context)
421
+ when :update_source_control_from_job
422
+ Aws::Glue::Endpoints::UpdateSourceControlFromJob.build(context)
423
+ when :update_table
424
+ Aws::Glue::Endpoints::UpdateTable.build(context)
425
+ when :update_trigger
426
+ Aws::Glue::Endpoints::UpdateTrigger.build(context)
427
+ when :update_user_defined_function
428
+ Aws::Glue::Endpoints::UpdateUserDefinedFunction.build(context)
429
+ when :update_workflow
430
+ Aws::Glue::Endpoints::UpdateWorkflow.build(context)
431
+ end
432
+ end
433
+ end
434
+
435
+ def add_handlers(handlers, _config)
436
+ handlers.add(Handler, step: :build, priority: 75)
437
+ end
438
+ end
439
+ end
440
+ end