aws-sdk-rtbfabric 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.
@@ -0,0 +1,507 @@
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::RTBFabric
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
+ # | inbound_external_link_active | {Client#get_inbound_external_link} | 30 | 5 |
73
+ # | link_accepted | {Client#get_link} | 30 | 5 |
74
+ # | link_active | {Client#get_link} | 30 | 5 |
75
+ # | outbound_external_link_active | {Client#get_outbound_external_link} | 30 | 5 |
76
+ # | requester_gateway_active | {Client#get_requester_gateway} | 30 | 5 |
77
+ # | requester_gateway_deleted | {Client#get_requester_gateway} | 30 | 5 |
78
+ # | responder_gateway_active | {Client#get_responder_gateway} | 30 | 5 |
79
+ # | responder_gateway_deleted | {Client#get_responder_gateway} | 30 | 5 |
80
+ #
81
+ module Waiters
82
+
83
+ class InboundExternalLinkActive
84
+
85
+ # @param [Hash] options
86
+ # @option options [required, Client] :client
87
+ # @option options [Integer] :max_attempts (5)
88
+ # @option options [Integer] :delay (30)
89
+ # @option options [Proc] :before_attempt
90
+ # @option options [Proc] :before_wait
91
+ def initialize(options)
92
+ @client = options.fetch(:client)
93
+ @waiter = Aws::Waiters::Waiter.new({
94
+ max_attempts: 5,
95
+ delay: 30,
96
+ poller: Aws::Waiters::Poller.new(
97
+ operation_name: :get_inbound_external_link,
98
+ acceptors: [
99
+ {
100
+ "matcher" => "path",
101
+ "argument" => "status",
102
+ "state" => "success",
103
+ "expected" => "ACTIVE"
104
+ },
105
+ {
106
+ "matcher" => "path",
107
+ "argument" => "status",
108
+ "state" => "failure",
109
+ "expected" => "REJECTED"
110
+ },
111
+ {
112
+ "matcher" => "path",
113
+ "argument" => "status",
114
+ "state" => "failure",
115
+ "expected" => "FAILED"
116
+ },
117
+ {
118
+ "matcher" => "path",
119
+ "argument" => "status",
120
+ "state" => "failure",
121
+ "expected" => "DELETED"
122
+ },
123
+ {
124
+ "matcher" => "path",
125
+ "argument" => "status",
126
+ "state" => "failure",
127
+ "expected" => "ISOLATED"
128
+ }
129
+ ]
130
+ )
131
+ }.merge(options))
132
+ end
133
+
134
+ # @option (see Client#get_inbound_external_link)
135
+ # @return (see Client#get_inbound_external_link)
136
+ def wait(params = {})
137
+ @waiter.wait(client: @client, params: params)
138
+ end
139
+
140
+ # @api private
141
+ attr_reader :waiter
142
+
143
+ end
144
+
145
+ class LinkAccepted
146
+
147
+ # @param [Hash] options
148
+ # @option options [required, Client] :client
149
+ # @option options [Integer] :max_attempts (5)
150
+ # @option options [Integer] :delay (30)
151
+ # @option options [Proc] :before_attempt
152
+ # @option options [Proc] :before_wait
153
+ def initialize(options)
154
+ @client = options.fetch(:client)
155
+ @waiter = Aws::Waiters::Waiter.new({
156
+ max_attempts: 5,
157
+ delay: 30,
158
+ poller: Aws::Waiters::Poller.new(
159
+ operation_name: :get_link,
160
+ acceptors: [
161
+ {
162
+ "matcher" => "path",
163
+ "argument" => "status",
164
+ "state" => "success",
165
+ "expected" => "ACCEPTED"
166
+ },
167
+ {
168
+ "matcher" => "path",
169
+ "argument" => "status",
170
+ "state" => "failure",
171
+ "expected" => "REJECTED"
172
+ },
173
+ {
174
+ "matcher" => "path",
175
+ "argument" => "status",
176
+ "state" => "failure",
177
+ "expected" => "FAILED"
178
+ },
179
+ {
180
+ "matcher" => "path",
181
+ "argument" => "status",
182
+ "state" => "failure",
183
+ "expected" => "DELETED"
184
+ }
185
+ ]
186
+ )
187
+ }.merge(options))
188
+ end
189
+
190
+ # @option (see Client#get_link)
191
+ # @return (see Client#get_link)
192
+ def wait(params = {})
193
+ @waiter.wait(client: @client, params: params)
194
+ end
195
+
196
+ # @api private
197
+ attr_reader :waiter
198
+
199
+ end
200
+
201
+ class LinkActive
202
+
203
+ # @param [Hash] options
204
+ # @option options [required, Client] :client
205
+ # @option options [Integer] :max_attempts (5)
206
+ # @option options [Integer] :delay (30)
207
+ # @option options [Proc] :before_attempt
208
+ # @option options [Proc] :before_wait
209
+ def initialize(options)
210
+ @client = options.fetch(:client)
211
+ @waiter = Aws::Waiters::Waiter.new({
212
+ max_attempts: 5,
213
+ delay: 30,
214
+ poller: Aws::Waiters::Poller.new(
215
+ operation_name: :get_link,
216
+ acceptors: [
217
+ {
218
+ "matcher" => "path",
219
+ "argument" => "status",
220
+ "state" => "success",
221
+ "expected" => "ACTIVE"
222
+ },
223
+ {
224
+ "matcher" => "path",
225
+ "argument" => "status",
226
+ "state" => "failure",
227
+ "expected" => "REJECTED"
228
+ },
229
+ {
230
+ "matcher" => "path",
231
+ "argument" => "status",
232
+ "state" => "failure",
233
+ "expected" => "FAILED"
234
+ },
235
+ {
236
+ "matcher" => "path",
237
+ "argument" => "status",
238
+ "state" => "failure",
239
+ "expected" => "DELETED"
240
+ }
241
+ ]
242
+ )
243
+ }.merge(options))
244
+ end
245
+
246
+ # @option (see Client#get_link)
247
+ # @return (see Client#get_link)
248
+ def wait(params = {})
249
+ @waiter.wait(client: @client, params: params)
250
+ end
251
+
252
+ # @api private
253
+ attr_reader :waiter
254
+
255
+ end
256
+
257
+ class OutboundExternalLinkActive
258
+
259
+ # @param [Hash] options
260
+ # @option options [required, Client] :client
261
+ # @option options [Integer] :max_attempts (5)
262
+ # @option options [Integer] :delay (30)
263
+ # @option options [Proc] :before_attempt
264
+ # @option options [Proc] :before_wait
265
+ def initialize(options)
266
+ @client = options.fetch(:client)
267
+ @waiter = Aws::Waiters::Waiter.new({
268
+ max_attempts: 5,
269
+ delay: 30,
270
+ poller: Aws::Waiters::Poller.new(
271
+ operation_name: :get_outbound_external_link,
272
+ acceptors: [
273
+ {
274
+ "matcher" => "path",
275
+ "argument" => "status",
276
+ "state" => "success",
277
+ "expected" => "ACTIVE"
278
+ },
279
+ {
280
+ "matcher" => "path",
281
+ "argument" => "status",
282
+ "state" => "failure",
283
+ "expected" => "REJECTED"
284
+ },
285
+ {
286
+ "matcher" => "path",
287
+ "argument" => "status",
288
+ "state" => "failure",
289
+ "expected" => "FAILED"
290
+ },
291
+ {
292
+ "matcher" => "path",
293
+ "argument" => "status",
294
+ "state" => "failure",
295
+ "expected" => "DELETED"
296
+ },
297
+ {
298
+ "matcher" => "path",
299
+ "argument" => "status",
300
+ "state" => "failure",
301
+ "expected" => "ISOLATED"
302
+ }
303
+ ]
304
+ )
305
+ }.merge(options))
306
+ end
307
+
308
+ # @option (see Client#get_outbound_external_link)
309
+ # @return (see Client#get_outbound_external_link)
310
+ def wait(params = {})
311
+ @waiter.wait(client: @client, params: params)
312
+ end
313
+
314
+ # @api private
315
+ attr_reader :waiter
316
+
317
+ end
318
+
319
+ class RequesterGatewayActive
320
+
321
+ # @param [Hash] options
322
+ # @option options [required, Client] :client
323
+ # @option options [Integer] :max_attempts (5)
324
+ # @option options [Integer] :delay (30)
325
+ # @option options [Proc] :before_attempt
326
+ # @option options [Proc] :before_wait
327
+ def initialize(options)
328
+ @client = options.fetch(:client)
329
+ @waiter = Aws::Waiters::Waiter.new({
330
+ max_attempts: 5,
331
+ delay: 30,
332
+ poller: Aws::Waiters::Poller.new(
333
+ operation_name: :get_requester_gateway,
334
+ acceptors: [
335
+ {
336
+ "matcher" => "path",
337
+ "argument" => "status",
338
+ "state" => "success",
339
+ "expected" => "ACTIVE"
340
+ },
341
+ {
342
+ "matcher" => "path",
343
+ "argument" => "status",
344
+ "state" => "failure",
345
+ "expected" => "DELETED"
346
+ },
347
+ {
348
+ "matcher" => "path",
349
+ "argument" => "status",
350
+ "state" => "failure",
351
+ "expected" => "ERROR"
352
+ }
353
+ ]
354
+ )
355
+ }.merge(options))
356
+ end
357
+
358
+ # @option (see Client#get_requester_gateway)
359
+ # @return (see Client#get_requester_gateway)
360
+ def wait(params = {})
361
+ @waiter.wait(client: @client, params: params)
362
+ end
363
+
364
+ # @api private
365
+ attr_reader :waiter
366
+
367
+ end
368
+
369
+ class RequesterGatewayDeleted
370
+
371
+ # @param [Hash] options
372
+ # @option options [required, Client] :client
373
+ # @option options [Integer] :max_attempts (5)
374
+ # @option options [Integer] :delay (30)
375
+ # @option options [Proc] :before_attempt
376
+ # @option options [Proc] :before_wait
377
+ def initialize(options)
378
+ @client = options.fetch(:client)
379
+ @waiter = Aws::Waiters::Waiter.new({
380
+ max_attempts: 5,
381
+ delay: 30,
382
+ poller: Aws::Waiters::Poller.new(
383
+ operation_name: :get_requester_gateway,
384
+ acceptors: [
385
+ {
386
+ "matcher" => "path",
387
+ "argument" => "status",
388
+ "state" => "success",
389
+ "expected" => "DELETED"
390
+ },
391
+ {
392
+ "matcher" => "path",
393
+ "argument" => "status",
394
+ "state" => "failure",
395
+ "expected" => "ERROR"
396
+ }
397
+ ]
398
+ )
399
+ }.merge(options))
400
+ end
401
+
402
+ # @option (see Client#get_requester_gateway)
403
+ # @return (see Client#get_requester_gateway)
404
+ def wait(params = {})
405
+ @waiter.wait(client: @client, params: params)
406
+ end
407
+
408
+ # @api private
409
+ attr_reader :waiter
410
+
411
+ end
412
+
413
+ class ResponderGatewayActive
414
+
415
+ # @param [Hash] options
416
+ # @option options [required, Client] :client
417
+ # @option options [Integer] :max_attempts (5)
418
+ # @option options [Integer] :delay (30)
419
+ # @option options [Proc] :before_attempt
420
+ # @option options [Proc] :before_wait
421
+ def initialize(options)
422
+ @client = options.fetch(:client)
423
+ @waiter = Aws::Waiters::Waiter.new({
424
+ max_attempts: 5,
425
+ delay: 30,
426
+ poller: Aws::Waiters::Poller.new(
427
+ operation_name: :get_responder_gateway,
428
+ acceptors: [
429
+ {
430
+ "matcher" => "path",
431
+ "argument" => "status",
432
+ "state" => "success",
433
+ "expected" => "ACTIVE"
434
+ },
435
+ {
436
+ "matcher" => "path",
437
+ "argument" => "status",
438
+ "state" => "failure",
439
+ "expected" => "DELETED"
440
+ },
441
+ {
442
+ "matcher" => "path",
443
+ "argument" => "status",
444
+ "state" => "failure",
445
+ "expected" => "ERROR"
446
+ }
447
+ ]
448
+ )
449
+ }.merge(options))
450
+ end
451
+
452
+ # @option (see Client#get_responder_gateway)
453
+ # @return (see Client#get_responder_gateway)
454
+ def wait(params = {})
455
+ @waiter.wait(client: @client, params: params)
456
+ end
457
+
458
+ # @api private
459
+ attr_reader :waiter
460
+
461
+ end
462
+
463
+ class ResponderGatewayDeleted
464
+
465
+ # @param [Hash] options
466
+ # @option options [required, Client] :client
467
+ # @option options [Integer] :max_attempts (5)
468
+ # @option options [Integer] :delay (30)
469
+ # @option options [Proc] :before_attempt
470
+ # @option options [Proc] :before_wait
471
+ def initialize(options)
472
+ @client = options.fetch(:client)
473
+ @waiter = Aws::Waiters::Waiter.new({
474
+ max_attempts: 5,
475
+ delay: 30,
476
+ poller: Aws::Waiters::Poller.new(
477
+ operation_name: :get_responder_gateway,
478
+ acceptors: [
479
+ {
480
+ "matcher" => "path",
481
+ "argument" => "status",
482
+ "state" => "success",
483
+ "expected" => "DELETED"
484
+ },
485
+ {
486
+ "matcher" => "path",
487
+ "argument" => "status",
488
+ "state" => "failure",
489
+ "expected" => "ERROR"
490
+ }
491
+ ]
492
+ )
493
+ }.merge(options))
494
+ end
495
+
496
+ # @option (see Client#get_responder_gateway)
497
+ # @return (see Client#get_responder_gateway)
498
+ def wait(params = {})
499
+ @waiter.wait(client: @client, params: params)
500
+ end
501
+
502
+ # @api private
503
+ attr_reader :waiter
504
+
505
+ end
506
+ end
507
+ 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(:rtbfabric)
15
+
16
+ # This module provides support for RTBFabric. This module is available in the
17
+ # `aws-sdk-rtbfabric` 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
+ # rtb_fabric = Aws::RTBFabric::Client.new
26
+ # resp = rtb_fabric.accept_link(params)
27
+ #
28
+ # See {Client} for more information.
29
+ #
30
+ # # Errors
31
+ #
32
+ # Errors returned from RTBFabric are defined in the
33
+ # {Errors} module and all extend {Errors::ServiceError}.
34
+ #
35
+ # begin
36
+ # # do stuff
37
+ # rescue Aws::RTBFabric::Errors::ServiceError
38
+ # # rescues all RTBFabric API errors
39
+ # end
40
+ #
41
+ # See {Errors} for more information.
42
+ #
43
+ # @!group service
44
+ module Aws::RTBFabric
45
+ autoload :Types, 'aws-sdk-rtbfabric/types'
46
+ autoload :ClientApi, 'aws-sdk-rtbfabric/client_api'
47
+ module Plugins
48
+ autoload :Endpoints, 'aws-sdk-rtbfabric/plugins/endpoints.rb'
49
+ end
50
+ autoload :Client, 'aws-sdk-rtbfabric/client'
51
+ autoload :Errors, 'aws-sdk-rtbfabric/errors'
52
+ autoload :Waiters, 'aws-sdk-rtbfabric/waiters'
53
+ autoload :Resource, 'aws-sdk-rtbfabric/resource'
54
+ autoload :EndpointParameters, 'aws-sdk-rtbfabric/endpoint_parameters'
55
+ autoload :EndpointProvider, 'aws-sdk-rtbfabric/endpoint_provider'
56
+ autoload :Endpoints, 'aws-sdk-rtbfabric/endpoints'
57
+
58
+ GEM_VERSION = '1.0.0'
59
+
60
+ end
61
+
62
+ require_relative 'aws-sdk-rtbfabric/customizations'