aws-sdk-lambdaweb 1.1.0 → 1.2.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.
@@ -1,385 +0,0 @@
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::LambdaWeb
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
- # | web_function_active | {Client#get_web_function} | 1 | 300 |
73
- # | web_function_deleted | {Client#get_web_function} | 1 | 300 |
74
- # | web_function_endpoint_active | {Client#get_web_function_endpoint} | 1 | 300 |
75
- # | web_function_endpoint_deleted | {Client#get_web_function_endpoint} | 1 | 300 |
76
- # | web_function_endpoint_updated | {Client#get_web_function_endpoint} | 1 | 300 |
77
- # | web_function_revision_active | {Client#get_web_function_revision} | 1 | 300 |
78
- #
79
- module Waiters
80
-
81
- # Waits for the web function's state to be Active. This should be used after new function creation.
82
- class WebFunctionActive
83
-
84
- # @param [Hash] options
85
- # @option options [required, Client] :client
86
- # @option options [Integer] :max_attempts (300)
87
- # @option options [Integer] :delay (1)
88
- # @option options [Proc] :before_attempt
89
- # @option options [Proc] :before_wait
90
- def initialize(options)
91
- @client = options.fetch(:client)
92
- @waiter = Aws::Waiters::Waiter.new({
93
- max_attempts: 300,
94
- delay: 1,
95
- poller: Aws::Waiters::Poller.new(
96
- operation_name: :get_web_function,
97
- acceptors: [
98
- {
99
- "matcher" => "path",
100
- "argument" => "state",
101
- "state" => "success",
102
- "expected" => "Active"
103
- },
104
- {
105
- "matcher" => "path",
106
- "argument" => "state",
107
- "state" => "failure",
108
- "expected" => "Failed"
109
- },
110
- {
111
- "matcher" => "path",
112
- "argument" => "state",
113
- "state" => "failure",
114
- "expected" => "Deleting"
115
- },
116
- {
117
- "matcher" => "path",
118
- "argument" => "state",
119
- "state" => "retry",
120
- "expected" => "Pending"
121
- }
122
- ]
123
- )
124
- }.merge(options))
125
- end
126
-
127
- # @option (see Client#get_web_function)
128
- # @return (see Client#get_web_function)
129
- def wait(params = {})
130
- @waiter.wait(client: @client, params: params)
131
- end
132
-
133
- # @api private
134
- attr_reader :waiter
135
-
136
- end
137
-
138
- # Waits for the web function to be deleted. This should be used after function deletion.
139
- class WebFunctionDeleted
140
-
141
- # @param [Hash] options
142
- # @option options [required, Client] :client
143
- # @option options [Integer] :max_attempts (300)
144
- # @option options [Integer] :delay (1)
145
- # @option options [Proc] :before_attempt
146
- # @option options [Proc] :before_wait
147
- def initialize(options)
148
- @client = options.fetch(:client)
149
- @waiter = Aws::Waiters::Waiter.new({
150
- max_attempts: 300,
151
- delay: 1,
152
- poller: Aws::Waiters::Poller.new(
153
- operation_name: :get_web_function,
154
- acceptors: [
155
- {
156
- "matcher" => "error",
157
- "state" => "success",
158
- "expected" => "ResourceNotFoundException"
159
- },
160
- {
161
- "matcher" => "path",
162
- "argument" => "state",
163
- "state" => "retry",
164
- "expected" => "Deleting"
165
- }
166
- ]
167
- )
168
- }.merge(options))
169
- end
170
-
171
- # @option (see Client#get_web_function)
172
- # @return (see Client#get_web_function)
173
- def wait(params = {})
174
- @waiter.wait(client: @client, params: params)
175
- end
176
-
177
- # @api private
178
- attr_reader :waiter
179
-
180
- end
181
-
182
- # Waits for the web function endpoint's state to be Active. This should be used after new endpoint creation.
183
- class WebFunctionEndpointActive
184
-
185
- # @param [Hash] options
186
- # @option options [required, Client] :client
187
- # @option options [Integer] :max_attempts (300)
188
- # @option options [Integer] :delay (1)
189
- # @option options [Proc] :before_attempt
190
- # @option options [Proc] :before_wait
191
- def initialize(options)
192
- @client = options.fetch(:client)
193
- @waiter = Aws::Waiters::Waiter.new({
194
- max_attempts: 300,
195
- delay: 1,
196
- poller: Aws::Waiters::Poller.new(
197
- operation_name: :get_web_function_endpoint,
198
- acceptors: [
199
- {
200
- "matcher" => "path",
201
- "argument" => "state",
202
- "state" => "success",
203
- "expected" => "Active"
204
- },
205
- {
206
- "matcher" => "path",
207
- "argument" => "state",
208
- "state" => "failure",
209
- "expected" => "Failed"
210
- },
211
- {
212
- "matcher" => "path",
213
- "argument" => "state",
214
- "state" => "failure",
215
- "expected" => "Deleting"
216
- },
217
- {
218
- "matcher" => "path",
219
- "argument" => "state",
220
- "state" => "retry",
221
- "expected" => "Pending"
222
- }
223
- ]
224
- )
225
- }.merge(options))
226
- end
227
-
228
- # @option (see Client#get_web_function_endpoint)
229
- # @return (see Client#get_web_function_endpoint)
230
- def wait(params = {})
231
- @waiter.wait(client: @client, params: params)
232
- end
233
-
234
- # @api private
235
- attr_reader :waiter
236
-
237
- end
238
-
239
- # Waits for the web function endpoint to be deleted. This should be used after endpoint deletion.
240
- class WebFunctionEndpointDeleted
241
-
242
- # @param [Hash] options
243
- # @option options [required, Client] :client
244
- # @option options [Integer] :max_attempts (300)
245
- # @option options [Integer] :delay (1)
246
- # @option options [Proc] :before_attempt
247
- # @option options [Proc] :before_wait
248
- def initialize(options)
249
- @client = options.fetch(:client)
250
- @waiter = Aws::Waiters::Waiter.new({
251
- max_attempts: 300,
252
- delay: 1,
253
- poller: Aws::Waiters::Poller.new(
254
- operation_name: :get_web_function_endpoint,
255
- acceptors: [
256
- {
257
- "matcher" => "error",
258
- "state" => "success",
259
- "expected" => "ResourceNotFoundException"
260
- },
261
- {
262
- "matcher" => "path",
263
- "argument" => "state",
264
- "state" => "retry",
265
- "expected" => "Deleting"
266
- }
267
- ]
268
- )
269
- }.merge(options))
270
- end
271
-
272
- # @option (see Client#get_web_function_endpoint)
273
- # @return (see Client#get_web_function_endpoint)
274
- def wait(params = {})
275
- @waiter.wait(client: @client, params: params)
276
- end
277
-
278
- # @api private
279
- attr_reader :waiter
280
-
281
- end
282
-
283
- # Waits for the web function endpoint's update status to be Successful. This should be used after endpoint updates.
284
- class WebFunctionEndpointUpdated
285
-
286
- # @param [Hash] options
287
- # @option options [required, Client] :client
288
- # @option options [Integer] :max_attempts (300)
289
- # @option options [Integer] :delay (1)
290
- # @option options [Proc] :before_attempt
291
- # @option options [Proc] :before_wait
292
- def initialize(options)
293
- @client = options.fetch(:client)
294
- @waiter = Aws::Waiters::Waiter.new({
295
- max_attempts: 300,
296
- delay: 1,
297
- poller: Aws::Waiters::Poller.new(
298
- operation_name: :get_web_function_endpoint,
299
- acceptors: [
300
- {
301
- "matcher" => "path",
302
- "argument" => "update_status",
303
- "state" => "success",
304
- "expected" => "Successful"
305
- },
306
- {
307
- "matcher" => "path",
308
- "argument" => "update_status",
309
- "state" => "failure",
310
- "expected" => "Failed"
311
- },
312
- {
313
- "matcher" => "path",
314
- "argument" => "update_status",
315
- "state" => "retry",
316
- "expected" => "InProgress"
317
- }
318
- ]
319
- )
320
- }.merge(options))
321
- end
322
-
323
- # @option (see Client#get_web_function_endpoint)
324
- # @return (see Client#get_web_function_endpoint)
325
- def wait(params = {})
326
- @waiter.wait(client: @client, params: params)
327
- end
328
-
329
- # @api private
330
- attr_reader :waiter
331
-
332
- end
333
-
334
- # Waits for the web function revision's state to be Active. This should be used after new revision creation.
335
- class WebFunctionRevisionActive
336
-
337
- # @param [Hash] options
338
- # @option options [required, Client] :client
339
- # @option options [Integer] :max_attempts (300)
340
- # @option options [Integer] :delay (1)
341
- # @option options [Proc] :before_attempt
342
- # @option options [Proc] :before_wait
343
- def initialize(options)
344
- @client = options.fetch(:client)
345
- @waiter = Aws::Waiters::Waiter.new({
346
- max_attempts: 300,
347
- delay: 1,
348
- poller: Aws::Waiters::Poller.new(
349
- operation_name: :get_web_function_revision,
350
- acceptors: [
351
- {
352
- "matcher" => "path",
353
- "argument" => "state",
354
- "state" => "success",
355
- "expected" => "Active"
356
- },
357
- {
358
- "matcher" => "path",
359
- "argument" => "state",
360
- "state" => "failure",
361
- "expected" => "Failed"
362
- },
363
- {
364
- "matcher" => "path",
365
- "argument" => "state",
366
- "state" => "retry",
367
- "expected" => "Pending"
368
- }
369
- ]
370
- )
371
- }.merge(options))
372
- end
373
-
374
- # @option (see Client#get_web_function_revision)
375
- # @return (see Client#get_web_function_revision)
376
- def wait(params = {})
377
- @waiter.wait(client: @client, params: params)
378
- end
379
-
380
- # @api private
381
- attr_reader :waiter
382
-
383
- end
384
- end
385
- end
data/sig/waiters.rbs DELETED
@@ -1,77 +0,0 @@
1
- # WARNING ABOUT GENERATED CODE
2
- #
3
- # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
- #
6
- # WARNING ABOUT GENERATED CODE
7
-
8
- module Aws
9
- module LambdaWeb
10
- module Waiters
11
-
12
- class WebFunctionActive
13
- def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
14
- | (?Hash[Symbol, untyped]) -> void
15
-
16
- def wait: (
17
- function_name: ::String
18
- ) -> Client::_GetWebFunctionResponseSuccess
19
- | (Hash[Symbol, untyped]) -> Client::_GetWebFunctionResponseSuccess
20
- end
21
-
22
- class WebFunctionDeleted
23
- def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
24
- | (?Hash[Symbol, untyped]) -> void
25
-
26
- def wait: (
27
- function_name: ::String
28
- ) -> Client::_GetWebFunctionResponseSuccess
29
- | (Hash[Symbol, untyped]) -> Client::_GetWebFunctionResponseSuccess
30
- end
31
-
32
- class WebFunctionEndpointActive
33
- def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
34
- | (?Hash[Symbol, untyped]) -> void
35
-
36
- def wait: (
37
- function_name: ::String,
38
- endpoint_name: ::String
39
- ) -> Client::_GetWebFunctionEndpointResponseSuccess
40
- | (Hash[Symbol, untyped]) -> Client::_GetWebFunctionEndpointResponseSuccess
41
- end
42
-
43
- class WebFunctionEndpointDeleted
44
- def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
45
- | (?Hash[Symbol, untyped]) -> void
46
-
47
- def wait: (
48
- function_name: ::String,
49
- endpoint_name: ::String
50
- ) -> Client::_GetWebFunctionEndpointResponseSuccess
51
- | (Hash[Symbol, untyped]) -> Client::_GetWebFunctionEndpointResponseSuccess
52
- end
53
-
54
- class WebFunctionEndpointUpdated
55
- def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
56
- | (?Hash[Symbol, untyped]) -> void
57
-
58
- def wait: (
59
- function_name: ::String,
60
- endpoint_name: ::String
61
- ) -> Client::_GetWebFunctionEndpointResponseSuccess
62
- | (Hash[Symbol, untyped]) -> Client::_GetWebFunctionEndpointResponseSuccess
63
- end
64
-
65
- class WebFunctionRevisionActive
66
- def initialize: (?client: Client, ?max_attempts: Integer, ?delay: Integer, ?before_attempt: Proc, ?before_wait: Proc) -> void
67
- | (?Hash[Symbol, untyped]) -> void
68
-
69
- def wait: (
70
- function_name: ::String,
71
- revision_id: ::String
72
- ) -> Client::_GetWebFunctionRevisionResponseSuccess
73
- | (Hash[Symbol, untyped]) -> Client::_GetWebFunctionRevisionResponseSuccess
74
- end
75
- end
76
- end
77
- end