google-cloud-compute-v1 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +12 -12
- data/README.md +4 -30
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +373 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +228 -143
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +294 -187
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +816 -135
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +334 -213
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +644 -0
- data/lib/google/cloud/compute/v1/disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +180 -107
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +317 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +463 -280
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/firewalls/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +292 -127
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +417 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +259 -112
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +207 -128
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +370 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +159 -88
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +274 -0
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +116 -64
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +186 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +170 -97
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +284 -174
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
- data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +497 -328
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +255 -161
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +198 -117
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +1079 -609
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1975 -0
- data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +188 -112
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +184 -108
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
- data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +91 -48
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
- data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +198 -117
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +251 -157
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +349 -173
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +333 -211
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
- data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +223 -132
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +206 -124
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +338 -219
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
- data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +170 -97
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +196 -112
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +203 -125
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +145 -82
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +309 -198
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
- data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +472 -313
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +143 -84
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +75 -40
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +134 -73
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +203 -125
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +245 -148
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
- data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +223 -132
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +274 -166
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
- data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +270 -166
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
- data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +197 -115
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
- data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +185 -110
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +314 -195
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +334 -159
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -188
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
- data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +229 -145
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +250 -156
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
- data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +227 -135
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +134 -73
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
- data/lib/google/cloud/compute/v1.rb +5 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +2526 -640
- metadata +84 -8
@@ -16,8 +16,6 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
-
require "gapic/rest"
|
20
|
-
require "google/cloud/compute/v1/instance_group_managers/rest/grpc_transcoding"
|
21
19
|
require "google/cloud/compute/v1/instance_group_managers/rest/client"
|
22
20
|
|
23
21
|
module Google
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
|
+
require "google/cloud/compute/v1/instance_groups/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The InstanceGroups API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :instance_groups_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all InstanceGroups clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all InstanceGroups clients
|
47
|
+
# ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
52
50
|
#
|
53
51
|
# @yield [config] Configure the Client client.
|
54
52
|
# @yieldparam config [Client::Configuration]
|
@@ -66,6 +64,33 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.add_instances.timeout = 600.0
|
68
|
+
|
69
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
70
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
71
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
72
|
+
}
|
73
|
+
|
74
|
+
default_config.rpcs.delete.timeout = 600.0
|
75
|
+
|
76
|
+
default_config.rpcs.get.timeout = 600.0
|
77
|
+
default_config.rpcs.get.retry_policy = {
|
78
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
79
|
+
}
|
80
|
+
|
81
|
+
default_config.rpcs.insert.timeout = 600.0
|
82
|
+
|
83
|
+
default_config.rpcs.list.timeout = 600.0
|
84
|
+
default_config.rpcs.list.retry_policy = {
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.list_instances.timeout = 600.0
|
89
|
+
|
90
|
+
default_config.rpcs.remove_instances.timeout = 600.0
|
91
|
+
|
92
|
+
default_config.rpcs.set_named_ports.timeout = 600.0
|
93
|
+
|
69
94
|
default_config
|
70
95
|
end
|
71
96
|
yield @configure if block_given?
|
@@ -95,28 +120,20 @@ module Google
|
|
95
120
|
##
|
96
121
|
# Create a new InstanceGroups REST client object.
|
97
122
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new InstanceGroups REST client with the default
|
101
|
-
# configuration:
|
123
|
+
# @example
|
102
124
|
#
|
103
|
-
#
|
125
|
+
# # Create a client using the default configuration
|
126
|
+
# client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new
|
104
127
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
128
|
+
# # Create a client using a custom configuration
|
129
|
+
# client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new do |config|
|
130
|
+
# config.timeout = 10.0
|
131
|
+
# end
|
111
132
|
#
|
112
133
|
# @yield [config] Configure the InstanceGroups client.
|
113
134
|
# @yieldparam config [Client::Configuration]
|
114
135
|
#
|
115
136
|
def initialize
|
116
|
-
# These require statements are intentionally placed here to initialize
|
117
|
-
# the REST modules only when it's required.
|
118
|
-
require "gapic/rest"
|
119
|
-
|
120
137
|
# Create the configuration object
|
121
138
|
@config = Configuration.new Client.configure
|
122
139
|
|
@@ -126,11 +143,11 @@ module Google
|
|
126
143
|
# Create credentials
|
127
144
|
credentials = @config.credentials
|
128
145
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
146
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
147
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
148
|
end
|
132
149
|
|
133
|
-
@
|
150
|
+
@instance_groups_stub = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
151
|
end
|
135
152
|
|
136
153
|
# Service calls
|
@@ -169,11 +186,11 @@ module Google
|
|
169
186
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
170
187
|
# @param zone [::String]
|
171
188
|
# The name of the zone where the instance group is located.
|
172
|
-
# @yield [result,
|
173
|
-
# @yieldparam result [::
|
189
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
190
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
174
191
|
# @yieldparam response [::Faraday::Response]
|
175
192
|
#
|
176
|
-
# @return [::
|
193
|
+
# @return [::Gapic::Rest::BaseOperation]
|
177
194
|
#
|
178
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
179
196
|
def add_instances request, options = nil
|
@@ -185,7 +202,7 @@ module Google
|
|
185
202
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
186
203
|
|
187
204
|
# Customize the options with defaults
|
188
|
-
call_metadata =
|
205
|
+
call_metadata = @config.rpcs.add_instances.metadata.to_h
|
189
206
|
|
190
207
|
# Set x-goog-api-client header
|
191
208
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -193,20 +210,17 @@ module Google
|
|
193
210
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
194
211
|
transports_version_send: [:rest]
|
195
212
|
|
196
|
-
options.apply_defaults timeout: @config.timeout,
|
213
|
+
options.apply_defaults timeout: @config.rpcs.add_instances.timeout,
|
197
214
|
metadata: call_metadata
|
198
215
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
yield result, response if block_given?
|
209
|
-
result
|
216
|
+
options.apply_defaults timeout: @config.timeout,
|
217
|
+
metadata: @config.metadata
|
218
|
+
|
219
|
+
@instance_groups_stub.add_instances request, options do |result, response|
|
220
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
221
|
+
yield result, response if block_given?
|
222
|
+
return result
|
223
|
+
end
|
210
224
|
rescue ::Faraday::Error => e
|
211
225
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
212
226
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -255,12 +269,12 @@ module Google
|
|
255
269
|
# @param project [::String]
|
256
270
|
# Project ID for this request.
|
257
271
|
# @param return_partial_success [::Boolean]
|
258
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
259
|
-
# @yield [result,
|
260
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
272
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
273
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
274
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstanceGroupsScopedList>]
|
261
275
|
# @yieldparam response [::Faraday::Response]
|
262
276
|
#
|
263
|
-
# @return [::Google::Cloud::Compute::V1::
|
277
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstanceGroupsScopedList>]
|
264
278
|
#
|
265
279
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
266
280
|
def aggregated_list request, options = nil
|
@@ -272,7 +286,7 @@ module Google
|
|
272
286
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
273
287
|
|
274
288
|
# Customize the options with defaults
|
275
|
-
call_metadata =
|
289
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
276
290
|
|
277
291
|
# Set x-goog-api-client header
|
278
292
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -280,19 +294,17 @@ module Google
|
|
280
294
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
281
295
|
transports_version_send: [:rest]
|
282
296
|
|
283
|
-
options.apply_defaults timeout: @config.timeout,
|
297
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
284
298
|
metadata: call_metadata
|
285
299
|
|
286
|
-
|
287
|
-
|
288
|
-
uri: uri,
|
289
|
-
params: query_string_params,
|
290
|
-
options: options
|
291
|
-
)
|
292
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
300
|
+
options.apply_defaults timeout: @config.timeout,
|
301
|
+
metadata: @config.metadata
|
293
302
|
|
294
|
-
|
295
|
-
|
303
|
+
@instance_groups_stub.aggregated_list request, options do |result, response|
|
304
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_groups_stub, :aggregated_list, "items", request, result, options
|
305
|
+
yield result, response if block_given?
|
306
|
+
return result
|
307
|
+
end
|
296
308
|
rescue ::Faraday::Error => e
|
297
309
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
298
310
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -330,11 +342,11 @@ module Google
|
|
330
342
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
331
343
|
# @param zone [::String]
|
332
344
|
# The name of the zone where the instance group is located.
|
333
|
-
# @yield [result,
|
334
|
-
# @yieldparam result [::
|
345
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
346
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
335
347
|
# @yieldparam response [::Faraday::Response]
|
336
348
|
#
|
337
|
-
# @return [::
|
349
|
+
# @return [::Gapic::Rest::BaseOperation]
|
338
350
|
#
|
339
351
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
340
352
|
def delete request, options = nil
|
@@ -346,7 +358,7 @@ module Google
|
|
346
358
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
347
359
|
|
348
360
|
# Customize the options with defaults
|
349
|
-
call_metadata =
|
361
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
350
362
|
|
351
363
|
# Set x-goog-api-client header
|
352
364
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -354,19 +366,17 @@ module Google
|
|
354
366
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
355
367
|
transports_version_send: [:rest]
|
356
368
|
|
357
|
-
options.apply_defaults timeout: @config.timeout,
|
369
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
358
370
|
metadata: call_metadata
|
359
371
|
|
360
|
-
|
361
|
-
|
362
|
-
uri: uri,
|
363
|
-
params: query_string_params,
|
364
|
-
options: options
|
365
|
-
)
|
366
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
372
|
+
options.apply_defaults timeout: @config.timeout,
|
373
|
+
metadata: @config.metadata
|
367
374
|
|
368
|
-
|
369
|
-
|
375
|
+
@instance_groups_stub.delete request, options do |result, response|
|
376
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
377
|
+
yield result, response if block_given?
|
378
|
+
return result
|
379
|
+
end
|
370
380
|
rescue ::Faraday::Error => e
|
371
381
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
372
382
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -400,7 +410,7 @@ module Google
|
|
400
410
|
# Project ID for this request.
|
401
411
|
# @param zone [::String]
|
402
412
|
# The name of the zone where the instance group is located.
|
403
|
-
# @yield [result,
|
413
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
404
414
|
# @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroup]
|
405
415
|
# @yieldparam response [::Faraday::Response]
|
406
416
|
#
|
@@ -416,7 +426,7 @@ module Google
|
|
416
426
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
417
427
|
|
418
428
|
# Customize the options with defaults
|
419
|
-
call_metadata =
|
429
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
420
430
|
|
421
431
|
# Set x-goog-api-client header
|
422
432
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -424,18 +434,16 @@ module Google
|
|
424
434
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
425
435
|
transports_version_send: [:rest]
|
426
436
|
|
427
|
-
options.apply_defaults timeout: @config.timeout,
|
437
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
428
438
|
metadata: call_metadata
|
429
439
|
|
430
|
-
|
431
|
-
|
432
|
-
uri: uri,
|
433
|
-
options: options
|
434
|
-
)
|
435
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroup.decode_json response.body, ignore_unknown_fields: true
|
440
|
+
options.apply_defaults timeout: @config.timeout,
|
441
|
+
metadata: @config.metadata
|
436
442
|
|
437
|
-
|
438
|
-
|
443
|
+
@instance_groups_stub.get request, options do |result, response|
|
444
|
+
yield result, response if block_given?
|
445
|
+
return result
|
446
|
+
end
|
439
447
|
rescue ::Faraday::Error => e
|
440
448
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
441
449
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -473,11 +481,11 @@ module Google
|
|
473
481
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
474
482
|
# @param zone [::String]
|
475
483
|
# The name of the zone where you want to create the instance group.
|
476
|
-
# @yield [result,
|
477
|
-
# @yieldparam result [::
|
484
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
485
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
478
486
|
# @yieldparam response [::Faraday::Response]
|
479
487
|
#
|
480
|
-
# @return [::
|
488
|
+
# @return [::Gapic::Rest::BaseOperation]
|
481
489
|
#
|
482
490
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
483
491
|
def insert request, options = nil
|
@@ -489,7 +497,7 @@ module Google
|
|
489
497
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
490
498
|
|
491
499
|
# Customize the options with defaults
|
492
|
-
call_metadata =
|
500
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
493
501
|
|
494
502
|
# Set x-goog-api-client header
|
495
503
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -497,20 +505,17 @@ module Google
|
|
497
505
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
498
506
|
transports_version_send: [:rest]
|
499
507
|
|
500
|
-
options.apply_defaults timeout: @config.timeout,
|
508
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
501
509
|
metadata: call_metadata
|
502
510
|
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
yield result, response if block_given?
|
513
|
-
result
|
511
|
+
options.apply_defaults timeout: @config.timeout,
|
512
|
+
metadata: @config.metadata
|
513
|
+
|
514
|
+
@instance_groups_stub.insert request, options do |result, response|
|
515
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
516
|
+
yield result, response if block_given?
|
517
|
+
return result
|
518
|
+
end
|
514
519
|
rescue ::Faraday::Error => e
|
515
520
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
516
521
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -559,14 +564,14 @@ module Google
|
|
559
564
|
# @param project [::String]
|
560
565
|
# Project ID for this request.
|
561
566
|
# @param return_partial_success [::Boolean]
|
562
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
567
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
563
568
|
# @param zone [::String]
|
564
569
|
# The name of the zone where the instance group is located.
|
565
|
-
# @yield [result,
|
566
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
570
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
571
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroup>]
|
567
572
|
# @yieldparam response [::Faraday::Response]
|
568
573
|
#
|
569
|
-
# @return [::Google::Cloud::Compute::V1::
|
574
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroup>]
|
570
575
|
#
|
571
576
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
572
577
|
def list request, options = nil
|
@@ -578,7 +583,7 @@ module Google
|
|
578
583
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
579
584
|
|
580
585
|
# Customize the options with defaults
|
581
|
-
call_metadata =
|
586
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
582
587
|
|
583
588
|
# Set x-goog-api-client header
|
584
589
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -586,19 +591,17 @@ module Google
|
|
586
591
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
587
592
|
transports_version_send: [:rest]
|
588
593
|
|
589
|
-
options.apply_defaults timeout: @config.timeout,
|
594
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
590
595
|
metadata: call_metadata
|
591
596
|
|
592
|
-
|
593
|
-
|
594
|
-
uri: uri,
|
595
|
-
params: query_string_params,
|
596
|
-
options: options
|
597
|
-
)
|
598
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupList.decode_json response.body, ignore_unknown_fields: true
|
597
|
+
options.apply_defaults timeout: @config.timeout,
|
598
|
+
metadata: @config.metadata
|
599
599
|
|
600
|
-
|
601
|
-
|
600
|
+
@instance_groups_stub.list request, options do |result, response|
|
601
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_groups_stub, :list, "items", request, result, options
|
602
|
+
yield result, response if block_given?
|
603
|
+
return result
|
604
|
+
end
|
602
605
|
rescue ::Faraday::Error => e
|
603
606
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
604
607
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -649,14 +652,14 @@ module Google
|
|
649
652
|
# @param project [::String]
|
650
653
|
# Project ID for this request.
|
651
654
|
# @param return_partial_success [::Boolean]
|
652
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
655
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
653
656
|
# @param zone [::String]
|
654
657
|
# The name of the zone where the instance group is located.
|
655
|
-
# @yield [result,
|
656
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
658
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
659
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceWithNamedPorts>]
|
657
660
|
# @yieldparam response [::Faraday::Response]
|
658
661
|
#
|
659
|
-
# @return [::Google::Cloud::Compute::V1::
|
662
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceWithNamedPorts>]
|
660
663
|
#
|
661
664
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
662
665
|
def list_instances request, options = nil
|
@@ -668,7 +671,7 @@ module Google
|
|
668
671
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
669
672
|
|
670
673
|
# Customize the options with defaults
|
671
|
-
call_metadata =
|
674
|
+
call_metadata = @config.rpcs.list_instances.metadata.to_h
|
672
675
|
|
673
676
|
# Set x-goog-api-client header
|
674
677
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -676,20 +679,17 @@ module Google
|
|
676
679
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
677
680
|
transports_version_send: [:rest]
|
678
681
|
|
679
|
-
options.apply_defaults timeout: @config.timeout,
|
682
|
+
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
680
683
|
metadata: call_metadata
|
681
684
|
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
yield result, response if block_given?
|
692
|
-
result
|
685
|
+
options.apply_defaults timeout: @config.timeout,
|
686
|
+
metadata: @config.metadata
|
687
|
+
|
688
|
+
@instance_groups_stub.list_instances request, options do |result, response|
|
689
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_groups_stub, :list_instances, "items", request, result, options
|
690
|
+
yield result, response if block_given?
|
691
|
+
return result
|
692
|
+
end
|
693
693
|
rescue ::Faraday::Error => e
|
694
694
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
695
695
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -731,11 +731,11 @@ module Google
|
|
731
731
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
732
732
|
# @param zone [::String]
|
733
733
|
# The name of the zone where the instance group is located.
|
734
|
-
# @yield [result,
|
735
|
-
# @yieldparam result [::
|
734
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
735
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
736
736
|
# @yieldparam response [::Faraday::Response]
|
737
737
|
#
|
738
|
-
# @return [::
|
738
|
+
# @return [::Gapic::Rest::BaseOperation]
|
739
739
|
#
|
740
740
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
741
741
|
def remove_instances request, options = nil
|
@@ -747,7 +747,7 @@ module Google
|
|
747
747
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
748
748
|
|
749
749
|
# Customize the options with defaults
|
750
|
-
call_metadata =
|
750
|
+
call_metadata = @config.rpcs.remove_instances.metadata.to_h
|
751
751
|
|
752
752
|
# Set x-goog-api-client header
|
753
753
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -755,20 +755,17 @@ module Google
|
|
755
755
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
756
756
|
transports_version_send: [:rest]
|
757
757
|
|
758
|
-
options.apply_defaults timeout: @config.timeout,
|
758
|
+
options.apply_defaults timeout: @config.rpcs.remove_instances.timeout,
|
759
759
|
metadata: call_metadata
|
760
760
|
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
yield result, response if block_given?
|
771
|
-
result
|
761
|
+
options.apply_defaults timeout: @config.timeout,
|
762
|
+
metadata: @config.metadata
|
763
|
+
|
764
|
+
@instance_groups_stub.remove_instances request, options do |result, response|
|
765
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
766
|
+
yield result, response if block_given?
|
767
|
+
return result
|
768
|
+
end
|
772
769
|
rescue ::Faraday::Error => e
|
773
770
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
774
771
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -808,11 +805,11 @@ module Google
|
|
808
805
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
809
806
|
# @param zone [::String]
|
810
807
|
# The name of the zone where the instance group is located.
|
811
|
-
# @yield [result,
|
812
|
-
# @yieldparam result [::
|
808
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
809
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
813
810
|
# @yieldparam response [::Faraday::Response]
|
814
811
|
#
|
815
|
-
# @return [::
|
812
|
+
# @return [::Gapic::Rest::BaseOperation]
|
816
813
|
#
|
817
814
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
818
815
|
def set_named_ports request, options = nil
|
@@ -824,7 +821,7 @@ module Google
|
|
824
821
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
825
822
|
|
826
823
|
# Customize the options with defaults
|
827
|
-
call_metadata =
|
824
|
+
call_metadata = @config.rpcs.set_named_ports.metadata.to_h
|
828
825
|
|
829
826
|
# Set x-goog-api-client header
|
830
827
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -832,20 +829,17 @@ module Google
|
|
832
829
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
833
830
|
transports_version_send: [:rest]
|
834
831
|
|
835
|
-
options.apply_defaults timeout: @config.timeout,
|
832
|
+
options.apply_defaults timeout: @config.rpcs.set_named_ports.timeout,
|
836
833
|
metadata: call_metadata
|
837
834
|
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
yield result, response if block_given?
|
848
|
-
result
|
835
|
+
options.apply_defaults timeout: @config.timeout,
|
836
|
+
metadata: @config.metadata
|
837
|
+
|
838
|
+
@instance_groups_stub.set_named_ports request, options do |result, response|
|
839
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
840
|
+
yield result, response if block_given?
|
841
|
+
return result
|
842
|
+
end
|
849
843
|
rescue ::Faraday::Error => e
|
850
844
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
851
845
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -900,6 +894,9 @@ module Google
|
|
900
894
|
# @!attribute [rw] timeout
|
901
895
|
# The call timeout in seconds.
|
902
896
|
# @return [::Numeric]
|
897
|
+
# @!attribute [rw] metadata
|
898
|
+
# Additional REST headers to be sent with the call.
|
899
|
+
# @return [::Hash{::Symbol=>::String}]
|
903
900
|
#
|
904
901
|
class Configuration
|
905
902
|
extend ::Gapic::Config
|
@@ -913,6 +910,7 @@ module Google
|
|
913
910
|
config_attr :lib_name, nil, ::String, nil
|
914
911
|
config_attr :lib_version, nil, ::String, nil
|
915
912
|
config_attr :timeout, nil, ::Numeric, nil
|
913
|
+
config_attr :metadata, nil, ::Hash, nil
|
916
914
|
|
917
915
|
# @private
|
918
916
|
def initialize parent_config = nil
|
@@ -920,6 +918,102 @@ module Google
|
|
920
918
|
|
921
919
|
yield self if block_given?
|
922
920
|
end
|
921
|
+
|
922
|
+
##
|
923
|
+
# Configurations for individual RPCs
|
924
|
+
# @return [Rpcs]
|
925
|
+
#
|
926
|
+
def rpcs
|
927
|
+
@rpcs ||= begin
|
928
|
+
parent_rpcs = nil
|
929
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
930
|
+
Rpcs.new parent_rpcs
|
931
|
+
end
|
932
|
+
end
|
933
|
+
|
934
|
+
##
|
935
|
+
# Configuration RPC class for the InstanceGroups API.
|
936
|
+
#
|
937
|
+
# Includes fields providing the configuration for each RPC in this service.
|
938
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
939
|
+
# the following configuration fields:
|
940
|
+
#
|
941
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
942
|
+
#
|
943
|
+
# there is one other field (`retry_policy`) that can be set
|
944
|
+
# but is currently not supported for REST Gapic libraries.
|
945
|
+
#
|
946
|
+
class Rpcs
|
947
|
+
##
|
948
|
+
# RPC-specific configuration for `add_instances`
|
949
|
+
# @return [::Gapic::Config::Method]
|
950
|
+
#
|
951
|
+
attr_reader :add_instances
|
952
|
+
##
|
953
|
+
# RPC-specific configuration for `aggregated_list`
|
954
|
+
# @return [::Gapic::Config::Method]
|
955
|
+
#
|
956
|
+
attr_reader :aggregated_list
|
957
|
+
##
|
958
|
+
# RPC-specific configuration for `delete`
|
959
|
+
# @return [::Gapic::Config::Method]
|
960
|
+
#
|
961
|
+
attr_reader :delete
|
962
|
+
##
|
963
|
+
# RPC-specific configuration for `get`
|
964
|
+
# @return [::Gapic::Config::Method]
|
965
|
+
#
|
966
|
+
attr_reader :get
|
967
|
+
##
|
968
|
+
# RPC-specific configuration for `insert`
|
969
|
+
# @return [::Gapic::Config::Method]
|
970
|
+
#
|
971
|
+
attr_reader :insert
|
972
|
+
##
|
973
|
+
# RPC-specific configuration for `list`
|
974
|
+
# @return [::Gapic::Config::Method]
|
975
|
+
#
|
976
|
+
attr_reader :list
|
977
|
+
##
|
978
|
+
# RPC-specific configuration for `list_instances`
|
979
|
+
# @return [::Gapic::Config::Method]
|
980
|
+
#
|
981
|
+
attr_reader :list_instances
|
982
|
+
##
|
983
|
+
# RPC-specific configuration for `remove_instances`
|
984
|
+
# @return [::Gapic::Config::Method]
|
985
|
+
#
|
986
|
+
attr_reader :remove_instances
|
987
|
+
##
|
988
|
+
# RPC-specific configuration for `set_named_ports`
|
989
|
+
# @return [::Gapic::Config::Method]
|
990
|
+
#
|
991
|
+
attr_reader :set_named_ports
|
992
|
+
|
993
|
+
# @private
|
994
|
+
def initialize parent_rpcs = nil
|
995
|
+
add_instances_config = parent_rpcs.add_instances if parent_rpcs.respond_to? :add_instances
|
996
|
+
@add_instances = ::Gapic::Config::Method.new add_instances_config
|
997
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
998
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
999
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1000
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1001
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1002
|
+
@get = ::Gapic::Config::Method.new get_config
|
1003
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1004
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1005
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1006
|
+
@list = ::Gapic::Config::Method.new list_config
|
1007
|
+
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
1008
|
+
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
1009
|
+
remove_instances_config = parent_rpcs.remove_instances if parent_rpcs.respond_to? :remove_instances
|
1010
|
+
@remove_instances = ::Gapic::Config::Method.new remove_instances_config
|
1011
|
+
set_named_ports_config = parent_rpcs.set_named_ports if parent_rpcs.respond_to? :set_named_ports
|
1012
|
+
@set_named_ports = ::Gapic::Config::Method.new set_named_ports_config
|
1013
|
+
|
1014
|
+
yield self if block_given?
|
1015
|
+
end
|
1016
|
+
end
|
923
1017
|
end
|
924
1018
|
end
|
925
1019
|
end
|