aws-sdk-opsworks 1.41.0 → 1.43.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 +13 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-opsworks/client.rb +20 -3
- data/lib/aws-sdk-opsworks/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-opsworks/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-opsworks/endpoints.rb +1051 -0
- data/lib/aws-sdk-opsworks/plugins/endpoints.rb +216 -0
- data/lib/aws-sdk-opsworks/types.rb +0 -1176
- data/lib/aws-sdk-opsworks.rb +5 -1
- metadata +8 -4
@@ -0,0 +1,216 @@
|
|
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::OpsWorks
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::OpsWorks::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::OpsWorks::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::OpsWorks::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 :assign_instance
|
60
|
+
Aws::OpsWorks::Endpoints::AssignInstance.build(context)
|
61
|
+
when :assign_volume
|
62
|
+
Aws::OpsWorks::Endpoints::AssignVolume.build(context)
|
63
|
+
when :associate_elastic_ip
|
64
|
+
Aws::OpsWorks::Endpoints::AssociateElasticIp.build(context)
|
65
|
+
when :attach_elastic_load_balancer
|
66
|
+
Aws::OpsWorks::Endpoints::AttachElasticLoadBalancer.build(context)
|
67
|
+
when :clone_stack
|
68
|
+
Aws::OpsWorks::Endpoints::CloneStack.build(context)
|
69
|
+
when :create_app
|
70
|
+
Aws::OpsWorks::Endpoints::CreateApp.build(context)
|
71
|
+
when :create_deployment
|
72
|
+
Aws::OpsWorks::Endpoints::CreateDeployment.build(context)
|
73
|
+
when :create_instance
|
74
|
+
Aws::OpsWorks::Endpoints::CreateInstance.build(context)
|
75
|
+
when :create_layer
|
76
|
+
Aws::OpsWorks::Endpoints::CreateLayer.build(context)
|
77
|
+
when :create_stack
|
78
|
+
Aws::OpsWorks::Endpoints::CreateStack.build(context)
|
79
|
+
when :create_user_profile
|
80
|
+
Aws::OpsWorks::Endpoints::CreateUserProfile.build(context)
|
81
|
+
when :delete_app
|
82
|
+
Aws::OpsWorks::Endpoints::DeleteApp.build(context)
|
83
|
+
when :delete_instance
|
84
|
+
Aws::OpsWorks::Endpoints::DeleteInstance.build(context)
|
85
|
+
when :delete_layer
|
86
|
+
Aws::OpsWorks::Endpoints::DeleteLayer.build(context)
|
87
|
+
when :delete_stack
|
88
|
+
Aws::OpsWorks::Endpoints::DeleteStack.build(context)
|
89
|
+
when :delete_user_profile
|
90
|
+
Aws::OpsWorks::Endpoints::DeleteUserProfile.build(context)
|
91
|
+
when :deregister_ecs_cluster
|
92
|
+
Aws::OpsWorks::Endpoints::DeregisterEcsCluster.build(context)
|
93
|
+
when :deregister_elastic_ip
|
94
|
+
Aws::OpsWorks::Endpoints::DeregisterElasticIp.build(context)
|
95
|
+
when :deregister_instance
|
96
|
+
Aws::OpsWorks::Endpoints::DeregisterInstance.build(context)
|
97
|
+
when :deregister_rds_db_instance
|
98
|
+
Aws::OpsWorks::Endpoints::DeregisterRdsDbInstance.build(context)
|
99
|
+
when :deregister_volume
|
100
|
+
Aws::OpsWorks::Endpoints::DeregisterVolume.build(context)
|
101
|
+
when :describe_agent_versions
|
102
|
+
Aws::OpsWorks::Endpoints::DescribeAgentVersions.build(context)
|
103
|
+
when :describe_apps
|
104
|
+
Aws::OpsWorks::Endpoints::DescribeApps.build(context)
|
105
|
+
when :describe_commands
|
106
|
+
Aws::OpsWorks::Endpoints::DescribeCommands.build(context)
|
107
|
+
when :describe_deployments
|
108
|
+
Aws::OpsWorks::Endpoints::DescribeDeployments.build(context)
|
109
|
+
when :describe_ecs_clusters
|
110
|
+
Aws::OpsWorks::Endpoints::DescribeEcsClusters.build(context)
|
111
|
+
when :describe_elastic_ips
|
112
|
+
Aws::OpsWorks::Endpoints::DescribeElasticIps.build(context)
|
113
|
+
when :describe_elastic_load_balancers
|
114
|
+
Aws::OpsWorks::Endpoints::DescribeElasticLoadBalancers.build(context)
|
115
|
+
when :describe_instances
|
116
|
+
Aws::OpsWorks::Endpoints::DescribeInstances.build(context)
|
117
|
+
when :describe_layers
|
118
|
+
Aws::OpsWorks::Endpoints::DescribeLayers.build(context)
|
119
|
+
when :describe_load_based_auto_scaling
|
120
|
+
Aws::OpsWorks::Endpoints::DescribeLoadBasedAutoScaling.build(context)
|
121
|
+
when :describe_my_user_profile
|
122
|
+
Aws::OpsWorks::Endpoints::DescribeMyUserProfile.build(context)
|
123
|
+
when :describe_operating_systems
|
124
|
+
Aws::OpsWorks::Endpoints::DescribeOperatingSystems.build(context)
|
125
|
+
when :describe_permissions
|
126
|
+
Aws::OpsWorks::Endpoints::DescribePermissions.build(context)
|
127
|
+
when :describe_raid_arrays
|
128
|
+
Aws::OpsWorks::Endpoints::DescribeRaidArrays.build(context)
|
129
|
+
when :describe_rds_db_instances
|
130
|
+
Aws::OpsWorks::Endpoints::DescribeRdsDbInstances.build(context)
|
131
|
+
when :describe_service_errors
|
132
|
+
Aws::OpsWorks::Endpoints::DescribeServiceErrors.build(context)
|
133
|
+
when :describe_stack_provisioning_parameters
|
134
|
+
Aws::OpsWorks::Endpoints::DescribeStackProvisioningParameters.build(context)
|
135
|
+
when :describe_stack_summary
|
136
|
+
Aws::OpsWorks::Endpoints::DescribeStackSummary.build(context)
|
137
|
+
when :describe_stacks
|
138
|
+
Aws::OpsWorks::Endpoints::DescribeStacks.build(context)
|
139
|
+
when :describe_time_based_auto_scaling
|
140
|
+
Aws::OpsWorks::Endpoints::DescribeTimeBasedAutoScaling.build(context)
|
141
|
+
when :describe_user_profiles
|
142
|
+
Aws::OpsWorks::Endpoints::DescribeUserProfiles.build(context)
|
143
|
+
when :describe_volumes
|
144
|
+
Aws::OpsWorks::Endpoints::DescribeVolumes.build(context)
|
145
|
+
when :detach_elastic_load_balancer
|
146
|
+
Aws::OpsWorks::Endpoints::DetachElasticLoadBalancer.build(context)
|
147
|
+
when :disassociate_elastic_ip
|
148
|
+
Aws::OpsWorks::Endpoints::DisassociateElasticIp.build(context)
|
149
|
+
when :get_hostname_suggestion
|
150
|
+
Aws::OpsWorks::Endpoints::GetHostnameSuggestion.build(context)
|
151
|
+
when :grant_access
|
152
|
+
Aws::OpsWorks::Endpoints::GrantAccess.build(context)
|
153
|
+
when :list_tags
|
154
|
+
Aws::OpsWorks::Endpoints::ListTags.build(context)
|
155
|
+
when :reboot_instance
|
156
|
+
Aws::OpsWorks::Endpoints::RebootInstance.build(context)
|
157
|
+
when :register_ecs_cluster
|
158
|
+
Aws::OpsWorks::Endpoints::RegisterEcsCluster.build(context)
|
159
|
+
when :register_elastic_ip
|
160
|
+
Aws::OpsWorks::Endpoints::RegisterElasticIp.build(context)
|
161
|
+
when :register_instance
|
162
|
+
Aws::OpsWorks::Endpoints::RegisterInstance.build(context)
|
163
|
+
when :register_rds_db_instance
|
164
|
+
Aws::OpsWorks::Endpoints::RegisterRdsDbInstance.build(context)
|
165
|
+
when :register_volume
|
166
|
+
Aws::OpsWorks::Endpoints::RegisterVolume.build(context)
|
167
|
+
when :set_load_based_auto_scaling
|
168
|
+
Aws::OpsWorks::Endpoints::SetLoadBasedAutoScaling.build(context)
|
169
|
+
when :set_permission
|
170
|
+
Aws::OpsWorks::Endpoints::SetPermission.build(context)
|
171
|
+
when :set_time_based_auto_scaling
|
172
|
+
Aws::OpsWorks::Endpoints::SetTimeBasedAutoScaling.build(context)
|
173
|
+
when :start_instance
|
174
|
+
Aws::OpsWorks::Endpoints::StartInstance.build(context)
|
175
|
+
when :start_stack
|
176
|
+
Aws::OpsWorks::Endpoints::StartStack.build(context)
|
177
|
+
when :stop_instance
|
178
|
+
Aws::OpsWorks::Endpoints::StopInstance.build(context)
|
179
|
+
when :stop_stack
|
180
|
+
Aws::OpsWorks::Endpoints::StopStack.build(context)
|
181
|
+
when :tag_resource
|
182
|
+
Aws::OpsWorks::Endpoints::TagResource.build(context)
|
183
|
+
when :unassign_instance
|
184
|
+
Aws::OpsWorks::Endpoints::UnassignInstance.build(context)
|
185
|
+
when :unassign_volume
|
186
|
+
Aws::OpsWorks::Endpoints::UnassignVolume.build(context)
|
187
|
+
when :untag_resource
|
188
|
+
Aws::OpsWorks::Endpoints::UntagResource.build(context)
|
189
|
+
when :update_app
|
190
|
+
Aws::OpsWorks::Endpoints::UpdateApp.build(context)
|
191
|
+
when :update_elastic_ip
|
192
|
+
Aws::OpsWorks::Endpoints::UpdateElasticIp.build(context)
|
193
|
+
when :update_instance
|
194
|
+
Aws::OpsWorks::Endpoints::UpdateInstance.build(context)
|
195
|
+
when :update_layer
|
196
|
+
Aws::OpsWorks::Endpoints::UpdateLayer.build(context)
|
197
|
+
when :update_my_user_profile
|
198
|
+
Aws::OpsWorks::Endpoints::UpdateMyUserProfile.build(context)
|
199
|
+
when :update_rds_db_instance
|
200
|
+
Aws::OpsWorks::Endpoints::UpdateRdsDbInstance.build(context)
|
201
|
+
when :update_stack
|
202
|
+
Aws::OpsWorks::Endpoints::UpdateStack.build(context)
|
203
|
+
when :update_user_profile
|
204
|
+
Aws::OpsWorks::Endpoints::UpdateUserProfile.build(context)
|
205
|
+
when :update_volume
|
206
|
+
Aws::OpsWorks::Endpoints::UpdateVolume.build(context)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
def add_handlers(handlers, _config)
|
212
|
+
handlers.add(Handler, step: :build, priority: 75)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|