aws-sdk-gameliftstreams 1.0.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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-gameliftstreams/client.rb +2617 -0
- data/lib/aws-sdk-gameliftstreams/client_api.rb +904 -0
- data/lib/aws-sdk-gameliftstreams/customizations.rb +0 -0
- data/lib/aws-sdk-gameliftstreams/endpoint_parameters.rb +59 -0
- data/lib/aws-sdk-gameliftstreams/endpoint_provider.rb +32 -0
- data/lib/aws-sdk-gameliftstreams/endpoints.rb +20 -0
- data/lib/aws-sdk-gameliftstreams/errors.rb +162 -0
- data/lib/aws-sdk-gameliftstreams/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-gameliftstreams/resource.rb +26 -0
- data/lib/aws-sdk-gameliftstreams/types.rb +3334 -0
- data/lib/aws-sdk-gameliftstreams/waiters.rb +299 -0
- data/lib/aws-sdk-gameliftstreams.rb +62 -0
- data/sig/client.rbs +511 -0
- data/sig/errors.rbs +37 -0
- data/sig/resource.rbs +84 -0
- data/sig/types.rbs +503 -0
- data/sig/waiters.rbs +64 -0
- metadata +100 -0
@@ -0,0 +1,299 @@
|
|
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
|
+
require 'aws-sdk-core/waiters'
|
11
|
+
|
12
|
+
module Aws::GameLiftStreams
|
13
|
+
# Waiters are utility methods that poll for a particular state to occur
|
14
|
+
# on a client. Waiters can fail after a number of attempts at a polling
|
15
|
+
# interval defined for the service client.
|
16
|
+
#
|
17
|
+
# For a list of operations that can be waited for and the
|
18
|
+
# client methods called for each operation, see the table below or the
|
19
|
+
# {Client#wait_until} field documentation for the {Client}.
|
20
|
+
#
|
21
|
+
# # Invoking a Waiter
|
22
|
+
# To invoke a waiter, call #wait_until on a {Client}. The first parameter
|
23
|
+
# is the waiter name, which is specific to the service client and indicates
|
24
|
+
# which operation is being waited for. The second parameter is a hash of
|
25
|
+
# parameters that are passed to the client method called by the waiter,
|
26
|
+
# which varies according to the waiter name.
|
27
|
+
#
|
28
|
+
# # Wait Failures
|
29
|
+
# To catch errors in a waiter, use WaiterFailed,
|
30
|
+
# as shown in the following example.
|
31
|
+
#
|
32
|
+
# rescue rescue Aws::Waiters::Errors::WaiterFailed => error
|
33
|
+
# puts "failed waiting for instance running: #{error.message}
|
34
|
+
# end
|
35
|
+
#
|
36
|
+
# # Configuring a Waiter
|
37
|
+
# Each waiter has a default polling interval and a maximum number of
|
38
|
+
# attempts it will make before returning control to your program.
|
39
|
+
# To set these values, use the `max_attempts` and `delay` parameters
|
40
|
+
# in your `#wait_until` call.
|
41
|
+
# The following example waits for up to 25 seconds, polling every five seconds.
|
42
|
+
#
|
43
|
+
# client.wait_until(...) do |w|
|
44
|
+
# w.max_attempts = 5
|
45
|
+
# w.delay = 5
|
46
|
+
# end
|
47
|
+
#
|
48
|
+
# To disable wait failures, set the value of either of these parameters
|
49
|
+
# to `nil`.
|
50
|
+
#
|
51
|
+
# # Extending a Waiter
|
52
|
+
# To modify the behavior of waiters, you can register callbacks that are
|
53
|
+
# triggered before each polling attempt and before waiting.
|
54
|
+
#
|
55
|
+
# The following example implements an exponential backoff in a waiter
|
56
|
+
# by doubling the amount of time to wait on every attempt.
|
57
|
+
#
|
58
|
+
# client.wait_until(...) do |w|
|
59
|
+
# w.interval = 0 # disable normal sleep
|
60
|
+
# w.before_wait do |n, resp|
|
61
|
+
# sleep(n ** 2)
|
62
|
+
# end
|
63
|
+
# end
|
64
|
+
#
|
65
|
+
# # Available Waiters
|
66
|
+
#
|
67
|
+
# The following table lists the valid waiter names, the operations they call,
|
68
|
+
# and the default `:delay` and `:max_attempts` values.
|
69
|
+
#
|
70
|
+
# | waiter_name | params | :delay | :max_attempts |
|
71
|
+
# | --------------------- | --------------------------- | -------- | ------------- |
|
72
|
+
# | application_deleted | {Client#get_application} | 2 | 60 |
|
73
|
+
# | application_ready | {Client#get_application} | 2 | 60 |
|
74
|
+
# | stream_group_active | {Client#get_stream_group} | 30 | 120 |
|
75
|
+
# | stream_group_deleted | {Client#get_stream_group} | 30 | 60 |
|
76
|
+
# | stream_session_active | {Client#get_stream_session} | 2 | 60 |
|
77
|
+
#
|
78
|
+
module Waiters
|
79
|
+
|
80
|
+
# Waits until an application is deleted
|
81
|
+
class ApplicationDeleted
|
82
|
+
|
83
|
+
# @param [Hash] options
|
84
|
+
# @option options [required, Client] :client
|
85
|
+
# @option options [Integer] :max_attempts (60)
|
86
|
+
# @option options [Integer] :delay (2)
|
87
|
+
# @option options [Proc] :before_attempt
|
88
|
+
# @option options [Proc] :before_wait
|
89
|
+
def initialize(options)
|
90
|
+
@client = options.fetch(:client)
|
91
|
+
@waiter = Aws::Waiters::Waiter.new({
|
92
|
+
max_attempts: 60,
|
93
|
+
delay: 2,
|
94
|
+
poller: Aws::Waiters::Poller.new(
|
95
|
+
operation_name: :get_application,
|
96
|
+
acceptors: [{
|
97
|
+
"matcher" => "error",
|
98
|
+
"state" => "success",
|
99
|
+
"expected" => "ResourceNotFoundException"
|
100
|
+
}]
|
101
|
+
)
|
102
|
+
}.merge(options))
|
103
|
+
end
|
104
|
+
|
105
|
+
# @option (see Client#get_application)
|
106
|
+
# @return (see Client#get_application)
|
107
|
+
def wait(params = {})
|
108
|
+
@waiter.wait(client: @client, params: params)
|
109
|
+
end
|
110
|
+
|
111
|
+
# @api private
|
112
|
+
attr_reader :waiter
|
113
|
+
|
114
|
+
end
|
115
|
+
|
116
|
+
# Waits until an application is ready
|
117
|
+
class ApplicationReady
|
118
|
+
|
119
|
+
# @param [Hash] options
|
120
|
+
# @option options [required, Client] :client
|
121
|
+
# @option options [Integer] :max_attempts (60)
|
122
|
+
# @option options [Integer] :delay (2)
|
123
|
+
# @option options [Proc] :before_attempt
|
124
|
+
# @option options [Proc] :before_wait
|
125
|
+
def initialize(options)
|
126
|
+
@client = options.fetch(:client)
|
127
|
+
@waiter = Aws::Waiters::Waiter.new({
|
128
|
+
max_attempts: 60,
|
129
|
+
delay: 2,
|
130
|
+
poller: Aws::Waiters::Poller.new(
|
131
|
+
operation_name: :get_application,
|
132
|
+
acceptors: [
|
133
|
+
{
|
134
|
+
"matcher" => "path",
|
135
|
+
"argument" => "status",
|
136
|
+
"state" => "success",
|
137
|
+
"expected" => "READY"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"matcher" => "path",
|
141
|
+
"argument" => "status",
|
142
|
+
"state" => "failure",
|
143
|
+
"expected" => "ERROR"
|
144
|
+
}
|
145
|
+
]
|
146
|
+
)
|
147
|
+
}.merge(options))
|
148
|
+
end
|
149
|
+
|
150
|
+
# @option (see Client#get_application)
|
151
|
+
# @return (see Client#get_application)
|
152
|
+
def wait(params = {})
|
153
|
+
@waiter.wait(client: @client, params: params)
|
154
|
+
end
|
155
|
+
|
156
|
+
# @api private
|
157
|
+
attr_reader :waiter
|
158
|
+
|
159
|
+
end
|
160
|
+
|
161
|
+
# Waits until a stream group is active
|
162
|
+
class StreamGroupActive
|
163
|
+
|
164
|
+
# @param [Hash] options
|
165
|
+
# @option options [required, Client] :client
|
166
|
+
# @option options [Integer] :max_attempts (120)
|
167
|
+
# @option options [Integer] :delay (30)
|
168
|
+
# @option options [Proc] :before_attempt
|
169
|
+
# @option options [Proc] :before_wait
|
170
|
+
def initialize(options)
|
171
|
+
@client = options.fetch(:client)
|
172
|
+
@waiter = Aws::Waiters::Waiter.new({
|
173
|
+
max_attempts: 120,
|
174
|
+
delay: 30,
|
175
|
+
poller: Aws::Waiters::Poller.new(
|
176
|
+
operation_name: :get_stream_group,
|
177
|
+
acceptors: [
|
178
|
+
{
|
179
|
+
"matcher" => "path",
|
180
|
+
"argument" => "status",
|
181
|
+
"state" => "success",
|
182
|
+
"expected" => "ACTIVE"
|
183
|
+
},
|
184
|
+
{
|
185
|
+
"matcher" => "path",
|
186
|
+
"argument" => "status",
|
187
|
+
"state" => "failure",
|
188
|
+
"expected" => "ERROR"
|
189
|
+
},
|
190
|
+
{
|
191
|
+
"matcher" => "path",
|
192
|
+
"argument" => "status",
|
193
|
+
"state" => "failure",
|
194
|
+
"expected" => "ACTIVE_WITH_ERRORS"
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"matcher" => "path",
|
198
|
+
"argument" => "status",
|
199
|
+
"state" => "failure",
|
200
|
+
"expected" => "DELETING"
|
201
|
+
}
|
202
|
+
]
|
203
|
+
)
|
204
|
+
}.merge(options))
|
205
|
+
end
|
206
|
+
|
207
|
+
# @option (see Client#get_stream_group)
|
208
|
+
# @return (see Client#get_stream_group)
|
209
|
+
def wait(params = {})
|
210
|
+
@waiter.wait(client: @client, params: params)
|
211
|
+
end
|
212
|
+
|
213
|
+
# @api private
|
214
|
+
attr_reader :waiter
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
# Waits until a stream group is deleted
|
219
|
+
class StreamGroupDeleted
|
220
|
+
|
221
|
+
# @param [Hash] options
|
222
|
+
# @option options [required, Client] :client
|
223
|
+
# @option options [Integer] :max_attempts (60)
|
224
|
+
# @option options [Integer] :delay (30)
|
225
|
+
# @option options [Proc] :before_attempt
|
226
|
+
# @option options [Proc] :before_wait
|
227
|
+
def initialize(options)
|
228
|
+
@client = options.fetch(:client)
|
229
|
+
@waiter = Aws::Waiters::Waiter.new({
|
230
|
+
max_attempts: 60,
|
231
|
+
delay: 30,
|
232
|
+
poller: Aws::Waiters::Poller.new(
|
233
|
+
operation_name: :get_stream_group,
|
234
|
+
acceptors: [{
|
235
|
+
"matcher" => "error",
|
236
|
+
"state" => "success",
|
237
|
+
"expected" => "ResourceNotFoundException"
|
238
|
+
}]
|
239
|
+
)
|
240
|
+
}.merge(options))
|
241
|
+
end
|
242
|
+
|
243
|
+
# @option (see Client#get_stream_group)
|
244
|
+
# @return (see Client#get_stream_group)
|
245
|
+
def wait(params = {})
|
246
|
+
@waiter.wait(client: @client, params: params)
|
247
|
+
end
|
248
|
+
|
249
|
+
# @api private
|
250
|
+
attr_reader :waiter
|
251
|
+
|
252
|
+
end
|
253
|
+
|
254
|
+
# Waits until a stream session is active
|
255
|
+
class StreamSessionActive
|
256
|
+
|
257
|
+
# @param [Hash] options
|
258
|
+
# @option options [required, Client] :client
|
259
|
+
# @option options [Integer] :max_attempts (60)
|
260
|
+
# @option options [Integer] :delay (2)
|
261
|
+
# @option options [Proc] :before_attempt
|
262
|
+
# @option options [Proc] :before_wait
|
263
|
+
def initialize(options)
|
264
|
+
@client = options.fetch(:client)
|
265
|
+
@waiter = Aws::Waiters::Waiter.new({
|
266
|
+
max_attempts: 60,
|
267
|
+
delay: 2,
|
268
|
+
poller: Aws::Waiters::Poller.new(
|
269
|
+
operation_name: :get_stream_session,
|
270
|
+
acceptors: [
|
271
|
+
{
|
272
|
+
"matcher" => "path",
|
273
|
+
"argument" => "status",
|
274
|
+
"state" => "success",
|
275
|
+
"expected" => "ACTIVE"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"matcher" => "path",
|
279
|
+
"argument" => "status",
|
280
|
+
"state" => "failure",
|
281
|
+
"expected" => "ERROR"
|
282
|
+
}
|
283
|
+
]
|
284
|
+
)
|
285
|
+
}.merge(options))
|
286
|
+
end
|
287
|
+
|
288
|
+
# @option (see Client#get_stream_session)
|
289
|
+
# @return (see Client#get_stream_session)
|
290
|
+
def wait(params = {})
|
291
|
+
@waiter.wait(client: @client, params: params)
|
292
|
+
end
|
293
|
+
|
294
|
+
# @api private
|
295
|
+
attr_reader :waiter
|
296
|
+
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
require 'aws-sdk-core'
|
12
|
+
require 'aws-sigv4'
|
13
|
+
|
14
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:gameliftstreams)
|
15
|
+
|
16
|
+
# This module provides support for Amazon GameLift Streams. This module is available in the
|
17
|
+
# `aws-sdk-gameliftstreams` gem.
|
18
|
+
#
|
19
|
+
# # Client
|
20
|
+
#
|
21
|
+
# The {Client} class provides one method for each API operation. Operation
|
22
|
+
# methods each accept a hash of request parameters and return a response
|
23
|
+
# structure.
|
24
|
+
#
|
25
|
+
# game_lift_streams = Aws::GameLiftStreams::Client.new
|
26
|
+
# resp = game_lift_streams.add_stream_group_locations(params)
|
27
|
+
#
|
28
|
+
# See {Client} for more information.
|
29
|
+
#
|
30
|
+
# # Errors
|
31
|
+
#
|
32
|
+
# Errors returned from Amazon GameLift Streams are defined in the
|
33
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
34
|
+
#
|
35
|
+
# begin
|
36
|
+
# # do stuff
|
37
|
+
# rescue Aws::GameLiftStreams::Errors::ServiceError
|
38
|
+
# # rescues all Amazon GameLift Streams API errors
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# See {Errors} for more information.
|
42
|
+
#
|
43
|
+
# @!group service
|
44
|
+
module Aws::GameLiftStreams
|
45
|
+
autoload :Types, 'aws-sdk-gameliftstreams/types'
|
46
|
+
autoload :ClientApi, 'aws-sdk-gameliftstreams/client_api'
|
47
|
+
module Plugins
|
48
|
+
autoload :Endpoints, 'aws-sdk-gameliftstreams/plugins/endpoints.rb'
|
49
|
+
end
|
50
|
+
autoload :Client, 'aws-sdk-gameliftstreams/client'
|
51
|
+
autoload :Errors, 'aws-sdk-gameliftstreams/errors'
|
52
|
+
autoload :Waiters, 'aws-sdk-gameliftstreams/waiters'
|
53
|
+
autoload :Resource, 'aws-sdk-gameliftstreams/resource'
|
54
|
+
autoload :EndpointParameters, 'aws-sdk-gameliftstreams/endpoint_parameters'
|
55
|
+
autoload :EndpointProvider, 'aws-sdk-gameliftstreams/endpoint_provider'
|
56
|
+
autoload :Endpoints, 'aws-sdk-gameliftstreams/endpoints'
|
57
|
+
|
58
|
+
GEM_VERSION = '1.0.0'
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
require_relative 'aws-sdk-gameliftstreams/customizations'
|