google-apis-tpu_v2 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/OVERVIEW.md +2 -2
- data/lib/google/apis/tpu_v2/classes.rb +514 -0
- data/lib/google/apis/tpu_v2/gem_version.rb +3 -3
- data/lib/google/apis/tpu_v2/representations.rb +286 -0
- data/lib/google/apis/tpu_v2/service.rb +183 -1
- metadata +7 -7
@@ -34,24 +34,54 @@ module Google
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
35
35
|
end
|
36
36
|
|
37
|
+
class AcceptedData
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
37
43
|
class AccessConfig
|
38
44
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
45
|
|
40
46
|
include Google::Apis::Core::JsonObjectSupport
|
41
47
|
end
|
42
48
|
|
49
|
+
class ActiveData
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
43
55
|
class AttachedDisk
|
44
56
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
57
|
|
46
58
|
include Google::Apis::Core::JsonObjectSupport
|
47
59
|
end
|
48
60
|
|
61
|
+
class CreatingData
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class DeletingData
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
49
73
|
class Empty
|
50
74
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
75
|
|
52
76
|
include Google::Apis::Core::JsonObjectSupport
|
53
77
|
end
|
54
78
|
|
79
|
+
class FailedData
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
55
85
|
class GenerateServiceIdentityRequest
|
56
86
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
87
|
|
@@ -76,6 +106,12 @@ module Google
|
|
76
106
|
include Google::Apis::Core::JsonObjectSupport
|
77
107
|
end
|
78
108
|
|
109
|
+
class Guaranteed
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
79
115
|
class GuestAttributes
|
80
116
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
117
|
|
@@ -94,6 +130,12 @@ module Google
|
|
94
130
|
include Google::Apis::Core::JsonObjectSupport
|
95
131
|
end
|
96
132
|
|
133
|
+
class Interval
|
134
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
|
+
|
136
|
+
include Google::Apis::Core::JsonObjectSupport
|
137
|
+
end
|
138
|
+
|
97
139
|
class ListAcceleratorTypesResponse
|
98
140
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
141
|
|
@@ -118,6 +160,12 @@ module Google
|
|
118
160
|
include Google::Apis::Core::JsonObjectSupport
|
119
161
|
end
|
120
162
|
|
163
|
+
class ListQueuedResourcesResponse
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
|
+
|
166
|
+
include Google::Apis::Core::JsonObjectSupport
|
167
|
+
end
|
168
|
+
|
121
169
|
class ListRuntimeVersionsResponse
|
122
170
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
171
|
|
@@ -130,6 +178,12 @@ module Google
|
|
130
178
|
include Google::Apis::Core::JsonObjectSupport
|
131
179
|
end
|
132
180
|
|
181
|
+
class MultisliceParams
|
182
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
183
|
+
|
184
|
+
include Google::Apis::Core::JsonObjectSupport
|
185
|
+
end
|
186
|
+
|
133
187
|
class NetworkConfig
|
134
188
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
189
|
|
@@ -148,6 +202,12 @@ module Google
|
|
148
202
|
include Google::Apis::Core::JsonObjectSupport
|
149
203
|
end
|
150
204
|
|
205
|
+
class NodeSpec
|
206
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
207
|
+
|
208
|
+
include Google::Apis::Core::JsonObjectSupport
|
209
|
+
end
|
210
|
+
|
151
211
|
class Operation
|
152
212
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
153
213
|
|
@@ -160,6 +220,36 @@ module Google
|
|
160
220
|
include Google::Apis::Core::JsonObjectSupport
|
161
221
|
end
|
162
222
|
|
223
|
+
class ProvisioningData
|
224
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
225
|
+
|
226
|
+
include Google::Apis::Core::JsonObjectSupport
|
227
|
+
end
|
228
|
+
|
229
|
+
class QueuedResource
|
230
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
231
|
+
|
232
|
+
include Google::Apis::Core::JsonObjectSupport
|
233
|
+
end
|
234
|
+
|
235
|
+
class QueuedResourceState
|
236
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
237
|
+
|
238
|
+
include Google::Apis::Core::JsonObjectSupport
|
239
|
+
end
|
240
|
+
|
241
|
+
class QueueingPolicy
|
242
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
243
|
+
|
244
|
+
include Google::Apis::Core::JsonObjectSupport
|
245
|
+
end
|
246
|
+
|
247
|
+
class ResetQueuedResourceRequest
|
248
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
249
|
+
|
250
|
+
include Google::Apis::Core::JsonObjectSupport
|
251
|
+
end
|
252
|
+
|
163
253
|
class RuntimeVersion
|
164
254
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
255
|
|
@@ -190,6 +280,12 @@ module Google
|
|
190
280
|
include Google::Apis::Core::JsonObjectSupport
|
191
281
|
end
|
192
282
|
|
283
|
+
class Spot
|
284
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
285
|
+
|
286
|
+
include Google::Apis::Core::JsonObjectSupport
|
287
|
+
end
|
288
|
+
|
193
289
|
class StartNodeRequest
|
194
290
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
195
291
|
|
@@ -208,12 +304,30 @@ module Google
|
|
208
304
|
include Google::Apis::Core::JsonObjectSupport
|
209
305
|
end
|
210
306
|
|
307
|
+
class SuspendedData
|
308
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
309
|
+
|
310
|
+
include Google::Apis::Core::JsonObjectSupport
|
311
|
+
end
|
312
|
+
|
313
|
+
class SuspendingData
|
314
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
315
|
+
|
316
|
+
include Google::Apis::Core::JsonObjectSupport
|
317
|
+
end
|
318
|
+
|
211
319
|
class Symptom
|
212
320
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
213
321
|
|
214
322
|
include Google::Apis::Core::JsonObjectSupport
|
215
323
|
end
|
216
324
|
|
325
|
+
class Tpu
|
326
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
327
|
+
|
328
|
+
include Google::Apis::Core::JsonObjectSupport
|
329
|
+
end
|
330
|
+
|
217
331
|
class AcceleratorConfig
|
218
332
|
# @private
|
219
333
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -232,6 +346,12 @@ module Google
|
|
232
346
|
end
|
233
347
|
end
|
234
348
|
|
349
|
+
class AcceptedData
|
350
|
+
# @private
|
351
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
235
355
|
class AccessConfig
|
236
356
|
# @private
|
237
357
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -239,6 +359,12 @@ module Google
|
|
239
359
|
end
|
240
360
|
end
|
241
361
|
|
362
|
+
class ActiveData
|
363
|
+
# @private
|
364
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
242
368
|
class AttachedDisk
|
243
369
|
# @private
|
244
370
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -247,12 +373,32 @@ module Google
|
|
247
373
|
end
|
248
374
|
end
|
249
375
|
|
376
|
+
class CreatingData
|
377
|
+
# @private
|
378
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
class DeletingData
|
383
|
+
# @private
|
384
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
250
388
|
class Empty
|
251
389
|
# @private
|
252
390
|
class Representation < Google::Apis::Core::JsonRepresentation
|
253
391
|
end
|
254
392
|
end
|
255
393
|
|
394
|
+
class FailedData
|
395
|
+
# @private
|
396
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
397
|
+
property :error, as: 'error', class: Google::Apis::TpuV2::Status, decorator: Google::Apis::TpuV2::Status::Representation
|
398
|
+
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
256
402
|
class GenerateServiceIdentityRequest
|
257
403
|
# @private
|
258
404
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -283,6 +429,13 @@ module Google
|
|
283
429
|
end
|
284
430
|
end
|
285
431
|
|
432
|
+
class Guaranteed
|
433
|
+
# @private
|
434
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
435
|
+
property :min_duration, as: 'minDuration'
|
436
|
+
end
|
437
|
+
end
|
438
|
+
|
286
439
|
class GuestAttributes
|
287
440
|
# @private
|
288
441
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -309,6 +462,14 @@ module Google
|
|
309
462
|
end
|
310
463
|
end
|
311
464
|
|
465
|
+
class Interval
|
466
|
+
# @private
|
467
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
468
|
+
property :end_time, as: 'endTime'
|
469
|
+
property :start_time, as: 'startTime'
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
312
473
|
class ListAcceleratorTypesResponse
|
313
474
|
# @private
|
314
475
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -347,6 +508,16 @@ module Google
|
|
347
508
|
end
|
348
509
|
end
|
349
510
|
|
511
|
+
class ListQueuedResourcesResponse
|
512
|
+
# @private
|
513
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
514
|
+
property :next_page_token, as: 'nextPageToken'
|
515
|
+
collection :queued_resources, as: 'queuedResources', class: Google::Apis::TpuV2::QueuedResource, decorator: Google::Apis::TpuV2::QueuedResource::Representation
|
516
|
+
|
517
|
+
collection :unreachable, as: 'unreachable'
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
350
521
|
class ListRuntimeVersionsResponse
|
351
522
|
# @private
|
352
523
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -368,12 +539,21 @@ module Google
|
|
368
539
|
end
|
369
540
|
end
|
370
541
|
|
542
|
+
class MultisliceParams
|
543
|
+
# @private
|
544
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
545
|
+
property :node_count, as: 'nodeCount'
|
546
|
+
property :node_id_prefix, as: 'nodeIdPrefix'
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
371
550
|
class NetworkConfig
|
372
551
|
# @private
|
373
552
|
class Representation < Google::Apis::Core::JsonRepresentation
|
374
553
|
property :can_ip_forward, as: 'canIpForward'
|
375
554
|
property :enable_external_ips, as: 'enableExternalIps'
|
376
555
|
property :network, as: 'network'
|
556
|
+
property :queue_count, as: 'queueCount'
|
377
557
|
property :subnetwork, as: 'subnetwork'
|
378
558
|
end
|
379
559
|
end
|
@@ -426,6 +606,18 @@ module Google
|
|
426
606
|
end
|
427
607
|
end
|
428
608
|
|
609
|
+
class NodeSpec
|
610
|
+
# @private
|
611
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
612
|
+
property :multislice_params, as: 'multisliceParams', class: Google::Apis::TpuV2::MultisliceParams, decorator: Google::Apis::TpuV2::MultisliceParams::Representation
|
613
|
+
|
614
|
+
property :node, as: 'node', class: Google::Apis::TpuV2::Node, decorator: Google::Apis::TpuV2::Node::Representation
|
615
|
+
|
616
|
+
property :node_id, as: 'nodeId'
|
617
|
+
property :parent, as: 'parent'
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
429
621
|
class Operation
|
430
622
|
# @private
|
431
623
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -451,6 +643,73 @@ module Google
|
|
451
643
|
end
|
452
644
|
end
|
453
645
|
|
646
|
+
class ProvisioningData
|
647
|
+
# @private
|
648
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
class QueuedResource
|
653
|
+
# @private
|
654
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
655
|
+
property :create_time, as: 'createTime'
|
656
|
+
property :guaranteed, as: 'guaranteed', class: Google::Apis::TpuV2::Guaranteed, decorator: Google::Apis::TpuV2::Guaranteed::Representation
|
657
|
+
|
658
|
+
property :name, as: 'name'
|
659
|
+
property :queueing_policy, as: 'queueingPolicy', class: Google::Apis::TpuV2::QueueingPolicy, decorator: Google::Apis::TpuV2::QueueingPolicy::Representation
|
660
|
+
|
661
|
+
property :reservation_name, as: 'reservationName'
|
662
|
+
property :spot, as: 'spot', class: Google::Apis::TpuV2::Spot, decorator: Google::Apis::TpuV2::Spot::Representation
|
663
|
+
|
664
|
+
property :state, as: 'state', class: Google::Apis::TpuV2::QueuedResourceState, decorator: Google::Apis::TpuV2::QueuedResourceState::Representation
|
665
|
+
|
666
|
+
property :tpu, as: 'tpu', class: Google::Apis::TpuV2::Tpu, decorator: Google::Apis::TpuV2::Tpu::Representation
|
667
|
+
|
668
|
+
end
|
669
|
+
end
|
670
|
+
|
671
|
+
class QueuedResourceState
|
672
|
+
# @private
|
673
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
674
|
+
property :accepted_data, as: 'acceptedData', class: Google::Apis::TpuV2::AcceptedData, decorator: Google::Apis::TpuV2::AcceptedData::Representation
|
675
|
+
|
676
|
+
property :active_data, as: 'activeData', class: Google::Apis::TpuV2::ActiveData, decorator: Google::Apis::TpuV2::ActiveData::Representation
|
677
|
+
|
678
|
+
property :creating_data, as: 'creatingData', class: Google::Apis::TpuV2::CreatingData, decorator: Google::Apis::TpuV2::CreatingData::Representation
|
679
|
+
|
680
|
+
property :deleting_data, as: 'deletingData', class: Google::Apis::TpuV2::DeletingData, decorator: Google::Apis::TpuV2::DeletingData::Representation
|
681
|
+
|
682
|
+
property :failed_data, as: 'failedData', class: Google::Apis::TpuV2::FailedData, decorator: Google::Apis::TpuV2::FailedData::Representation
|
683
|
+
|
684
|
+
property :provisioning_data, as: 'provisioningData', class: Google::Apis::TpuV2::ProvisioningData, decorator: Google::Apis::TpuV2::ProvisioningData::Representation
|
685
|
+
|
686
|
+
property :state, as: 'state'
|
687
|
+
property :state_initiator, as: 'stateInitiator'
|
688
|
+
property :suspended_data, as: 'suspendedData', class: Google::Apis::TpuV2::SuspendedData, decorator: Google::Apis::TpuV2::SuspendedData::Representation
|
689
|
+
|
690
|
+
property :suspending_data, as: 'suspendingData', class: Google::Apis::TpuV2::SuspendingData, decorator: Google::Apis::TpuV2::SuspendingData::Representation
|
691
|
+
|
692
|
+
end
|
693
|
+
end
|
694
|
+
|
695
|
+
class QueueingPolicy
|
696
|
+
# @private
|
697
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
698
|
+
property :valid_after_duration, as: 'validAfterDuration'
|
699
|
+
property :valid_after_time, as: 'validAfterTime'
|
700
|
+
property :valid_interval, as: 'validInterval', class: Google::Apis::TpuV2::Interval, decorator: Google::Apis::TpuV2::Interval::Representation
|
701
|
+
|
702
|
+
property :valid_until_duration, as: 'validUntilDuration'
|
703
|
+
property :valid_until_time, as: 'validUntilTime'
|
704
|
+
end
|
705
|
+
end
|
706
|
+
|
707
|
+
class ResetQueuedResourceRequest
|
708
|
+
# @private
|
709
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
710
|
+
end
|
711
|
+
end
|
712
|
+
|
454
713
|
class RuntimeVersion
|
455
714
|
# @private
|
456
715
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -464,6 +723,7 @@ module Google
|
|
464
723
|
class Representation < Google::Apis::Core::JsonRepresentation
|
465
724
|
property :preemptible, as: 'preemptible'
|
466
725
|
property :reserved, as: 'reserved'
|
726
|
+
property :spot, as: 'spot'
|
467
727
|
end
|
468
728
|
end
|
469
729
|
|
@@ -489,6 +749,12 @@ module Google
|
|
489
749
|
end
|
490
750
|
end
|
491
751
|
|
752
|
+
class Spot
|
753
|
+
# @private
|
754
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
755
|
+
end
|
756
|
+
end
|
757
|
+
|
492
758
|
class StartNodeRequest
|
493
759
|
# @private
|
494
760
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -510,6 +776,18 @@ module Google
|
|
510
776
|
end
|
511
777
|
end
|
512
778
|
|
779
|
+
class SuspendedData
|
780
|
+
# @private
|
781
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
class SuspendingData
|
786
|
+
# @private
|
787
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
788
|
+
end
|
789
|
+
end
|
790
|
+
|
513
791
|
class Symptom
|
514
792
|
# @private
|
515
793
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -519,6 +797,14 @@ module Google
|
|
519
797
|
property :worker_id, as: 'workerId'
|
520
798
|
end
|
521
799
|
end
|
800
|
+
|
801
|
+
class Tpu
|
802
|
+
# @private
|
803
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
804
|
+
collection :node_spec, as: 'nodeSpec', class: Google::Apis::TpuV2::NodeSpec, decorator: Google::Apis::TpuV2::NodeSpec::Representation
|
805
|
+
|
806
|
+
end
|
807
|
+
end
|
522
808
|
end
|
523
809
|
end
|
524
810
|
end
|
@@ -32,6 +32,8 @@ module Google
|
|
32
32
|
#
|
33
33
|
# @see https://cloud.google.com/tpu/
|
34
34
|
class TPUService < Google::Apis::Core::BaseService
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://tpu.$UNIVERSE_DOMAIN$/"
|
36
|
+
|
35
37
|
# @return [String]
|
36
38
|
# API key. Your API key identifies your project and provides you with API access,
|
37
39
|
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
@@ -43,7 +45,7 @@ module Google
|
|
43
45
|
attr_accessor :quota_user
|
44
46
|
|
45
47
|
def initialize
|
46
|
-
super(
|
48
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
47
49
|
client_name: 'google-apis-tpu_v2',
|
48
50
|
client_version: Google::Apis::TpuV2::GEM_VERSION)
|
49
51
|
@batch_path = 'batch'
|
@@ -636,6 +638,186 @@ module Google
|
|
636
638
|
execute_or_queue_command(command, &block)
|
637
639
|
end
|
638
640
|
|
641
|
+
# Creates a QueuedResource TPU instance.
|
642
|
+
# @param [String] parent
|
643
|
+
# Required. The parent resource name.
|
644
|
+
# @param [Google::Apis::TpuV2::QueuedResource] queued_resource_object
|
645
|
+
# @param [String] queued_resource_id
|
646
|
+
# Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+
|
647
|
+
# $` regex format.
|
648
|
+
# @param [String] request_id
|
649
|
+
# Optional. Idempotent request UUID.
|
650
|
+
# @param [String] fields
|
651
|
+
# Selector specifying which fields to include in a partial response.
|
652
|
+
# @param [String] quota_user
|
653
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
654
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
655
|
+
# @param [Google::Apis::RequestOptions] options
|
656
|
+
# Request-specific options
|
657
|
+
#
|
658
|
+
# @yield [result, err] Result & error if block supplied
|
659
|
+
# @yieldparam result [Google::Apis::TpuV2::Operation] parsed result object
|
660
|
+
# @yieldparam err [StandardError] error object if request failed
|
661
|
+
#
|
662
|
+
# @return [Google::Apis::TpuV2::Operation]
|
663
|
+
#
|
664
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
665
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
666
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
667
|
+
def create_project_location_queued_resource(parent, queued_resource_object = nil, queued_resource_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
668
|
+
command = make_simple_command(:post, 'v2/{+parent}/queuedResources', options)
|
669
|
+
command.request_representation = Google::Apis::TpuV2::QueuedResource::Representation
|
670
|
+
command.request_object = queued_resource_object
|
671
|
+
command.response_representation = Google::Apis::TpuV2::Operation::Representation
|
672
|
+
command.response_class = Google::Apis::TpuV2::Operation
|
673
|
+
command.params['parent'] = parent unless parent.nil?
|
674
|
+
command.query['queuedResourceId'] = queued_resource_id unless queued_resource_id.nil?
|
675
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
676
|
+
command.query['fields'] = fields unless fields.nil?
|
677
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
678
|
+
execute_or_queue_command(command, &block)
|
679
|
+
end
|
680
|
+
|
681
|
+
# Deletes a QueuedResource TPU instance.
|
682
|
+
# @param [String] name
|
683
|
+
# Required. The resource name.
|
684
|
+
# @param [Boolean] force
|
685
|
+
# Optional. If set to true, all running nodes belonging to this queued resource
|
686
|
+
# will be deleted first and then the queued resource will be deleted. Otherwise (
|
687
|
+
# i.e. force=false), the queued resource will only be deleted if its nodes have
|
688
|
+
# already been deleted or the queued resource is in the ACCEPTED, FAILED, or
|
689
|
+
# SUSPENDED state.
|
690
|
+
# @param [String] request_id
|
691
|
+
# Optional. Idempotent request UUID.
|
692
|
+
# @param [String] fields
|
693
|
+
# Selector specifying which fields to include in a partial response.
|
694
|
+
# @param [String] quota_user
|
695
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
696
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
697
|
+
# @param [Google::Apis::RequestOptions] options
|
698
|
+
# Request-specific options
|
699
|
+
#
|
700
|
+
# @yield [result, err] Result & error if block supplied
|
701
|
+
# @yieldparam result [Google::Apis::TpuV2::Operation] parsed result object
|
702
|
+
# @yieldparam err [StandardError] error object if request failed
|
703
|
+
#
|
704
|
+
# @return [Google::Apis::TpuV2::Operation]
|
705
|
+
#
|
706
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
707
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
708
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
709
|
+
def delete_project_location_queued_resource(name, force: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
710
|
+
command = make_simple_command(:delete, 'v2/{+name}', options)
|
711
|
+
command.response_representation = Google::Apis::TpuV2::Operation::Representation
|
712
|
+
command.response_class = Google::Apis::TpuV2::Operation
|
713
|
+
command.params['name'] = name unless name.nil?
|
714
|
+
command.query['force'] = force unless force.nil?
|
715
|
+
command.query['requestId'] = request_id unless request_id.nil?
|
716
|
+
command.query['fields'] = fields unless fields.nil?
|
717
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
718
|
+
execute_or_queue_command(command, &block)
|
719
|
+
end
|
720
|
+
|
721
|
+
# Gets details of a queued resource.
|
722
|
+
# @param [String] name
|
723
|
+
# Required. The resource name.
|
724
|
+
# @param [String] fields
|
725
|
+
# Selector specifying which fields to include in a partial response.
|
726
|
+
# @param [String] quota_user
|
727
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
728
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
729
|
+
# @param [Google::Apis::RequestOptions] options
|
730
|
+
# Request-specific options
|
731
|
+
#
|
732
|
+
# @yield [result, err] Result & error if block supplied
|
733
|
+
# @yieldparam result [Google::Apis::TpuV2::QueuedResource] parsed result object
|
734
|
+
# @yieldparam err [StandardError] error object if request failed
|
735
|
+
#
|
736
|
+
# @return [Google::Apis::TpuV2::QueuedResource]
|
737
|
+
#
|
738
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
739
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
740
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
741
|
+
def get_project_location_queued_resource(name, fields: nil, quota_user: nil, options: nil, &block)
|
742
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
743
|
+
command.response_representation = Google::Apis::TpuV2::QueuedResource::Representation
|
744
|
+
command.response_class = Google::Apis::TpuV2::QueuedResource
|
745
|
+
command.params['name'] = name unless name.nil?
|
746
|
+
command.query['fields'] = fields unless fields.nil?
|
747
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
748
|
+
execute_or_queue_command(command, &block)
|
749
|
+
end
|
750
|
+
|
751
|
+
# Lists queued resources.
|
752
|
+
# @param [String] parent
|
753
|
+
# Required. The parent resource name.
|
754
|
+
# @param [Fixnum] page_size
|
755
|
+
# Optional. The maximum number of items to return.
|
756
|
+
# @param [String] page_token
|
757
|
+
# Optional. The next_page_token value returned from a previous List request, if
|
758
|
+
# any.
|
759
|
+
# @param [String] fields
|
760
|
+
# Selector specifying which fields to include in a partial response.
|
761
|
+
# @param [String] quota_user
|
762
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
763
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
764
|
+
# @param [Google::Apis::RequestOptions] options
|
765
|
+
# Request-specific options
|
766
|
+
#
|
767
|
+
# @yield [result, err] Result & error if block supplied
|
768
|
+
# @yieldparam result [Google::Apis::TpuV2::ListQueuedResourcesResponse] parsed result object
|
769
|
+
# @yieldparam err [StandardError] error object if request failed
|
770
|
+
#
|
771
|
+
# @return [Google::Apis::TpuV2::ListQueuedResourcesResponse]
|
772
|
+
#
|
773
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
774
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
775
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
776
|
+
def list_project_location_queued_resources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
777
|
+
command = make_simple_command(:get, 'v2/{+parent}/queuedResources', options)
|
778
|
+
command.response_representation = Google::Apis::TpuV2::ListQueuedResourcesResponse::Representation
|
779
|
+
command.response_class = Google::Apis::TpuV2::ListQueuedResourcesResponse
|
780
|
+
command.params['parent'] = parent unless parent.nil?
|
781
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
782
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
783
|
+
command.query['fields'] = fields unless fields.nil?
|
784
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
785
|
+
execute_or_queue_command(command, &block)
|
786
|
+
end
|
787
|
+
|
788
|
+
# Resets a QueuedResource TPU instance
|
789
|
+
# @param [String] name
|
790
|
+
# Required. The name of the queued resource.
|
791
|
+
# @param [Google::Apis::TpuV2::ResetQueuedResourceRequest] reset_queued_resource_request_object
|
792
|
+
# @param [String] fields
|
793
|
+
# Selector specifying which fields to include in a partial response.
|
794
|
+
# @param [String] quota_user
|
795
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
796
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
797
|
+
# @param [Google::Apis::RequestOptions] options
|
798
|
+
# Request-specific options
|
799
|
+
#
|
800
|
+
# @yield [result, err] Result & error if block supplied
|
801
|
+
# @yieldparam result [Google::Apis::TpuV2::Operation] parsed result object
|
802
|
+
# @yieldparam err [StandardError] error object if request failed
|
803
|
+
#
|
804
|
+
# @return [Google::Apis::TpuV2::Operation]
|
805
|
+
#
|
806
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
807
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
808
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
809
|
+
def reset_queued_resource(name, reset_queued_resource_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
810
|
+
command = make_simple_command(:post, 'v2/{+name}:reset', options)
|
811
|
+
command.request_representation = Google::Apis::TpuV2::ResetQueuedResourceRequest::Representation
|
812
|
+
command.request_object = reset_queued_resource_request_object
|
813
|
+
command.response_representation = Google::Apis::TpuV2::Operation::Representation
|
814
|
+
command.response_class = Google::Apis::TpuV2::Operation
|
815
|
+
command.params['name'] = name unless name.nil?
|
816
|
+
command.query['fields'] = fields unless fields.nil?
|
817
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
818
|
+
execute_or_queue_command(command, &block)
|
819
|
+
end
|
820
|
+
|
639
821
|
# Gets a runtime version.
|
640
822
|
# @param [String] name
|
641
823
|
# Required. The resource name.
|