aws-sdk-elasticbeanstalk 1.51.0 → 1.53.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-elasticbeanstalk/client.rb +20 -3
- data/lib/aws-sdk-elasticbeanstalk/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-elasticbeanstalk/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-elasticbeanstalk/endpoints.rb +673 -0
- data/lib/aws-sdk-elasticbeanstalk/plugins/endpoints.rb +162 -0
- data/lib/aws-sdk-elasticbeanstalk/types.rb +0 -741
- data/lib/aws-sdk-elasticbeanstalk.rb +5 -1
- metadata +8 -4
@@ -0,0 +1,162 @@
|
|
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::ElasticBeanstalk
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::ElasticBeanstalk::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::ElasticBeanstalk::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::ElasticBeanstalk::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 :abort_environment_update
|
60
|
+
Aws::ElasticBeanstalk::Endpoints::AbortEnvironmentUpdate.build(context)
|
61
|
+
when :apply_environment_managed_action
|
62
|
+
Aws::ElasticBeanstalk::Endpoints::ApplyEnvironmentManagedAction.build(context)
|
63
|
+
when :associate_environment_operations_role
|
64
|
+
Aws::ElasticBeanstalk::Endpoints::AssociateEnvironmentOperationsRole.build(context)
|
65
|
+
when :check_dns_availability
|
66
|
+
Aws::ElasticBeanstalk::Endpoints::CheckDNSAvailability.build(context)
|
67
|
+
when :compose_environments
|
68
|
+
Aws::ElasticBeanstalk::Endpoints::ComposeEnvironments.build(context)
|
69
|
+
when :create_application
|
70
|
+
Aws::ElasticBeanstalk::Endpoints::CreateApplication.build(context)
|
71
|
+
when :create_application_version
|
72
|
+
Aws::ElasticBeanstalk::Endpoints::CreateApplicationVersion.build(context)
|
73
|
+
when :create_configuration_template
|
74
|
+
Aws::ElasticBeanstalk::Endpoints::CreateConfigurationTemplate.build(context)
|
75
|
+
when :create_environment
|
76
|
+
Aws::ElasticBeanstalk::Endpoints::CreateEnvironment.build(context)
|
77
|
+
when :create_platform_version
|
78
|
+
Aws::ElasticBeanstalk::Endpoints::CreatePlatformVersion.build(context)
|
79
|
+
when :create_storage_location
|
80
|
+
Aws::ElasticBeanstalk::Endpoints::CreateStorageLocation.build(context)
|
81
|
+
when :delete_application
|
82
|
+
Aws::ElasticBeanstalk::Endpoints::DeleteApplication.build(context)
|
83
|
+
when :delete_application_version
|
84
|
+
Aws::ElasticBeanstalk::Endpoints::DeleteApplicationVersion.build(context)
|
85
|
+
when :delete_configuration_template
|
86
|
+
Aws::ElasticBeanstalk::Endpoints::DeleteConfigurationTemplate.build(context)
|
87
|
+
when :delete_environment_configuration
|
88
|
+
Aws::ElasticBeanstalk::Endpoints::DeleteEnvironmentConfiguration.build(context)
|
89
|
+
when :delete_platform_version
|
90
|
+
Aws::ElasticBeanstalk::Endpoints::DeletePlatformVersion.build(context)
|
91
|
+
when :describe_account_attributes
|
92
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeAccountAttributes.build(context)
|
93
|
+
when :describe_application_versions
|
94
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeApplicationVersions.build(context)
|
95
|
+
when :describe_applications
|
96
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeApplications.build(context)
|
97
|
+
when :describe_configuration_options
|
98
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeConfigurationOptions.build(context)
|
99
|
+
when :describe_configuration_settings
|
100
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeConfigurationSettings.build(context)
|
101
|
+
when :describe_environment_health
|
102
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeEnvironmentHealth.build(context)
|
103
|
+
when :describe_environment_managed_action_history
|
104
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeEnvironmentManagedActionHistory.build(context)
|
105
|
+
when :describe_environment_managed_actions
|
106
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeEnvironmentManagedActions.build(context)
|
107
|
+
when :describe_environment_resources
|
108
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeEnvironmentResources.build(context)
|
109
|
+
when :describe_environments
|
110
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeEnvironments.build(context)
|
111
|
+
when :describe_events
|
112
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeEvents.build(context)
|
113
|
+
when :describe_instances_health
|
114
|
+
Aws::ElasticBeanstalk::Endpoints::DescribeInstancesHealth.build(context)
|
115
|
+
when :describe_platform_version
|
116
|
+
Aws::ElasticBeanstalk::Endpoints::DescribePlatformVersion.build(context)
|
117
|
+
when :disassociate_environment_operations_role
|
118
|
+
Aws::ElasticBeanstalk::Endpoints::DisassociateEnvironmentOperationsRole.build(context)
|
119
|
+
when :list_available_solution_stacks
|
120
|
+
Aws::ElasticBeanstalk::Endpoints::ListAvailableSolutionStacks.build(context)
|
121
|
+
when :list_platform_branches
|
122
|
+
Aws::ElasticBeanstalk::Endpoints::ListPlatformBranches.build(context)
|
123
|
+
when :list_platform_versions
|
124
|
+
Aws::ElasticBeanstalk::Endpoints::ListPlatformVersions.build(context)
|
125
|
+
when :list_tags_for_resource
|
126
|
+
Aws::ElasticBeanstalk::Endpoints::ListTagsForResource.build(context)
|
127
|
+
when :rebuild_environment
|
128
|
+
Aws::ElasticBeanstalk::Endpoints::RebuildEnvironment.build(context)
|
129
|
+
when :request_environment_info
|
130
|
+
Aws::ElasticBeanstalk::Endpoints::RequestEnvironmentInfo.build(context)
|
131
|
+
when :restart_app_server
|
132
|
+
Aws::ElasticBeanstalk::Endpoints::RestartAppServer.build(context)
|
133
|
+
when :retrieve_environment_info
|
134
|
+
Aws::ElasticBeanstalk::Endpoints::RetrieveEnvironmentInfo.build(context)
|
135
|
+
when :swap_environment_cnames
|
136
|
+
Aws::ElasticBeanstalk::Endpoints::SwapEnvironmentCNAMEs.build(context)
|
137
|
+
when :terminate_environment
|
138
|
+
Aws::ElasticBeanstalk::Endpoints::TerminateEnvironment.build(context)
|
139
|
+
when :update_application
|
140
|
+
Aws::ElasticBeanstalk::Endpoints::UpdateApplication.build(context)
|
141
|
+
when :update_application_resource_lifecycle
|
142
|
+
Aws::ElasticBeanstalk::Endpoints::UpdateApplicationResourceLifecycle.build(context)
|
143
|
+
when :update_application_version
|
144
|
+
Aws::ElasticBeanstalk::Endpoints::UpdateApplicationVersion.build(context)
|
145
|
+
when :update_configuration_template
|
146
|
+
Aws::ElasticBeanstalk::Endpoints::UpdateConfigurationTemplate.build(context)
|
147
|
+
when :update_environment
|
148
|
+
Aws::ElasticBeanstalk::Endpoints::UpdateEnvironment.build(context)
|
149
|
+
when :update_tags_for_resource
|
150
|
+
Aws::ElasticBeanstalk::Endpoints::UpdateTagsForResource.build(context)
|
151
|
+
when :validate_configuration_settings
|
152
|
+
Aws::ElasticBeanstalk::Endpoints::ValidateConfigurationSettings.build(context)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def add_handlers(handlers, _config)
|
158
|
+
handlers.add(Handler, step: :build, priority: 75)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|