aws-sdk-gamelift 1.58.0 → 1.60.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,276 @@
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::GameLift
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::GameLift::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::GameLift::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::GameLift::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 :accept_match
60
+ Aws::GameLift::Endpoints::AcceptMatch.build(context)
61
+ when :claim_game_server
62
+ Aws::GameLift::Endpoints::ClaimGameServer.build(context)
63
+ when :create_alias
64
+ Aws::GameLift::Endpoints::CreateAlias.build(context)
65
+ when :create_build
66
+ Aws::GameLift::Endpoints::CreateBuild.build(context)
67
+ when :create_fleet
68
+ Aws::GameLift::Endpoints::CreateFleet.build(context)
69
+ when :create_fleet_locations
70
+ Aws::GameLift::Endpoints::CreateFleetLocations.build(context)
71
+ when :create_game_server_group
72
+ Aws::GameLift::Endpoints::CreateGameServerGroup.build(context)
73
+ when :create_game_session
74
+ Aws::GameLift::Endpoints::CreateGameSession.build(context)
75
+ when :create_game_session_queue
76
+ Aws::GameLift::Endpoints::CreateGameSessionQueue.build(context)
77
+ when :create_location
78
+ Aws::GameLift::Endpoints::CreateLocation.build(context)
79
+ when :create_matchmaking_configuration
80
+ Aws::GameLift::Endpoints::CreateMatchmakingConfiguration.build(context)
81
+ when :create_matchmaking_rule_set
82
+ Aws::GameLift::Endpoints::CreateMatchmakingRuleSet.build(context)
83
+ when :create_player_session
84
+ Aws::GameLift::Endpoints::CreatePlayerSession.build(context)
85
+ when :create_player_sessions
86
+ Aws::GameLift::Endpoints::CreatePlayerSessions.build(context)
87
+ when :create_script
88
+ Aws::GameLift::Endpoints::CreateScript.build(context)
89
+ when :create_vpc_peering_authorization
90
+ Aws::GameLift::Endpoints::CreateVpcPeeringAuthorization.build(context)
91
+ when :create_vpc_peering_connection
92
+ Aws::GameLift::Endpoints::CreateVpcPeeringConnection.build(context)
93
+ when :delete_alias
94
+ Aws::GameLift::Endpoints::DeleteAlias.build(context)
95
+ when :delete_build
96
+ Aws::GameLift::Endpoints::DeleteBuild.build(context)
97
+ when :delete_fleet
98
+ Aws::GameLift::Endpoints::DeleteFleet.build(context)
99
+ when :delete_fleet_locations
100
+ Aws::GameLift::Endpoints::DeleteFleetLocations.build(context)
101
+ when :delete_game_server_group
102
+ Aws::GameLift::Endpoints::DeleteGameServerGroup.build(context)
103
+ when :delete_game_session_queue
104
+ Aws::GameLift::Endpoints::DeleteGameSessionQueue.build(context)
105
+ when :delete_location
106
+ Aws::GameLift::Endpoints::DeleteLocation.build(context)
107
+ when :delete_matchmaking_configuration
108
+ Aws::GameLift::Endpoints::DeleteMatchmakingConfiguration.build(context)
109
+ when :delete_matchmaking_rule_set
110
+ Aws::GameLift::Endpoints::DeleteMatchmakingRuleSet.build(context)
111
+ when :delete_scaling_policy
112
+ Aws::GameLift::Endpoints::DeleteScalingPolicy.build(context)
113
+ when :delete_script
114
+ Aws::GameLift::Endpoints::DeleteScript.build(context)
115
+ when :delete_vpc_peering_authorization
116
+ Aws::GameLift::Endpoints::DeleteVpcPeeringAuthorization.build(context)
117
+ when :delete_vpc_peering_connection
118
+ Aws::GameLift::Endpoints::DeleteVpcPeeringConnection.build(context)
119
+ when :deregister_compute
120
+ Aws::GameLift::Endpoints::DeregisterCompute.build(context)
121
+ when :deregister_game_server
122
+ Aws::GameLift::Endpoints::DeregisterGameServer.build(context)
123
+ when :describe_alias
124
+ Aws::GameLift::Endpoints::DescribeAlias.build(context)
125
+ when :describe_build
126
+ Aws::GameLift::Endpoints::DescribeBuild.build(context)
127
+ when :describe_compute
128
+ Aws::GameLift::Endpoints::DescribeCompute.build(context)
129
+ when :describe_ec2_instance_limits
130
+ Aws::GameLift::Endpoints::DescribeEC2InstanceLimits.build(context)
131
+ when :describe_fleet_attributes
132
+ Aws::GameLift::Endpoints::DescribeFleetAttributes.build(context)
133
+ when :describe_fleet_capacity
134
+ Aws::GameLift::Endpoints::DescribeFleetCapacity.build(context)
135
+ when :describe_fleet_events
136
+ Aws::GameLift::Endpoints::DescribeFleetEvents.build(context)
137
+ when :describe_fleet_location_attributes
138
+ Aws::GameLift::Endpoints::DescribeFleetLocationAttributes.build(context)
139
+ when :describe_fleet_location_capacity
140
+ Aws::GameLift::Endpoints::DescribeFleetLocationCapacity.build(context)
141
+ when :describe_fleet_location_utilization
142
+ Aws::GameLift::Endpoints::DescribeFleetLocationUtilization.build(context)
143
+ when :describe_fleet_port_settings
144
+ Aws::GameLift::Endpoints::DescribeFleetPortSettings.build(context)
145
+ when :describe_fleet_utilization
146
+ Aws::GameLift::Endpoints::DescribeFleetUtilization.build(context)
147
+ when :describe_game_server
148
+ Aws::GameLift::Endpoints::DescribeGameServer.build(context)
149
+ when :describe_game_server_group
150
+ Aws::GameLift::Endpoints::DescribeGameServerGroup.build(context)
151
+ when :describe_game_server_instances
152
+ Aws::GameLift::Endpoints::DescribeGameServerInstances.build(context)
153
+ when :describe_game_session_details
154
+ Aws::GameLift::Endpoints::DescribeGameSessionDetails.build(context)
155
+ when :describe_game_session_placement
156
+ Aws::GameLift::Endpoints::DescribeGameSessionPlacement.build(context)
157
+ when :describe_game_session_queues
158
+ Aws::GameLift::Endpoints::DescribeGameSessionQueues.build(context)
159
+ when :describe_game_sessions
160
+ Aws::GameLift::Endpoints::DescribeGameSessions.build(context)
161
+ when :describe_instances
162
+ Aws::GameLift::Endpoints::DescribeInstances.build(context)
163
+ when :describe_matchmaking
164
+ Aws::GameLift::Endpoints::DescribeMatchmaking.build(context)
165
+ when :describe_matchmaking_configurations
166
+ Aws::GameLift::Endpoints::DescribeMatchmakingConfigurations.build(context)
167
+ when :describe_matchmaking_rule_sets
168
+ Aws::GameLift::Endpoints::DescribeMatchmakingRuleSets.build(context)
169
+ when :describe_player_sessions
170
+ Aws::GameLift::Endpoints::DescribePlayerSessions.build(context)
171
+ when :describe_runtime_configuration
172
+ Aws::GameLift::Endpoints::DescribeRuntimeConfiguration.build(context)
173
+ when :describe_scaling_policies
174
+ Aws::GameLift::Endpoints::DescribeScalingPolicies.build(context)
175
+ when :describe_script
176
+ Aws::GameLift::Endpoints::DescribeScript.build(context)
177
+ when :describe_vpc_peering_authorizations
178
+ Aws::GameLift::Endpoints::DescribeVpcPeeringAuthorizations.build(context)
179
+ when :describe_vpc_peering_connections
180
+ Aws::GameLift::Endpoints::DescribeVpcPeeringConnections.build(context)
181
+ when :get_compute_access
182
+ Aws::GameLift::Endpoints::GetComputeAccess.build(context)
183
+ when :get_compute_auth_token
184
+ Aws::GameLift::Endpoints::GetComputeAuthToken.build(context)
185
+ when :get_game_session_log_url
186
+ Aws::GameLift::Endpoints::GetGameSessionLogUrl.build(context)
187
+ when :get_instance_access
188
+ Aws::GameLift::Endpoints::GetInstanceAccess.build(context)
189
+ when :list_aliases
190
+ Aws::GameLift::Endpoints::ListAliases.build(context)
191
+ when :list_builds
192
+ Aws::GameLift::Endpoints::ListBuilds.build(context)
193
+ when :list_compute
194
+ Aws::GameLift::Endpoints::ListCompute.build(context)
195
+ when :list_fleets
196
+ Aws::GameLift::Endpoints::ListFleets.build(context)
197
+ when :list_game_server_groups
198
+ Aws::GameLift::Endpoints::ListGameServerGroups.build(context)
199
+ when :list_game_servers
200
+ Aws::GameLift::Endpoints::ListGameServers.build(context)
201
+ when :list_locations
202
+ Aws::GameLift::Endpoints::ListLocations.build(context)
203
+ when :list_scripts
204
+ Aws::GameLift::Endpoints::ListScripts.build(context)
205
+ when :list_tags_for_resource
206
+ Aws::GameLift::Endpoints::ListTagsForResource.build(context)
207
+ when :put_scaling_policy
208
+ Aws::GameLift::Endpoints::PutScalingPolicy.build(context)
209
+ when :register_compute
210
+ Aws::GameLift::Endpoints::RegisterCompute.build(context)
211
+ when :register_game_server
212
+ Aws::GameLift::Endpoints::RegisterGameServer.build(context)
213
+ when :request_upload_credentials
214
+ Aws::GameLift::Endpoints::RequestUploadCredentials.build(context)
215
+ when :resolve_alias
216
+ Aws::GameLift::Endpoints::ResolveAlias.build(context)
217
+ when :resume_game_server_group
218
+ Aws::GameLift::Endpoints::ResumeGameServerGroup.build(context)
219
+ when :search_game_sessions
220
+ Aws::GameLift::Endpoints::SearchGameSessions.build(context)
221
+ when :start_fleet_actions
222
+ Aws::GameLift::Endpoints::StartFleetActions.build(context)
223
+ when :start_game_session_placement
224
+ Aws::GameLift::Endpoints::StartGameSessionPlacement.build(context)
225
+ when :start_match_backfill
226
+ Aws::GameLift::Endpoints::StartMatchBackfill.build(context)
227
+ when :start_matchmaking
228
+ Aws::GameLift::Endpoints::StartMatchmaking.build(context)
229
+ when :stop_fleet_actions
230
+ Aws::GameLift::Endpoints::StopFleetActions.build(context)
231
+ when :stop_game_session_placement
232
+ Aws::GameLift::Endpoints::StopGameSessionPlacement.build(context)
233
+ when :stop_matchmaking
234
+ Aws::GameLift::Endpoints::StopMatchmaking.build(context)
235
+ when :suspend_game_server_group
236
+ Aws::GameLift::Endpoints::SuspendGameServerGroup.build(context)
237
+ when :tag_resource
238
+ Aws::GameLift::Endpoints::TagResource.build(context)
239
+ when :untag_resource
240
+ Aws::GameLift::Endpoints::UntagResource.build(context)
241
+ when :update_alias
242
+ Aws::GameLift::Endpoints::UpdateAlias.build(context)
243
+ when :update_build
244
+ Aws::GameLift::Endpoints::UpdateBuild.build(context)
245
+ when :update_fleet_attributes
246
+ Aws::GameLift::Endpoints::UpdateFleetAttributes.build(context)
247
+ when :update_fleet_capacity
248
+ Aws::GameLift::Endpoints::UpdateFleetCapacity.build(context)
249
+ when :update_fleet_port_settings
250
+ Aws::GameLift::Endpoints::UpdateFleetPortSettings.build(context)
251
+ when :update_game_server
252
+ Aws::GameLift::Endpoints::UpdateGameServer.build(context)
253
+ when :update_game_server_group
254
+ Aws::GameLift::Endpoints::UpdateGameServerGroup.build(context)
255
+ when :update_game_session
256
+ Aws::GameLift::Endpoints::UpdateGameSession.build(context)
257
+ when :update_game_session_queue
258
+ Aws::GameLift::Endpoints::UpdateGameSessionQueue.build(context)
259
+ when :update_matchmaking_configuration
260
+ Aws::GameLift::Endpoints::UpdateMatchmakingConfiguration.build(context)
261
+ when :update_runtime_configuration
262
+ Aws::GameLift::Endpoints::UpdateRuntimeConfiguration.build(context)
263
+ when :update_script
264
+ Aws::GameLift::Endpoints::UpdateScript.build(context)
265
+ when :validate_matchmaking_rule_set
266
+ Aws::GameLift::Endpoints::ValidateMatchmakingRuleSet.build(context)
267
+ end
268
+ end
269
+ end
270
+
271
+ def add_handlers(handlers, _config)
272
+ handlers.add(Handler, step: :build, priority: 75)
273
+ end
274
+ end
275
+ end
276
+ end