google-cloud-compute-v1 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +97 -30
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/images/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +167 -42
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +365 -96
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +79 -18
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +103 -27
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +167 -42
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +73 -18
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +73 -18
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1.rb +2 -0
- metadata +6 -2
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/instance_group_managers/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -172,9 +173,21 @@ module Google
|
|
172
173
|
credentials = Credentials.new credentials, scope: @config.scope
|
173
174
|
end
|
174
175
|
|
176
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
177
|
+
config.credentials = credentials
|
178
|
+
config.endpoint = @config.endpoint
|
179
|
+
end
|
180
|
+
|
175
181
|
@instance_group_managers_stub = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
176
182
|
end
|
177
183
|
|
184
|
+
##
|
185
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
186
|
+
#
|
187
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
188
|
+
#
|
189
|
+
attr_reader :zone_operations
|
190
|
+
|
178
191
|
# Service calls
|
179
192
|
|
180
193
|
##
|
@@ -208,10 +221,10 @@ module Google
|
|
208
221
|
# @param zone [::String]
|
209
222
|
# The name of the zone where the managed instance group is located.
|
210
223
|
# @yield [result, response] Access the result along with the Faraday response object
|
211
|
-
# @yieldparam result [::Gapic::
|
224
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
212
225
|
# @yieldparam response [::Faraday::Response]
|
213
226
|
#
|
214
|
-
# @return [::Gapic::
|
227
|
+
# @return [::Gapic::GenericLRO::Operation]
|
215
228
|
#
|
216
229
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
217
230
|
def abandon_instances request, options = nil
|
@@ -238,7 +251,15 @@ module Google
|
|
238
251
|
metadata: @config.metadata
|
239
252
|
|
240
253
|
@instance_group_managers_stub.abandon_instances request, options do |result, response|
|
241
|
-
result = ::
|
254
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
255
|
+
operation: result,
|
256
|
+
client: zone_operations,
|
257
|
+
request_values: {
|
258
|
+
"project" => request.project,
|
259
|
+
"zone" => request.zone
|
260
|
+
},
|
261
|
+
options: options
|
262
|
+
)
|
242
263
|
yield result, response if block_given?
|
243
264
|
return result
|
244
265
|
end
|
@@ -350,10 +371,10 @@ module Google
|
|
350
371
|
# @param zone [::String]
|
351
372
|
# The name of the zone where the managed instance group is located. Should conform to RFC1035.
|
352
373
|
# @yield [result, response] Access the result along with the Faraday response object
|
353
|
-
# @yieldparam result [::Gapic::
|
374
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
354
375
|
# @yieldparam response [::Faraday::Response]
|
355
376
|
#
|
356
|
-
# @return [::Gapic::
|
377
|
+
# @return [::Gapic::GenericLRO::Operation]
|
357
378
|
#
|
358
379
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
359
380
|
def apply_updates_to_instances request, options = nil
|
@@ -380,7 +401,15 @@ module Google
|
|
380
401
|
metadata: @config.metadata
|
381
402
|
|
382
403
|
@instance_group_managers_stub.apply_updates_to_instances request, options do |result, response|
|
383
|
-
result = ::
|
404
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
405
|
+
operation: result,
|
406
|
+
client: zone_operations,
|
407
|
+
request_values: {
|
408
|
+
"project" => request.project,
|
409
|
+
"zone" => request.zone
|
410
|
+
},
|
411
|
+
options: options
|
412
|
+
)
|
384
413
|
yield result, response if block_given?
|
385
414
|
return result
|
386
415
|
end
|
@@ -420,10 +449,10 @@ module Google
|
|
420
449
|
# @param zone [::String]
|
421
450
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
422
451
|
# @yield [result, response] Access the result along with the Faraday response object
|
423
|
-
# @yieldparam result [::Gapic::
|
452
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
424
453
|
# @yieldparam response [::Faraday::Response]
|
425
454
|
#
|
426
|
-
# @return [::Gapic::
|
455
|
+
# @return [::Gapic::GenericLRO::Operation]
|
427
456
|
#
|
428
457
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
429
458
|
def create_instances request, options = nil
|
@@ -450,7 +479,15 @@ module Google
|
|
450
479
|
metadata: @config.metadata
|
451
480
|
|
452
481
|
@instance_group_managers_stub.create_instances request, options do |result, response|
|
453
|
-
result = ::
|
482
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
483
|
+
operation: result,
|
484
|
+
client: zone_operations,
|
485
|
+
request_values: {
|
486
|
+
"project" => request.project,
|
487
|
+
"zone" => request.zone
|
488
|
+
},
|
489
|
+
options: options
|
490
|
+
)
|
454
491
|
yield result, response if block_given?
|
455
492
|
return result
|
456
493
|
end
|
@@ -488,10 +525,10 @@ module Google
|
|
488
525
|
# @param zone [::String]
|
489
526
|
# The name of the zone where the managed instance group is located.
|
490
527
|
# @yield [result, response] Access the result along with the Faraday response object
|
491
|
-
# @yieldparam result [::Gapic::
|
528
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
492
529
|
# @yieldparam response [::Faraday::Response]
|
493
530
|
#
|
494
|
-
# @return [::Gapic::
|
531
|
+
# @return [::Gapic::GenericLRO::Operation]
|
495
532
|
#
|
496
533
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
497
534
|
def delete request, options = nil
|
@@ -518,7 +555,15 @@ module Google
|
|
518
555
|
metadata: @config.metadata
|
519
556
|
|
520
557
|
@instance_group_managers_stub.delete request, options do |result, response|
|
521
|
-
result = ::
|
558
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
559
|
+
operation: result,
|
560
|
+
client: zone_operations,
|
561
|
+
request_values: {
|
562
|
+
"project" => request.project,
|
563
|
+
"zone" => request.zone
|
564
|
+
},
|
565
|
+
options: options
|
566
|
+
)
|
522
567
|
yield result, response if block_given?
|
523
568
|
return result
|
524
569
|
end
|
@@ -558,10 +603,10 @@ module Google
|
|
558
603
|
# @param zone [::String]
|
559
604
|
# The name of the zone where the managed instance group is located.
|
560
605
|
# @yield [result, response] Access the result along with the Faraday response object
|
561
|
-
# @yieldparam result [::Gapic::
|
606
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
562
607
|
# @yieldparam response [::Faraday::Response]
|
563
608
|
#
|
564
|
-
# @return [::Gapic::
|
609
|
+
# @return [::Gapic::GenericLRO::Operation]
|
565
610
|
#
|
566
611
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
567
612
|
def delete_instances request, options = nil
|
@@ -588,7 +633,15 @@ module Google
|
|
588
633
|
metadata: @config.metadata
|
589
634
|
|
590
635
|
@instance_group_managers_stub.delete_instances request, options do |result, response|
|
591
|
-
result = ::
|
636
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
637
|
+
operation: result,
|
638
|
+
client: zone_operations,
|
639
|
+
request_values: {
|
640
|
+
"project" => request.project,
|
641
|
+
"zone" => request.zone
|
642
|
+
},
|
643
|
+
options: options
|
644
|
+
)
|
592
645
|
yield result, response if block_given?
|
593
646
|
return result
|
594
647
|
end
|
@@ -626,10 +679,10 @@ module Google
|
|
626
679
|
# @param zone [::String]
|
627
680
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
628
681
|
# @yield [result, response] Access the result along with the Faraday response object
|
629
|
-
# @yieldparam result [::Gapic::
|
682
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
630
683
|
# @yieldparam response [::Faraday::Response]
|
631
684
|
#
|
632
|
-
# @return [::Gapic::
|
685
|
+
# @return [::Gapic::GenericLRO::Operation]
|
633
686
|
#
|
634
687
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
635
688
|
def delete_per_instance_configs request, options = nil
|
@@ -656,7 +709,15 @@ module Google
|
|
656
709
|
metadata: @config.metadata
|
657
710
|
|
658
711
|
@instance_group_managers_stub.delete_per_instance_configs request, options do |result, response|
|
659
|
-
result = ::
|
712
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
713
|
+
operation: result,
|
714
|
+
client: zone_operations,
|
715
|
+
request_values: {
|
716
|
+
"project" => request.project,
|
717
|
+
"zone" => request.zone
|
718
|
+
},
|
719
|
+
options: options
|
720
|
+
)
|
660
721
|
yield result, response if block_given?
|
661
722
|
return result
|
662
723
|
end
|
@@ -759,10 +820,10 @@ module Google
|
|
759
820
|
# @param zone [::String]
|
760
821
|
# The name of the zone where you want to create the managed instance group.
|
761
822
|
# @yield [result, response] Access the result along with the Faraday response object
|
762
|
-
# @yieldparam result [::Gapic::
|
823
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
763
824
|
# @yieldparam response [::Faraday::Response]
|
764
825
|
#
|
765
|
-
# @return [::Gapic::
|
826
|
+
# @return [::Gapic::GenericLRO::Operation]
|
766
827
|
#
|
767
828
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
768
829
|
def insert request, options = nil
|
@@ -789,7 +850,15 @@ module Google
|
|
789
850
|
metadata: @config.metadata
|
790
851
|
|
791
852
|
@instance_group_managers_stub.insert request, options do |result, response|
|
792
|
-
result = ::
|
853
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
854
|
+
operation: result,
|
855
|
+
client: zone_operations,
|
856
|
+
request_values: {
|
857
|
+
"project" => request.project,
|
858
|
+
"zone" => request.zone
|
859
|
+
},
|
860
|
+
options: options
|
861
|
+
)
|
793
862
|
yield result, response if block_given?
|
794
863
|
return result
|
795
864
|
end
|
@@ -1131,10 +1200,10 @@ module Google
|
|
1131
1200
|
# @param zone [::String]
|
1132
1201
|
# The name of the zone where you want to create the managed instance group.
|
1133
1202
|
# @yield [result, response] Access the result along with the Faraday response object
|
1134
|
-
# @yieldparam result [::Gapic::
|
1203
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1135
1204
|
# @yieldparam response [::Faraday::Response]
|
1136
1205
|
#
|
1137
|
-
# @return [::Gapic::
|
1206
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1138
1207
|
#
|
1139
1208
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1140
1209
|
def patch request, options = nil
|
@@ -1161,7 +1230,15 @@ module Google
|
|
1161
1230
|
metadata: @config.metadata
|
1162
1231
|
|
1163
1232
|
@instance_group_managers_stub.patch request, options do |result, response|
|
1164
|
-
result = ::
|
1233
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1234
|
+
operation: result,
|
1235
|
+
client: zone_operations,
|
1236
|
+
request_values: {
|
1237
|
+
"project" => request.project,
|
1238
|
+
"zone" => request.zone
|
1239
|
+
},
|
1240
|
+
options: options
|
1241
|
+
)
|
1165
1242
|
yield result, response if block_given?
|
1166
1243
|
return result
|
1167
1244
|
end
|
@@ -1201,10 +1278,10 @@ module Google
|
|
1201
1278
|
# @param zone [::String]
|
1202
1279
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
1203
1280
|
# @yield [result, response] Access the result along with the Faraday response object
|
1204
|
-
# @yieldparam result [::Gapic::
|
1281
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1205
1282
|
# @yieldparam response [::Faraday::Response]
|
1206
1283
|
#
|
1207
|
-
# @return [::Gapic::
|
1284
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1208
1285
|
#
|
1209
1286
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1210
1287
|
def patch_per_instance_configs request, options = nil
|
@@ -1231,7 +1308,15 @@ module Google
|
|
1231
1308
|
metadata: @config.metadata
|
1232
1309
|
|
1233
1310
|
@instance_group_managers_stub.patch_per_instance_configs request, options do |result, response|
|
1234
|
-
result = ::
|
1311
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1312
|
+
operation: result,
|
1313
|
+
client: zone_operations,
|
1314
|
+
request_values: {
|
1315
|
+
"project" => request.project,
|
1316
|
+
"zone" => request.zone
|
1317
|
+
},
|
1318
|
+
options: options
|
1319
|
+
)
|
1235
1320
|
yield result, response if block_given?
|
1236
1321
|
return result
|
1237
1322
|
end
|
@@ -1271,10 +1356,10 @@ module Google
|
|
1271
1356
|
# @param zone [::String]
|
1272
1357
|
# The name of the zone where the managed instance group is located.
|
1273
1358
|
# @yield [result, response] Access the result along with the Faraday response object
|
1274
|
-
# @yieldparam result [::Gapic::
|
1359
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1275
1360
|
# @yieldparam response [::Faraday::Response]
|
1276
1361
|
#
|
1277
|
-
# @return [::Gapic::
|
1362
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1278
1363
|
#
|
1279
1364
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1280
1365
|
def recreate_instances request, options = nil
|
@@ -1301,7 +1386,15 @@ module Google
|
|
1301
1386
|
metadata: @config.metadata
|
1302
1387
|
|
1303
1388
|
@instance_group_managers_stub.recreate_instances request, options do |result, response|
|
1304
|
-
result = ::
|
1389
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1390
|
+
operation: result,
|
1391
|
+
client: zone_operations,
|
1392
|
+
request_values: {
|
1393
|
+
"project" => request.project,
|
1394
|
+
"zone" => request.zone
|
1395
|
+
},
|
1396
|
+
options: options
|
1397
|
+
)
|
1305
1398
|
yield result, response if block_given?
|
1306
1399
|
return result
|
1307
1400
|
end
|
@@ -1341,10 +1434,10 @@ module Google
|
|
1341
1434
|
# @param zone [::String]
|
1342
1435
|
# The name of the zone where the managed instance group is located.
|
1343
1436
|
# @yield [result, response] Access the result along with the Faraday response object
|
1344
|
-
# @yieldparam result [::Gapic::
|
1437
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1345
1438
|
# @yieldparam response [::Faraday::Response]
|
1346
1439
|
#
|
1347
|
-
# @return [::Gapic::
|
1440
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1348
1441
|
#
|
1349
1442
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1350
1443
|
def resize request, options = nil
|
@@ -1371,7 +1464,15 @@ module Google
|
|
1371
1464
|
metadata: @config.metadata
|
1372
1465
|
|
1373
1466
|
@instance_group_managers_stub.resize request, options do |result, response|
|
1374
|
-
result = ::
|
1467
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1468
|
+
operation: result,
|
1469
|
+
client: zone_operations,
|
1470
|
+
request_values: {
|
1471
|
+
"project" => request.project,
|
1472
|
+
"zone" => request.zone
|
1473
|
+
},
|
1474
|
+
options: options
|
1475
|
+
)
|
1375
1476
|
yield result, response if block_given?
|
1376
1477
|
return result
|
1377
1478
|
end
|
@@ -1411,10 +1512,10 @@ module Google
|
|
1411
1512
|
# @param zone [::String]
|
1412
1513
|
# The name of the zone where the managed instance group is located.
|
1413
1514
|
# @yield [result, response] Access the result along with the Faraday response object
|
1414
|
-
# @yieldparam result [::Gapic::
|
1515
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1415
1516
|
# @yieldparam response [::Faraday::Response]
|
1416
1517
|
#
|
1417
|
-
# @return [::Gapic::
|
1518
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1418
1519
|
#
|
1419
1520
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1420
1521
|
def set_instance_template request, options = nil
|
@@ -1441,7 +1542,15 @@ module Google
|
|
1441
1542
|
metadata: @config.metadata
|
1442
1543
|
|
1443
1544
|
@instance_group_managers_stub.set_instance_template request, options do |result, response|
|
1444
|
-
result = ::
|
1545
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1546
|
+
operation: result,
|
1547
|
+
client: zone_operations,
|
1548
|
+
request_values: {
|
1549
|
+
"project" => request.project,
|
1550
|
+
"zone" => request.zone
|
1551
|
+
},
|
1552
|
+
options: options
|
1553
|
+
)
|
1445
1554
|
yield result, response if block_given?
|
1446
1555
|
return result
|
1447
1556
|
end
|
@@ -1481,10 +1590,10 @@ module Google
|
|
1481
1590
|
# @param zone [::String]
|
1482
1591
|
# The name of the zone where the managed instance group is located.
|
1483
1592
|
# @yield [result, response] Access the result along with the Faraday response object
|
1484
|
-
# @yieldparam result [::Gapic::
|
1593
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1485
1594
|
# @yieldparam response [::Faraday::Response]
|
1486
1595
|
#
|
1487
|
-
# @return [::Gapic::
|
1596
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1488
1597
|
#
|
1489
1598
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1490
1599
|
def set_target_pools request, options = nil
|
@@ -1511,7 +1620,15 @@ module Google
|
|
1511
1620
|
metadata: @config.metadata
|
1512
1621
|
|
1513
1622
|
@instance_group_managers_stub.set_target_pools request, options do |result, response|
|
1514
|
-
result = ::
|
1623
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1624
|
+
operation: result,
|
1625
|
+
client: zone_operations,
|
1626
|
+
request_values: {
|
1627
|
+
"project" => request.project,
|
1628
|
+
"zone" => request.zone
|
1629
|
+
},
|
1630
|
+
options: options
|
1631
|
+
)
|
1515
1632
|
yield result, response if block_given?
|
1516
1633
|
return result
|
1517
1634
|
end
|
@@ -1551,10 +1668,10 @@ module Google
|
|
1551
1668
|
# @param zone [::String]
|
1552
1669
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
1553
1670
|
# @yield [result, response] Access the result along with the Faraday response object
|
1554
|
-
# @yieldparam result [::Gapic::
|
1671
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1555
1672
|
# @yieldparam response [::Faraday::Response]
|
1556
1673
|
#
|
1557
|
-
# @return [::Gapic::
|
1674
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1558
1675
|
#
|
1559
1676
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1560
1677
|
def update_per_instance_configs request, options = nil
|
@@ -1581,7 +1698,15 @@ module Google
|
|
1581
1698
|
metadata: @config.metadata
|
1582
1699
|
|
1583
1700
|
@instance_group_managers_stub.update_per_instance_configs request, options do |result, response|
|
1584
|
-
result = ::
|
1701
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1702
|
+
operation: result,
|
1703
|
+
client: zone_operations,
|
1704
|
+
request_values: {
|
1705
|
+
"project" => request.project,
|
1706
|
+
"zone" => request.zone
|
1707
|
+
},
|
1708
|
+
options: options
|
1709
|
+
)
|
1585
1710
|
yield result, response if block_given?
|
1586
1711
|
return result
|
1587
1712
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/instance_groups/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -147,9 +148,21 @@ module Google
|
|
147
148
|
credentials = Credentials.new credentials, scope: @config.scope
|
148
149
|
end
|
149
150
|
|
151
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
152
|
+
config.credentials = credentials
|
153
|
+
config.endpoint = @config.endpoint
|
154
|
+
end
|
155
|
+
|
150
156
|
@instance_groups_stub = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
151
157
|
end
|
152
158
|
|
159
|
+
##
|
160
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
161
|
+
#
|
162
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
163
|
+
#
|
164
|
+
attr_reader :zone_operations
|
165
|
+
|
153
166
|
# Service calls
|
154
167
|
|
155
168
|
##
|
@@ -183,10 +196,10 @@ module Google
|
|
183
196
|
# @param zone [::String]
|
184
197
|
# The name of the zone where the instance group is located.
|
185
198
|
# @yield [result, response] Access the result along with the Faraday response object
|
186
|
-
# @yieldparam result [::Gapic::
|
199
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
187
200
|
# @yieldparam response [::Faraday::Response]
|
188
201
|
#
|
189
|
-
# @return [::Gapic::
|
202
|
+
# @return [::Gapic::GenericLRO::Operation]
|
190
203
|
#
|
191
204
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
192
205
|
def add_instances request, options = nil
|
@@ -213,7 +226,15 @@ module Google
|
|
213
226
|
metadata: @config.metadata
|
214
227
|
|
215
228
|
@instance_groups_stub.add_instances request, options do |result, response|
|
216
|
-
result = ::
|
229
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
230
|
+
operation: result,
|
231
|
+
client: zone_operations,
|
232
|
+
request_values: {
|
233
|
+
"project" => request.project,
|
234
|
+
"zone" => request.zone
|
235
|
+
},
|
236
|
+
options: options
|
237
|
+
)
|
217
238
|
yield result, response if block_given?
|
218
239
|
return result
|
219
240
|
end
|
@@ -325,10 +346,10 @@ module Google
|
|
325
346
|
# @param zone [::String]
|
326
347
|
# The name of the zone where the instance group is located.
|
327
348
|
# @yield [result, response] Access the result along with the Faraday response object
|
328
|
-
# @yieldparam result [::Gapic::
|
349
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
329
350
|
# @yieldparam response [::Faraday::Response]
|
330
351
|
#
|
331
|
-
# @return [::Gapic::
|
352
|
+
# @return [::Gapic::GenericLRO::Operation]
|
332
353
|
#
|
333
354
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
334
355
|
def delete request, options = nil
|
@@ -355,7 +376,15 @@ module Google
|
|
355
376
|
metadata: @config.metadata
|
356
377
|
|
357
378
|
@instance_groups_stub.delete request, options do |result, response|
|
358
|
-
result = ::
|
379
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
380
|
+
operation: result,
|
381
|
+
client: zone_operations,
|
382
|
+
request_values: {
|
383
|
+
"project" => request.project,
|
384
|
+
"zone" => request.zone
|
385
|
+
},
|
386
|
+
options: options
|
387
|
+
)
|
359
388
|
yield result, response if block_given?
|
360
389
|
return result
|
361
390
|
end
|
@@ -458,10 +487,10 @@ module Google
|
|
458
487
|
# @param zone [::String]
|
459
488
|
# The name of the zone where you want to create the instance group.
|
460
489
|
# @yield [result, response] Access the result along with the Faraday response object
|
461
|
-
# @yieldparam result [::Gapic::
|
490
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
462
491
|
# @yieldparam response [::Faraday::Response]
|
463
492
|
#
|
464
|
-
# @return [::Gapic::
|
493
|
+
# @return [::Gapic::GenericLRO::Operation]
|
465
494
|
#
|
466
495
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
467
496
|
def insert request, options = nil
|
@@ -488,7 +517,15 @@ module Google
|
|
488
517
|
metadata: @config.metadata
|
489
518
|
|
490
519
|
@instance_groups_stub.insert request, options do |result, response|
|
491
|
-
result = ::
|
520
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
521
|
+
operation: result,
|
522
|
+
client: zone_operations,
|
523
|
+
request_values: {
|
524
|
+
"project" => request.project,
|
525
|
+
"zone" => request.zone
|
526
|
+
},
|
527
|
+
options: options
|
528
|
+
)
|
492
529
|
yield result, response if block_given?
|
493
530
|
return result
|
494
531
|
end
|
@@ -680,10 +717,10 @@ module Google
|
|
680
717
|
# @param zone [::String]
|
681
718
|
# The name of the zone where the instance group is located.
|
682
719
|
# @yield [result, response] Access the result along with the Faraday response object
|
683
|
-
# @yieldparam result [::Gapic::
|
720
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
684
721
|
# @yieldparam response [::Faraday::Response]
|
685
722
|
#
|
686
|
-
# @return [::Gapic::
|
723
|
+
# @return [::Gapic::GenericLRO::Operation]
|
687
724
|
#
|
688
725
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
689
726
|
def remove_instances request, options = nil
|
@@ -710,7 +747,15 @@ module Google
|
|
710
747
|
metadata: @config.metadata
|
711
748
|
|
712
749
|
@instance_groups_stub.remove_instances request, options do |result, response|
|
713
|
-
result = ::
|
750
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
751
|
+
operation: result,
|
752
|
+
client: zone_operations,
|
753
|
+
request_values: {
|
754
|
+
"project" => request.project,
|
755
|
+
"zone" => request.zone
|
756
|
+
},
|
757
|
+
options: options
|
758
|
+
)
|
714
759
|
yield result, response if block_given?
|
715
760
|
return result
|
716
761
|
end
|
@@ -750,10 +795,10 @@ module Google
|
|
750
795
|
# @param zone [::String]
|
751
796
|
# The name of the zone where the instance group is located.
|
752
797
|
# @yield [result, response] Access the result along with the Faraday response object
|
753
|
-
# @yieldparam result [::Gapic::
|
798
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
754
799
|
# @yieldparam response [::Faraday::Response]
|
755
800
|
#
|
756
|
-
# @return [::Gapic::
|
801
|
+
# @return [::Gapic::GenericLRO::Operation]
|
757
802
|
#
|
758
803
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
759
804
|
def set_named_ports request, options = nil
|
@@ -780,7 +825,15 @@ module Google
|
|
780
825
|
metadata: @config.metadata
|
781
826
|
|
782
827
|
@instance_groups_stub.set_named_ports request, options do |result, response|
|
783
|
-
result = ::
|
828
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
829
|
+
operation: result,
|
830
|
+
client: zone_operations,
|
831
|
+
request_values: {
|
832
|
+
"project" => request.project,
|
833
|
+
"zone" => request.zone
|
834
|
+
},
|
835
|
+
options: options
|
836
|
+
)
|
784
837
|
yield result, response if block_given?
|
785
838
|
return result
|
786
839
|
end
|