google-cloud-compute-v1 1.5.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +74 -13
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +151 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +142 -23
- data/lib/google/cloud/compute/v1/compute_pb.rb +357 -0
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +37 -37
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +68 -8
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +58 -58
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +25 -25
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +132 -132
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +77 -16
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +72 -12
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +25 -25
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +32 -32
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +37 -37
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +19 -19
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +155 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +142 -21
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +36 -36
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +57 -57
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +50 -50
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/region_ssl_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +759 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +408 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +15 -15
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +21 -21
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +587 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +288 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +21 -21
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +28 -28
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +28 -28
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +80 -20
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +25 -25
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +86 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +69 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +32 -32
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +21 -21
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +31 -31
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +74 -13
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +22 -22
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +74 -13
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +0 -1
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1.rb +2 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +968 -39
- metadata +12 -2
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the UrlMaps service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -389,7 +389,7 @@ module Google
|
|
389
389
|
uri_method: :get,
|
390
390
|
uri_template: "/compute/v1/projects/{project}/aggregated/urlMaps",
|
391
391
|
matches: [
|
392
|
-
["project", %r{[^/]
|
392
|
+
["project", %r{^[^/]+/?$}, false]
|
393
393
|
]
|
394
394
|
)
|
395
395
|
transcoder.transcode request_pb
|
@@ -410,8 +410,8 @@ module Google
|
|
410
410
|
uri_method: :delete,
|
411
411
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps/{url_map}",
|
412
412
|
matches: [
|
413
|
-
["project", %r{[^/]
|
414
|
-
["url_map", %r{[^/]
|
413
|
+
["project", %r{^[^/]+/?$}, false],
|
414
|
+
["url_map", %r{^[^/]+/?$}, false]
|
415
415
|
]
|
416
416
|
)
|
417
417
|
transcoder.transcode request_pb
|
@@ -432,8 +432,8 @@ module Google
|
|
432
432
|
uri_method: :get,
|
433
433
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps/{url_map}",
|
434
434
|
matches: [
|
435
|
-
["project", %r{[^/]
|
436
|
-
["url_map", %r{[^/]
|
435
|
+
["project", %r{^[^/]+/?$}, false],
|
436
|
+
["url_map", %r{^[^/]+/?$}, false]
|
437
437
|
]
|
438
438
|
)
|
439
439
|
transcoder.transcode request_pb
|
@@ -455,7 +455,7 @@ module Google
|
|
455
455
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps",
|
456
456
|
body: "url_map_resource",
|
457
457
|
matches: [
|
458
|
-
["project", %r{[^/]
|
458
|
+
["project", %r{^[^/]+/?$}, false]
|
459
459
|
]
|
460
460
|
)
|
461
461
|
transcoder.transcode request_pb
|
@@ -477,8 +477,8 @@ module Google
|
|
477
477
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps/{url_map}/invalidateCache",
|
478
478
|
body: "cache_invalidation_rule_resource",
|
479
479
|
matches: [
|
480
|
-
["project", %r{[^/]
|
481
|
-
["url_map", %r{[^/]
|
480
|
+
["project", %r{^[^/]+/?$}, false],
|
481
|
+
["url_map", %r{^[^/]+/?$}, false]
|
482
482
|
]
|
483
483
|
)
|
484
484
|
transcoder.transcode request_pb
|
@@ -499,7 +499,7 @@ module Google
|
|
499
499
|
uri_method: :get,
|
500
500
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps",
|
501
501
|
matches: [
|
502
|
-
["project", %r{[^/]
|
502
|
+
["project", %r{^[^/]+/?$}, false]
|
503
503
|
]
|
504
504
|
)
|
505
505
|
transcoder.transcode request_pb
|
@@ -521,8 +521,8 @@ module Google
|
|
521
521
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps/{url_map}",
|
522
522
|
body: "url_map_resource",
|
523
523
|
matches: [
|
524
|
-
["project", %r{[^/]
|
525
|
-
["url_map", %r{[^/]
|
524
|
+
["project", %r{^[^/]+/?$}, false],
|
525
|
+
["url_map", %r{^[^/]+/?$}, false]
|
526
526
|
]
|
527
527
|
)
|
528
528
|
transcoder.transcode request_pb
|
@@ -544,8 +544,8 @@ module Google
|
|
544
544
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps/{url_map}",
|
545
545
|
body: "url_map_resource",
|
546
546
|
matches: [
|
547
|
-
["project", %r{[^/]
|
548
|
-
["url_map", %r{[^/]
|
547
|
+
["project", %r{^[^/]+/?$}, false],
|
548
|
+
["url_map", %r{^[^/]+/?$}, false]
|
549
549
|
]
|
550
550
|
)
|
551
551
|
transcoder.transcode request_pb
|
@@ -567,8 +567,8 @@ module Google
|
|
567
567
|
uri_template: "/compute/v1/projects/{project}/global/urlMaps/{url_map}/validate",
|
568
568
|
body: "url_maps_validate_request_resource",
|
569
569
|
matches: [
|
570
|
-
["project", %r{[^/]
|
571
|
-
["url_map", %r{[^/]
|
570
|
+
["project", %r{^[^/]+/?$}, false],
|
571
|
+
["url_map", %r{^[^/]+/?$}, false]
|
572
572
|
]
|
573
573
|
)
|
574
574
|
transcoder.transcode request_pb
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the VpnGateways service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -352,7 +352,7 @@ module Google
|
|
352
352
|
uri_method: :get,
|
353
353
|
uri_template: "/compute/v1/projects/{project}/aggregated/vpnGateways",
|
354
354
|
matches: [
|
355
|
-
["project", %r{[^/]
|
355
|
+
["project", %r{^[^/]+/?$}, false]
|
356
356
|
]
|
357
357
|
)
|
358
358
|
transcoder.transcode request_pb
|
@@ -373,9 +373,9 @@ module Google
|
|
373
373
|
uri_method: :delete,
|
374
374
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}",
|
375
375
|
matches: [
|
376
|
-
["project", %r{[^/]
|
377
|
-
["region", %r{[^/]
|
378
|
-
["vpn_gateway", %r{[^/]
|
376
|
+
["project", %r{^[^/]+/?$}, false],
|
377
|
+
["region", %r{^[^/]+/?$}, false],
|
378
|
+
["vpn_gateway", %r{^[^/]+/?$}, false]
|
379
379
|
]
|
380
380
|
)
|
381
381
|
transcoder.transcode request_pb
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
uri_method: :get,
|
397
397
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}",
|
398
398
|
matches: [
|
399
|
-
["project", %r{[^/]
|
400
|
-
["region", %r{[^/]
|
401
|
-
["vpn_gateway", %r{[^/]
|
399
|
+
["project", %r{^[^/]+/?$}, false],
|
400
|
+
["region", %r{^[^/]+/?$}, false],
|
401
|
+
["vpn_gateway", %r{^[^/]+/?$}, false]
|
402
402
|
]
|
403
403
|
)
|
404
404
|
transcoder.transcode request_pb
|
@@ -419,9 +419,9 @@ module Google
|
|
419
419
|
uri_method: :get,
|
420
420
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways/{vpn_gateway}/getStatus",
|
421
421
|
matches: [
|
422
|
-
["project", %r{[^/]
|
423
|
-
["region", %r{[^/]
|
424
|
-
["vpn_gateway", %r{[^/]
|
422
|
+
["project", %r{^[^/]+/?$}, false],
|
423
|
+
["region", %r{^[^/]+/?$}, false],
|
424
|
+
["vpn_gateway", %r{^[^/]+/?$}, false]
|
425
425
|
]
|
426
426
|
)
|
427
427
|
transcoder.transcode request_pb
|
@@ -443,8 +443,8 @@ module Google
|
|
443
443
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways",
|
444
444
|
body: "vpn_gateway_resource",
|
445
445
|
matches: [
|
446
|
-
["project", %r{[^/]
|
447
|
-
["region", %r{[^/]
|
446
|
+
["project", %r{^[^/]+/?$}, false],
|
447
|
+
["region", %r{^[^/]+/?$}, false]
|
448
448
|
]
|
449
449
|
)
|
450
450
|
transcoder.transcode request_pb
|
@@ -465,8 +465,8 @@ module Google
|
|
465
465
|
uri_method: :get,
|
466
466
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways",
|
467
467
|
matches: [
|
468
|
-
["project", %r{[^/]
|
469
|
-
["region", %r{[^/]
|
468
|
+
["project", %r{^[^/]+/?$}, false],
|
469
|
+
["region", %r{^[^/]+/?$}, false]
|
470
470
|
]
|
471
471
|
)
|
472
472
|
transcoder.transcode request_pb
|
@@ -488,9 +488,9 @@ module Google
|
|
488
488
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels",
|
489
489
|
body: "region_set_labels_request_resource",
|
490
490
|
matches: [
|
491
|
-
["project", %r{[^/]
|
492
|
-
["region", %r{[^/]
|
493
|
-
["resource", %r{[^/]
|
491
|
+
["project", %r{^[^/]+/?$}, false],
|
492
|
+
["region", %r{^[^/]+/?$}, false],
|
493
|
+
["resource", %r{^[^/]+/?$}, false]
|
494
494
|
]
|
495
495
|
)
|
496
496
|
transcoder.transcode request_pb
|
@@ -512,9 +512,9 @@ module Google
|
|
512
512
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions",
|
513
513
|
body: "test_permissions_request_resource",
|
514
514
|
matches: [
|
515
|
-
["project", %r{[^/]
|
516
|
-
["region", %r{[^/]
|
517
|
-
["resource", %r{[^/]
|
515
|
+
["project", %r{^[^/]+/?$}, false],
|
516
|
+
["region", %r{^[^/]+/?$}, false],
|
517
|
+
["resource", %r{^[^/]+/?$}, false]
|
518
518
|
]
|
519
519
|
)
|
520
520
|
transcoder.transcode request_pb
|
@@ -84,6 +84,8 @@ module Google
|
|
84
84
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
85
|
}
|
86
86
|
|
87
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
88
|
+
|
87
89
|
default_config
|
88
90
|
end
|
89
91
|
yield @configure if block_given?
|
@@ -522,6 +524,84 @@ module Google
|
|
522
524
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
523
525
|
end
|
524
526
|
|
527
|
+
##
|
528
|
+
# Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.
|
529
|
+
#
|
530
|
+
# @overload set_labels(request, options = nil)
|
531
|
+
# Pass arguments to `set_labels` via a request object, either of type
|
532
|
+
# {::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest} or an equivalent Hash.
|
533
|
+
#
|
534
|
+
# @param request [::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest, ::Hash]
|
535
|
+
# A request object representing the call parameters. Required. To specify no
|
536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
538
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
539
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
540
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
541
|
+
#
|
542
|
+
# @overload set_labels(project: nil, region: nil, region_set_labels_request_resource: nil, request_id: nil, resource: nil)
|
543
|
+
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
544
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
545
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
546
|
+
#
|
547
|
+
# @param project [::String]
|
548
|
+
# Project ID for this request.
|
549
|
+
# @param region [::String]
|
550
|
+
# The region for this request.
|
551
|
+
# @param region_set_labels_request_resource [::Google::Cloud::Compute::V1::RegionSetLabelsRequest, ::Hash]
|
552
|
+
# The body resource for this request
|
553
|
+
# @param request_id [::String]
|
554
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
555
|
+
# @param resource [::String]
|
556
|
+
# Name or id of the resource for this request.
|
557
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
558
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
559
|
+
# @yieldparam response [::Faraday::Response]
|
560
|
+
#
|
561
|
+
# @return [::Gapic::GenericLRO::Operation]
|
562
|
+
#
|
563
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
564
|
+
def set_labels request, options = nil
|
565
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
566
|
+
|
567
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest
|
568
|
+
|
569
|
+
# Converts hash and nil to an options object
|
570
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
571
|
+
|
572
|
+
# Customize the options with defaults
|
573
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
574
|
+
|
575
|
+
# Set x-goog-api-client header
|
576
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
577
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
578
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
579
|
+
transports_version_send: [:rest]
|
580
|
+
|
581
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
582
|
+
metadata: call_metadata
|
583
|
+
|
584
|
+
options.apply_defaults timeout: @config.timeout,
|
585
|
+
metadata: @config.metadata
|
586
|
+
|
587
|
+
@vpn_tunnels_stub.set_labels request, options do |result, response|
|
588
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
589
|
+
operation: result,
|
590
|
+
client: region_operations,
|
591
|
+
request_values: {
|
592
|
+
"project" => request.project,
|
593
|
+
"region" => request.region
|
594
|
+
},
|
595
|
+
options: options
|
596
|
+
)
|
597
|
+
yield result, response if block_given?
|
598
|
+
return result
|
599
|
+
end
|
600
|
+
rescue ::Faraday::Error => e
|
601
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
602
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
603
|
+
end
|
604
|
+
|
525
605
|
##
|
526
606
|
# Configuration class for the VpnTunnels REST API.
|
527
607
|
#
|
@@ -646,6 +726,11 @@ module Google
|
|
646
726
|
# @return [::Gapic::Config::Method]
|
647
727
|
#
|
648
728
|
attr_reader :list
|
729
|
+
##
|
730
|
+
# RPC-specific configuration for `set_labels`
|
731
|
+
# @return [::Gapic::Config::Method]
|
732
|
+
#
|
733
|
+
attr_reader :set_labels
|
649
734
|
|
650
735
|
# @private
|
651
736
|
def initialize parent_rpcs = nil
|
@@ -659,6 +744,8 @@ module Google
|
|
659
744
|
@insert = ::Gapic::Config::Method.new insert_config
|
660
745
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
661
746
|
@list = ::Gapic::Config::Method.new list_config
|
747
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
748
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
662
749
|
|
663
750
|
yield self if block_given?
|
664
751
|
end
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the VpnTunnels service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -223,6 +223,43 @@ module Google
|
|
223
223
|
result
|
224
224
|
end
|
225
225
|
|
226
|
+
##
|
227
|
+
# Baseline implementation for the set_labels REST call
|
228
|
+
#
|
229
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest]
|
230
|
+
# A request object representing the call parameters. Required.
|
231
|
+
# @param options [::Gapic::CallOptions]
|
232
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
233
|
+
#
|
234
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
235
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
236
|
+
# @yieldparam response [::Faraday::Response]
|
237
|
+
#
|
238
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
239
|
+
# A result object deserialized from the server's reply
|
240
|
+
def set_labels request_pb, options = nil
|
241
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
242
|
+
|
243
|
+
verb, uri, query_string_params, body = transcode_set_labels_request request_pb
|
244
|
+
query_string_params = if query_string_params.any?
|
245
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
246
|
+
else
|
247
|
+
{}
|
248
|
+
end
|
249
|
+
|
250
|
+
response = @client_stub.make_http_request(
|
251
|
+
verb,
|
252
|
+
uri: uri,
|
253
|
+
body: body || "",
|
254
|
+
params: query_string_params,
|
255
|
+
options: options
|
256
|
+
)
|
257
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
258
|
+
|
259
|
+
yield result, response if block_given?
|
260
|
+
result
|
261
|
+
end
|
262
|
+
|
226
263
|
|
227
264
|
private
|
228
265
|
|
@@ -241,7 +278,7 @@ module Google
|
|
241
278
|
uri_method: :get,
|
242
279
|
uri_template: "/compute/v1/projects/{project}/aggregated/vpnTunnels",
|
243
280
|
matches: [
|
244
|
-
["project", %r{[^/]
|
281
|
+
["project", %r{^[^/]+/?$}, false]
|
245
282
|
]
|
246
283
|
)
|
247
284
|
transcoder.transcode request_pb
|
@@ -262,9 +299,9 @@ module Google
|
|
262
299
|
uri_method: :delete,
|
263
300
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{vpn_tunnel}",
|
264
301
|
matches: [
|
265
|
-
["project", %r{[^/]
|
266
|
-
["region", %r{[^/]
|
267
|
-
["vpn_tunnel", %r{[^/]
|
302
|
+
["project", %r{^[^/]+/?$}, false],
|
303
|
+
["region", %r{^[^/]+/?$}, false],
|
304
|
+
["vpn_tunnel", %r{^[^/]+/?$}, false]
|
268
305
|
]
|
269
306
|
)
|
270
307
|
transcoder.transcode request_pb
|
@@ -285,9 +322,9 @@ module Google
|
|
285
322
|
uri_method: :get,
|
286
323
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{vpn_tunnel}",
|
287
324
|
matches: [
|
288
|
-
["project", %r{[^/]
|
289
|
-
["region", %r{[^/]
|
290
|
-
["vpn_tunnel", %r{[^/]
|
325
|
+
["project", %r{^[^/]+/?$}, false],
|
326
|
+
["region", %r{^[^/]+/?$}, false],
|
327
|
+
["vpn_tunnel", %r{^[^/]+/?$}, false]
|
291
328
|
]
|
292
329
|
)
|
293
330
|
transcoder.transcode request_pb
|
@@ -309,8 +346,8 @@ module Google
|
|
309
346
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnTunnels",
|
310
347
|
body: "vpn_tunnel_resource",
|
311
348
|
matches: [
|
312
|
-
["project", %r{[^/]
|
313
|
-
["region", %r{[^/]
|
349
|
+
["project", %r{^[^/]+/?$}, false],
|
350
|
+
["region", %r{^[^/]+/?$}, false]
|
314
351
|
]
|
315
352
|
)
|
316
353
|
transcoder.transcode request_pb
|
@@ -331,8 +368,32 @@ module Google
|
|
331
368
|
uri_method: :get,
|
332
369
|
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnTunnels",
|
333
370
|
matches: [
|
334
|
-
["project", %r{[^/]
|
335
|
-
["region", %r{[^/]
|
371
|
+
["project", %r{^[^/]+/?$}, false],
|
372
|
+
["region", %r{^[^/]+/?$}, false]
|
373
|
+
]
|
374
|
+
)
|
375
|
+
transcoder.transcode request_pb
|
376
|
+
end
|
377
|
+
|
378
|
+
##
|
379
|
+
# @private
|
380
|
+
#
|
381
|
+
# GRPC transcoding helper method for the set_labels REST call
|
382
|
+
#
|
383
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest]
|
384
|
+
# A request object representing the call parameters. Required.
|
385
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
386
|
+
# Uri, Body, Query string parameters
|
387
|
+
def transcode_set_labels_request request_pb
|
388
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
389
|
+
.with_bindings(
|
390
|
+
uri_method: :post,
|
391
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels",
|
392
|
+
body: "region_set_labels_request_resource",
|
393
|
+
matches: [
|
394
|
+
["project", %r{^[^/]+/?$}, false],
|
395
|
+
["region", %r{^[^/]+/?$}, false],
|
396
|
+
["resource", %r{^[^/]+/?$}, false]
|
336
397
|
]
|
337
398
|
)
|
338
399
|
transcoder.transcode request_pb
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the ZoneOperations service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -204,9 +204,9 @@ module Google
|
|
204
204
|
uri_method: :delete,
|
205
205
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/operations/{operation}",
|
206
206
|
matches: [
|
207
|
-
["project", %r{[^/]
|
208
|
-
["zone", %r{[^/]
|
209
|
-
["operation", %r{[^/]
|
207
|
+
["project", %r{^[^/]+/?$}, false],
|
208
|
+
["zone", %r{^[^/]+/?$}, false],
|
209
|
+
["operation", %r{^[^/]+/?$}, false]
|
210
210
|
]
|
211
211
|
)
|
212
212
|
transcoder.transcode request_pb
|
@@ -227,9 +227,9 @@ module Google
|
|
227
227
|
uri_method: :get,
|
228
228
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/operations/{operation}",
|
229
229
|
matches: [
|
230
|
-
["project", %r{[^/]
|
231
|
-
["zone", %r{[^/]
|
232
|
-
["operation", %r{[^/]
|
230
|
+
["project", %r{^[^/]+/?$}, false],
|
231
|
+
["zone", %r{^[^/]+/?$}, false],
|
232
|
+
["operation", %r{^[^/]+/?$}, false]
|
233
233
|
]
|
234
234
|
)
|
235
235
|
transcoder.transcode request_pb
|
@@ -250,8 +250,8 @@ module Google
|
|
250
250
|
uri_method: :get,
|
251
251
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/operations",
|
252
252
|
matches: [
|
253
|
-
["project", %r{[^/]
|
254
|
-
["zone", %r{[^/]
|
253
|
+
["project", %r{^[^/]+/?$}, false],
|
254
|
+
["zone", %r{^[^/]+/?$}, false]
|
255
255
|
]
|
256
256
|
)
|
257
257
|
transcoder.transcode request_pb
|
@@ -272,9 +272,9 @@ module Google
|
|
272
272
|
uri_method: :post,
|
273
273
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}/operations/{operation}/wait",
|
274
274
|
matches: [
|
275
|
-
["project", %r{[^/]
|
276
|
-
["zone", %r{[^/]
|
277
|
-
["operation", %r{[^/]
|
275
|
+
["project", %r{^[^/]+/?$}, false],
|
276
|
+
["zone", %r{^[^/]+/?$}, false],
|
277
|
+
["operation", %r{^[^/]+/?$}, false]
|
278
278
|
]
|
279
279
|
)
|
280
280
|
transcoder.transcode request_pb
|
@@ -22,7 +22,6 @@ require "gapic/config/method"
|
|
22
22
|
require "google/cloud/compute/v1/version"
|
23
23
|
|
24
24
|
require "google/cloud/compute/v1/zone_operations/credentials"
|
25
|
-
require "google/cloud/compute/v1/zone_operations/rest/nonstandard_lro"
|
26
25
|
require "google/cloud/compute/v1/zone_operations/rest"
|
27
26
|
|
28
27
|
module Google
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
##
|
28
28
|
# REST service stub for the Zones service.
|
29
|
-
#
|
30
|
-
# including transcoding, making the REST call and deserialing the response
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
33
|
def initialize endpoint:, credentials:
|
@@ -130,8 +130,8 @@ module Google
|
|
130
130
|
uri_method: :get,
|
131
131
|
uri_template: "/compute/v1/projects/{project}/zones/{zone}",
|
132
132
|
matches: [
|
133
|
-
["project", %r{[^/]
|
134
|
-
["zone", %r{[^/]
|
133
|
+
["project", %r{^[^/]+/?$}, false],
|
134
|
+
["zone", %r{^[^/]+/?$}, false]
|
135
135
|
]
|
136
136
|
)
|
137
137
|
transcoder.transcode request_pb
|
@@ -152,7 +152,7 @@ module Google
|
|
152
152
|
uri_method: :get,
|
153
153
|
uri_template: "/compute/v1/projects/{project}/zones",
|
154
154
|
matches: [
|
155
|
-
["project", %r{[^/]
|
155
|
+
["project", %r{^[^/]+/?$}, false]
|
156
156
|
]
|
157
157
|
)
|
158
158
|
transcoder.transcode request_pb
|
@@ -74,8 +74,10 @@ require "google/cloud/compute/v1/region_notification_endpoints"
|
|
74
74
|
require "google/cloud/compute/v1/region_operations"
|
75
75
|
require "google/cloud/compute/v1/region_security_policies"
|
76
76
|
require "google/cloud/compute/v1/region_ssl_certificates"
|
77
|
+
require "google/cloud/compute/v1/region_ssl_policies"
|
77
78
|
require "google/cloud/compute/v1/region_target_http_proxies"
|
78
79
|
require "google/cloud/compute/v1/region_target_https_proxies"
|
80
|
+
require "google/cloud/compute/v1/region_target_tcp_proxies"
|
79
81
|
require "google/cloud/compute/v1/region_url_maps"
|
80
82
|
require "google/cloud/compute/v1/regions"
|
81
83
|
require "google/cloud/compute/v1/reservations"
|