aws-sdk-sagemaker 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,567 @@
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/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core/waiters'
9
+
10
+ module Aws::SageMaker
11
+ module Waiters
12
+
13
+ class Endpoint_Created
14
+
15
+ # @param [Hash] options
16
+ # @option options [required, Client] :client
17
+ # @option options [Integer] :max_attempts (120)
18
+ # @option options [Integer] :delay (120)
19
+ # @option options [Proc] :before_attempt
20
+ # @option options [Proc] :before_wait
21
+ def initialize(options)
22
+ @client = options.fetch(:client)
23
+ @waiter = Aws::Waiters::Waiter.new({
24
+ max_attempts: 120,
25
+ delay: 120,
26
+ poller: Aws::Waiters::Poller.new(
27
+ operation_name: :describe_endpoint,
28
+ acceptors: [
29
+ {
30
+ "expected" => "InService",
31
+ "matcher" => "path",
32
+ "state" => "success",
33
+ "argument" => "endpoint_status"
34
+ },
35
+ {
36
+ "expected" => "Creating",
37
+ "matcher" => "path",
38
+ "state" => "retry",
39
+ "argument" => "endpoint_status"
40
+ },
41
+ {
42
+ "expected" => "Failed",
43
+ "matcher" => "path",
44
+ "state" => "failure",
45
+ "argument" => "endpoint_status"
46
+ },
47
+ {
48
+ "expected" => "ThrottlingException",
49
+ "matcher" => "error",
50
+ "state" => "retry"
51
+ },
52
+ {
53
+ "expected" => "ValidationException",
54
+ "matcher" => "error",
55
+ "state" => "failure"
56
+ }
57
+ ]
58
+ )
59
+ }.merge(options))
60
+ end
61
+
62
+ # @option (see Client#describe_endpoint)
63
+ # @return (see Client#describe_endpoint)
64
+ def wait(params = {})
65
+ @waiter.wait(client: @client, params: params)
66
+ end
67
+
68
+ # @api private
69
+ attr_reader :waiter
70
+
71
+ end
72
+
73
+ class Endpoint_Deleted
74
+
75
+ # @param [Hash] options
76
+ # @option options [required, Client] :client
77
+ # @option options [Integer] :max_attempts (120)
78
+ # @option options [Integer] :delay (120)
79
+ # @option options [Proc] :before_attempt
80
+ # @option options [Proc] :before_wait
81
+ def initialize(options)
82
+ @client = options.fetch(:client)
83
+ @waiter = Aws::Waiters::Waiter.new({
84
+ max_attempts: 120,
85
+ delay: 120,
86
+ poller: Aws::Waiters::Poller.new(
87
+ operation_name: :describe_endpoint,
88
+ acceptors: [
89
+ {
90
+ "expected" => "ValidationException",
91
+ "matcher" => "error",
92
+ "state" => "success"
93
+ },
94
+ {
95
+ "expected" => "Deleting",
96
+ "matcher" => "path",
97
+ "state" => "retry",
98
+ "argument" => "endpoint_status"
99
+ },
100
+ {
101
+ "expected" => "Failed",
102
+ "matcher" => "path",
103
+ "state" => "failure",
104
+ "argument" => "endpoint_status"
105
+ },
106
+ {
107
+ "expected" => "ThrottlingException",
108
+ "matcher" => "error",
109
+ "state" => "retry"
110
+ }
111
+ ]
112
+ )
113
+ }.merge(options))
114
+ end
115
+
116
+ # @option (see Client#describe_endpoint)
117
+ # @return (see Client#describe_endpoint)
118
+ def wait(params = {})
119
+ @waiter.wait(client: @client, params: params)
120
+ end
121
+
122
+ # @api private
123
+ attr_reader :waiter
124
+
125
+ end
126
+
127
+ class Endpoint_Updated
128
+
129
+ # @param [Hash] options
130
+ # @option options [required, Client] :client
131
+ # @option options [Integer] :max_attempts (120)
132
+ # @option options [Integer] :delay (120)
133
+ # @option options [Proc] :before_attempt
134
+ # @option options [Proc] :before_wait
135
+ def initialize(options)
136
+ @client = options.fetch(:client)
137
+ @waiter = Aws::Waiters::Waiter.new({
138
+ max_attempts: 120,
139
+ delay: 120,
140
+ poller: Aws::Waiters::Poller.new(
141
+ operation_name: :describe_endpoint,
142
+ acceptors: [
143
+ {
144
+ "expected" => "200",
145
+ "matcher" => "path",
146
+ "state" => "success",
147
+ "argument" => "endpoint_name"
148
+ },
149
+ {
150
+ "expected" => "Updating",
151
+ "matcher" => "path",
152
+ "state" => "retry",
153
+ "argument" => "endpoint_status"
154
+ },
155
+ {
156
+ "expected" => "RollingBack",
157
+ "matcher" => "path",
158
+ "state" => "retry",
159
+ "argument" => "endpoint_status"
160
+ },
161
+ {
162
+ "expected" => "Failed",
163
+ "matcher" => "path",
164
+ "state" => "failure",
165
+ "argument" => "endpoint_status"
166
+ },
167
+ {
168
+ "expected" => "ThrottlingException",
169
+ "matcher" => "error",
170
+ "state" => "retry"
171
+ },
172
+ {
173
+ "expected" => "ValidationException",
174
+ "matcher" => "error",
175
+ "state" => "retry"
176
+ }
177
+ ]
178
+ )
179
+ }.merge(options))
180
+ end
181
+
182
+ # @option (see Client#describe_endpoint)
183
+ # @return (see Client#describe_endpoint)
184
+ def wait(params = {})
185
+ @waiter.wait(client: @client, params: params)
186
+ end
187
+
188
+ # @api private
189
+ attr_reader :waiter
190
+
191
+ end
192
+
193
+ class NotebookInstance_Deleted
194
+
195
+ # @param [Hash] options
196
+ # @option options [required, Client] :client
197
+ # @option options [Integer] :max_attempts (120)
198
+ # @option options [Integer] :delay (120)
199
+ # @option options [Proc] :before_attempt
200
+ # @option options [Proc] :before_wait
201
+ def initialize(options)
202
+ @client = options.fetch(:client)
203
+ @waiter = Aws::Waiters::Waiter.new({
204
+ max_attempts: 120,
205
+ delay: 120,
206
+ poller: Aws::Waiters::Poller.new(
207
+ operation_name: :describe_notebook_instance,
208
+ acceptors: [
209
+ {
210
+ "expected" => "ValidationException",
211
+ "matcher" => "error",
212
+ "state" => "success"
213
+ },
214
+ {
215
+ "expected" => "Deleting",
216
+ "matcher" => "path",
217
+ "state" => "retry",
218
+ "argument" => "notebook_instance_status"
219
+ },
220
+ {
221
+ "expected" => "ThrottlingException",
222
+ "matcher" => "error",
223
+ "state" => "retry"
224
+ },
225
+ {
226
+ "expected" => "Failed",
227
+ "matcher" => "path",
228
+ "state" => "failure",
229
+ "argument" => "notebook_instance_status"
230
+ }
231
+ ]
232
+ )
233
+ }.merge(options))
234
+ end
235
+
236
+ # @option (see Client#describe_notebook_instance)
237
+ # @return (see Client#describe_notebook_instance)
238
+ def wait(params = {})
239
+ @waiter.wait(client: @client, params: params)
240
+ end
241
+
242
+ # @api private
243
+ attr_reader :waiter
244
+
245
+ end
246
+
247
+ class NotebookInstance_Running
248
+
249
+ # @param [Hash] options
250
+ # @option options [required, Client] :client
251
+ # @option options [Integer] :max_attempts (120)
252
+ # @option options [Integer] :delay (120)
253
+ # @option options [Proc] :before_attempt
254
+ # @option options [Proc] :before_wait
255
+ def initialize(options)
256
+ @client = options.fetch(:client)
257
+ @waiter = Aws::Waiters::Waiter.new({
258
+ max_attempts: 120,
259
+ delay: 120,
260
+ poller: Aws::Waiters::Poller.new(
261
+ operation_name: :describe_notebook_instance,
262
+ acceptors: [
263
+ {
264
+ "expected" => "InService",
265
+ "matcher" => "path",
266
+ "state" => "success",
267
+ "argument" => "notebook_instance_status"
268
+ },
269
+ {
270
+ "expected" => "ThrottlingException",
271
+ "matcher" => "error",
272
+ "state" => "retry"
273
+ },
274
+ {
275
+ "expected" => "Failed",
276
+ "matcher" => "path",
277
+ "state" => "failure",
278
+ "argument" => "notebook_instance_status"
279
+ },
280
+ {
281
+ "expected" => "Stopped",
282
+ "matcher" => "path",
283
+ "state" => "failure",
284
+ "argument" => "notebook_instance_status"
285
+ },
286
+ {
287
+ "expected" => "Stopping",
288
+ "matcher" => "path",
289
+ "state" => "failure",
290
+ "argument" => "notebook_instance_status"
291
+ }
292
+ ]
293
+ )
294
+ }.merge(options))
295
+ end
296
+
297
+ # @option (see Client#describe_notebook_instance)
298
+ # @return (see Client#describe_notebook_instance)
299
+ def wait(params = {})
300
+ @waiter.wait(client: @client, params: params)
301
+ end
302
+
303
+ # @api private
304
+ attr_reader :waiter
305
+
306
+ end
307
+
308
+ class NotebookInstance_Stopped
309
+
310
+ # @param [Hash] options
311
+ # @option options [required, Client] :client
312
+ # @option options [Integer] :max_attempts (120)
313
+ # @option options [Integer] :delay (120)
314
+ # @option options [Proc] :before_attempt
315
+ # @option options [Proc] :before_wait
316
+ def initialize(options)
317
+ @client = options.fetch(:client)
318
+ @waiter = Aws::Waiters::Waiter.new({
319
+ max_attempts: 120,
320
+ delay: 120,
321
+ poller: Aws::Waiters::Poller.new(
322
+ operation_name: :describe_notebook_instance,
323
+ acceptors: [
324
+ {
325
+ "expected" => "Stopped",
326
+ "matcher" => "path",
327
+ "state" => "success",
328
+ "argument" => "notebook_instance_status"
329
+ },
330
+ {
331
+ "expected" => "Stopping",
332
+ "matcher" => "path",
333
+ "state" => "retry",
334
+ "argument" => "notebook_instance_status"
335
+ },
336
+ {
337
+ "expected" => "ThrottlingException",
338
+ "matcher" => "error",
339
+ "state" => "retry"
340
+ },
341
+ {
342
+ "expected" => "Failed",
343
+ "matcher" => "path",
344
+ "state" => "failure",
345
+ "argument" => "notebook_instance_status"
346
+ }
347
+ ]
348
+ )
349
+ }.merge(options))
350
+ end
351
+
352
+ # @option (see Client#describe_notebook_instance)
353
+ # @return (see Client#describe_notebook_instance)
354
+ def wait(params = {})
355
+ @waiter.wait(client: @client, params: params)
356
+ end
357
+
358
+ # @api private
359
+ attr_reader :waiter
360
+
361
+ end
362
+
363
+ class TrainingJob_Created
364
+
365
+ # @param [Hash] options
366
+ # @option options [required, Client] :client
367
+ # @option options [Integer] :max_attempts (120)
368
+ # @option options [Integer] :delay (120)
369
+ # @option options [Proc] :before_attempt
370
+ # @option options [Proc] :before_wait
371
+ def initialize(options)
372
+ @client = options.fetch(:client)
373
+ @waiter = Aws::Waiters::Waiter.new({
374
+ max_attempts: 120,
375
+ delay: 120,
376
+ poller: Aws::Waiters::Poller.new(
377
+ operation_name: :describe_training_job,
378
+ acceptors: [
379
+ {
380
+ "expected" => "Created",
381
+ "matcher" => "path",
382
+ "state" => "success",
383
+ "argument" => "training_job_status"
384
+ },
385
+ {
386
+ "expected" => "Completed",
387
+ "matcher" => "path",
388
+ "state" => "success",
389
+ "argument" => "training_job_status"
390
+ },
391
+ {
392
+ "expected" => "InProgress",
393
+ "matcher" => "path",
394
+ "state" => "retry",
395
+ "argument" => "training_job_status"
396
+ },
397
+ {
398
+ "expected" => "Failed",
399
+ "matcher" => "path",
400
+ "state" => "failure",
401
+ "argument" => "training_job_status"
402
+ },
403
+ {
404
+ "expected" => "Stopping",
405
+ "matcher" => "path",
406
+ "state" => "failure",
407
+ "argument" => "training_job_status"
408
+ },
409
+ {
410
+ "expected" => "Stopped",
411
+ "matcher" => "path",
412
+ "state" => "failure",
413
+ "argument" => "training_job_status"
414
+ },
415
+ {
416
+ "expected" => "Deleting",
417
+ "matcher" => "path",
418
+ "state" => "failure",
419
+ "argument" => "training_job_status"
420
+ },
421
+ {
422
+ "expected" => "ValidationException",
423
+ "matcher" => "error",
424
+ "state" => "failure"
425
+ },
426
+ {
427
+ "expected" => "ThrottlingException",
428
+ "matcher" => "error",
429
+ "state" => "retry"
430
+ }
431
+ ]
432
+ )
433
+ }.merge(options))
434
+ end
435
+
436
+ # @option (see Client#describe_training_job)
437
+ # @return (see Client#describe_training_job)
438
+ def wait(params = {})
439
+ @waiter.wait(client: @client, params: params)
440
+ end
441
+
442
+ # @api private
443
+ attr_reader :waiter
444
+
445
+ end
446
+
447
+ class TrainingJob_Deleted
448
+
449
+ # @param [Hash] options
450
+ # @option options [required, Client] :client
451
+ # @option options [Integer] :max_attempts (120)
452
+ # @option options [Integer] :delay (120)
453
+ # @option options [Proc] :before_attempt
454
+ # @option options [Proc] :before_wait
455
+ def initialize(options)
456
+ @client = options.fetch(:client)
457
+ @waiter = Aws::Waiters::Waiter.new({
458
+ max_attempts: 120,
459
+ delay: 120,
460
+ poller: Aws::Waiters::Poller.new(
461
+ operation_name: :describe_training_job,
462
+ acceptors: [
463
+ {
464
+ "expected" => "ValidationException",
465
+ "matcher" => "error",
466
+ "state" => "success"
467
+ },
468
+ {
469
+ "expected" => "Deleting",
470
+ "matcher" => "path",
471
+ "state" => "retry",
472
+ "argument" => "training_job_status"
473
+ },
474
+ {
475
+ "expected" => "ThrottlingException",
476
+ "matcher" => "error",
477
+ "state" => "retry"
478
+ }
479
+ ]
480
+ )
481
+ }.merge(options))
482
+ end
483
+
484
+ # @option (see Client#describe_training_job)
485
+ # @return (see Client#describe_training_job)
486
+ def wait(params = {})
487
+ @waiter.wait(client: @client, params: params)
488
+ end
489
+
490
+ # @api private
491
+ attr_reader :waiter
492
+
493
+ end
494
+
495
+ class TrainingJob_Stopped
496
+
497
+ # @param [Hash] options
498
+ # @option options [required, Client] :client
499
+ # @option options [Integer] :max_attempts (120)
500
+ # @option options [Integer] :delay (120)
501
+ # @option options [Proc] :before_attempt
502
+ # @option options [Proc] :before_wait
503
+ def initialize(options)
504
+ @client = options.fetch(:client)
505
+ @waiter = Aws::Waiters::Waiter.new({
506
+ max_attempts: 120,
507
+ delay: 120,
508
+ poller: Aws::Waiters::Poller.new(
509
+ operation_name: :describe_training_job,
510
+ acceptors: [
511
+ {
512
+ "expected" => "Completed",
513
+ "matcher" => "path",
514
+ "state" => "success",
515
+ "argument" => "training_job_status"
516
+ },
517
+ {
518
+ "expected" => "Stopping",
519
+ "matcher" => "path",
520
+ "state" => "retry",
521
+ "argument" => "training_job_status"
522
+ },
523
+ {
524
+ "expected" => "Stopped",
525
+ "matcher" => "path",
526
+ "state" => "success",
527
+ "argument" => "training_job_status"
528
+ },
529
+ {
530
+ "expected" => "ThrottlingException",
531
+ "matcher" => "error",
532
+ "state" => "retry"
533
+ },
534
+ {
535
+ "expected" => "ValidationException",
536
+ "matcher" => "error",
537
+ "state" => "failure"
538
+ },
539
+ {
540
+ "expected" => "Failed",
541
+ "matcher" => "path",
542
+ "state" => "failure",
543
+ "argument" => "training_job_status"
544
+ },
545
+ {
546
+ "expected" => "Deleting",
547
+ "matcher" => "path",
548
+ "state" => "failure",
549
+ "argument" => "training_job_status"
550
+ }
551
+ ]
552
+ )
553
+ }.merge(options))
554
+ end
555
+
556
+ # @option (see Client#describe_training_job)
557
+ # @return (see Client#describe_training_job)
558
+ def wait(params = {})
559
+ @waiter.wait(client: @client, params: params)
560
+ end
561
+
562
+ # @api private
563
+ attr_reader :waiter
564
+
565
+ end
566
+ end
567
+ end