aws-sdk-gluedatabrew 1.22.0 → 1.24.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,156 @@
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::GlueDataBrew
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::GlueDataBrew::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::GlueDataBrew::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::GlueDataBrew::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_delete_recipe_version
60
+ Aws::GlueDataBrew::Endpoints::BatchDeleteRecipeVersion.build(context)
61
+ when :create_dataset
62
+ Aws::GlueDataBrew::Endpoints::CreateDataset.build(context)
63
+ when :create_profile_job
64
+ Aws::GlueDataBrew::Endpoints::CreateProfileJob.build(context)
65
+ when :create_project
66
+ Aws::GlueDataBrew::Endpoints::CreateProject.build(context)
67
+ when :create_recipe
68
+ Aws::GlueDataBrew::Endpoints::CreateRecipe.build(context)
69
+ when :create_recipe_job
70
+ Aws::GlueDataBrew::Endpoints::CreateRecipeJob.build(context)
71
+ when :create_ruleset
72
+ Aws::GlueDataBrew::Endpoints::CreateRuleset.build(context)
73
+ when :create_schedule
74
+ Aws::GlueDataBrew::Endpoints::CreateSchedule.build(context)
75
+ when :delete_dataset
76
+ Aws::GlueDataBrew::Endpoints::DeleteDataset.build(context)
77
+ when :delete_job
78
+ Aws::GlueDataBrew::Endpoints::DeleteJob.build(context)
79
+ when :delete_project
80
+ Aws::GlueDataBrew::Endpoints::DeleteProject.build(context)
81
+ when :delete_recipe_version
82
+ Aws::GlueDataBrew::Endpoints::DeleteRecipeVersion.build(context)
83
+ when :delete_ruleset
84
+ Aws::GlueDataBrew::Endpoints::DeleteRuleset.build(context)
85
+ when :delete_schedule
86
+ Aws::GlueDataBrew::Endpoints::DeleteSchedule.build(context)
87
+ when :describe_dataset
88
+ Aws::GlueDataBrew::Endpoints::DescribeDataset.build(context)
89
+ when :describe_job
90
+ Aws::GlueDataBrew::Endpoints::DescribeJob.build(context)
91
+ when :describe_job_run
92
+ Aws::GlueDataBrew::Endpoints::DescribeJobRun.build(context)
93
+ when :describe_project
94
+ Aws::GlueDataBrew::Endpoints::DescribeProject.build(context)
95
+ when :describe_recipe
96
+ Aws::GlueDataBrew::Endpoints::DescribeRecipe.build(context)
97
+ when :describe_ruleset
98
+ Aws::GlueDataBrew::Endpoints::DescribeRuleset.build(context)
99
+ when :describe_schedule
100
+ Aws::GlueDataBrew::Endpoints::DescribeSchedule.build(context)
101
+ when :list_datasets
102
+ Aws::GlueDataBrew::Endpoints::ListDatasets.build(context)
103
+ when :list_job_runs
104
+ Aws::GlueDataBrew::Endpoints::ListJobRuns.build(context)
105
+ when :list_jobs
106
+ Aws::GlueDataBrew::Endpoints::ListJobs.build(context)
107
+ when :list_projects
108
+ Aws::GlueDataBrew::Endpoints::ListProjects.build(context)
109
+ when :list_recipe_versions
110
+ Aws::GlueDataBrew::Endpoints::ListRecipeVersions.build(context)
111
+ when :list_recipes
112
+ Aws::GlueDataBrew::Endpoints::ListRecipes.build(context)
113
+ when :list_rulesets
114
+ Aws::GlueDataBrew::Endpoints::ListRulesets.build(context)
115
+ when :list_schedules
116
+ Aws::GlueDataBrew::Endpoints::ListSchedules.build(context)
117
+ when :list_tags_for_resource
118
+ Aws::GlueDataBrew::Endpoints::ListTagsForResource.build(context)
119
+ when :publish_recipe
120
+ Aws::GlueDataBrew::Endpoints::PublishRecipe.build(context)
121
+ when :send_project_session_action
122
+ Aws::GlueDataBrew::Endpoints::SendProjectSessionAction.build(context)
123
+ when :start_job_run
124
+ Aws::GlueDataBrew::Endpoints::StartJobRun.build(context)
125
+ when :start_project_session
126
+ Aws::GlueDataBrew::Endpoints::StartProjectSession.build(context)
127
+ when :stop_job_run
128
+ Aws::GlueDataBrew::Endpoints::StopJobRun.build(context)
129
+ when :tag_resource
130
+ Aws::GlueDataBrew::Endpoints::TagResource.build(context)
131
+ when :untag_resource
132
+ Aws::GlueDataBrew::Endpoints::UntagResource.build(context)
133
+ when :update_dataset
134
+ Aws::GlueDataBrew::Endpoints::UpdateDataset.build(context)
135
+ when :update_profile_job
136
+ Aws::GlueDataBrew::Endpoints::UpdateProfileJob.build(context)
137
+ when :update_project
138
+ Aws::GlueDataBrew::Endpoints::UpdateProject.build(context)
139
+ when :update_recipe
140
+ Aws::GlueDataBrew::Endpoints::UpdateRecipe.build(context)
141
+ when :update_recipe_job
142
+ Aws::GlueDataBrew::Endpoints::UpdateRecipeJob.build(context)
143
+ when :update_ruleset
144
+ Aws::GlueDataBrew::Endpoints::UpdateRuleset.build(context)
145
+ when :update_schedule
146
+ Aws::GlueDataBrew::Endpoints::UpdateSchedule.build(context)
147
+ end
148
+ end
149
+ end
150
+
151
+ def add_handlers(handlers, _config)
152
+ handlers.add(Handler, step: :build, priority: 75)
153
+ end
154
+ end
155
+ end
156
+ end