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
@@ -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/node_groups/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The NodeGroups API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :node_groups_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::NodeGroups::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
44
|
+
# @example
|
46
45
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
46
|
+
# # Modify the configuration for all NodeGroups clients
|
47
|
+
# ::Google::Cloud::Compute::V1::NodeGroups::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,44 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.add_nodes.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.delete_nodes.timeout = 600.0
|
77
|
+
|
78
|
+
default_config.rpcs.get.timeout = 600.0
|
79
|
+
default_config.rpcs.get.retry_policy = {
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
81
|
+
}
|
82
|
+
|
83
|
+
default_config.rpcs.get_iam_policy.timeout = 600.0
|
84
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.insert.timeout = 600.0
|
89
|
+
|
90
|
+
default_config.rpcs.list.timeout = 600.0
|
91
|
+
default_config.rpcs.list.retry_policy = {
|
92
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
93
|
+
}
|
94
|
+
|
95
|
+
default_config.rpcs.list_nodes.timeout = 600.0
|
96
|
+
|
97
|
+
default_config.rpcs.patch.timeout = 600.0
|
98
|
+
|
99
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
100
|
+
|
101
|
+
default_config.rpcs.set_node_template.timeout = 600.0
|
102
|
+
|
103
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
104
|
+
|
69
105
|
default_config
|
70
106
|
end
|
71
107
|
yield @configure if block_given?
|
@@ -95,28 +131,20 @@ module Google
|
|
95
131
|
##
|
96
132
|
# Create a new NodeGroups REST client object.
|
97
133
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new NodeGroups REST client with the default
|
101
|
-
# configuration:
|
134
|
+
# @example
|
102
135
|
#
|
103
|
-
#
|
136
|
+
# # Create a client using the default configuration
|
137
|
+
# client = ::Google::Cloud::Compute::V1::NodeGroups::Rest::Client.new
|
104
138
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
139
|
+
# # Create a client using a custom configuration
|
140
|
+
# client = ::Google::Cloud::Compute::V1::NodeGroups::Rest::Client.new do |config|
|
141
|
+
# config.timeout = 10.0
|
142
|
+
# end
|
111
143
|
#
|
112
144
|
# @yield [config] Configure the NodeGroups client.
|
113
145
|
# @yieldparam config [Client::Configuration]
|
114
146
|
#
|
115
147
|
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
148
|
# Create the configuration object
|
121
149
|
@config = Configuration.new Client.configure
|
122
150
|
|
@@ -126,11 +154,11 @@ module Google
|
|
126
154
|
# Create credentials
|
127
155
|
credentials = @config.credentials
|
128
156
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
157
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
158
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
159
|
end
|
132
160
|
|
133
|
-
@
|
161
|
+
@node_groups_stub = ::Google::Cloud::Compute::V1::NodeGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
162
|
end
|
135
163
|
|
136
164
|
# Service calls
|
@@ -169,11 +197,11 @@ module Google
|
|
169
197
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
170
198
|
# @param zone [::String]
|
171
199
|
# The name of the zone for this request.
|
172
|
-
# @yield [result,
|
173
|
-
# @yieldparam result [::
|
200
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
201
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
174
202
|
# @yieldparam response [::Faraday::Response]
|
175
203
|
#
|
176
|
-
# @return [::
|
204
|
+
# @return [::Gapic::Rest::BaseOperation]
|
177
205
|
#
|
178
206
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
179
207
|
def add_nodes request, options = nil
|
@@ -185,7 +213,7 @@ module Google
|
|
185
213
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
186
214
|
|
187
215
|
# Customize the options with defaults
|
188
|
-
call_metadata =
|
216
|
+
call_metadata = @config.rpcs.add_nodes.metadata.to_h
|
189
217
|
|
190
218
|
# Set x-goog-api-client header
|
191
219
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -193,20 +221,17 @@ module Google
|
|
193
221
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
194
222
|
transports_version_send: [:rest]
|
195
223
|
|
196
|
-
options.apply_defaults timeout: @config.timeout,
|
224
|
+
options.apply_defaults timeout: @config.rpcs.add_nodes.timeout,
|
197
225
|
metadata: call_metadata
|
198
226
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
yield result, response if block_given?
|
209
|
-
result
|
227
|
+
options.apply_defaults timeout: @config.timeout,
|
228
|
+
metadata: @config.metadata
|
229
|
+
|
230
|
+
@node_groups_stub.add_nodes request, options do |result, response|
|
231
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
232
|
+
yield result, response if block_given?
|
233
|
+
return result
|
234
|
+
end
|
210
235
|
rescue ::Faraday::Error => e
|
211
236
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
212
237
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -255,12 +280,12 @@ module Google
|
|
255
280
|
# @param project [::String]
|
256
281
|
# Project ID for this request.
|
257
282
|
# @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::
|
283
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
284
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
285
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NodeGroupsScopedList>]
|
261
286
|
# @yieldparam response [::Faraday::Response]
|
262
287
|
#
|
263
|
-
# @return [::Google::Cloud::Compute::V1::
|
288
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NodeGroupsScopedList>]
|
264
289
|
#
|
265
290
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
266
291
|
def aggregated_list request, options = nil
|
@@ -272,7 +297,7 @@ module Google
|
|
272
297
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
273
298
|
|
274
299
|
# Customize the options with defaults
|
275
|
-
call_metadata =
|
300
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
276
301
|
|
277
302
|
# Set x-goog-api-client header
|
278
303
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -280,19 +305,17 @@ module Google
|
|
280
305
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
281
306
|
transports_version_send: [:rest]
|
282
307
|
|
283
|
-
options.apply_defaults timeout: @config.timeout,
|
308
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
284
309
|
metadata: call_metadata
|
285
310
|
|
286
|
-
|
287
|
-
|
288
|
-
uri: uri,
|
289
|
-
params: query_string_params,
|
290
|
-
options: options
|
291
|
-
)
|
292
|
-
result = ::Google::Cloud::Compute::V1::NodeGroupAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
311
|
+
options.apply_defaults timeout: @config.timeout,
|
312
|
+
metadata: @config.metadata
|
293
313
|
|
294
|
-
|
295
|
-
|
314
|
+
@node_groups_stub.aggregated_list request, options do |result, response|
|
315
|
+
result = ::Gapic::Rest::PagedEnumerable.new @node_groups_stub, :aggregated_list, "items", request, result, options
|
316
|
+
yield result, response if block_given?
|
317
|
+
return result
|
318
|
+
end
|
296
319
|
rescue ::Faraday::Error => e
|
297
320
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
298
321
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -330,11 +353,11 @@ module Google
|
|
330
353
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
331
354
|
# @param zone [::String]
|
332
355
|
# The name of the zone for this request.
|
333
|
-
# @yield [result,
|
334
|
-
# @yieldparam result [::
|
356
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
357
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
335
358
|
# @yieldparam response [::Faraday::Response]
|
336
359
|
#
|
337
|
-
# @return [::
|
360
|
+
# @return [::Gapic::Rest::BaseOperation]
|
338
361
|
#
|
339
362
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
340
363
|
def delete request, options = nil
|
@@ -346,7 +369,7 @@ module Google
|
|
346
369
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
347
370
|
|
348
371
|
# Customize the options with defaults
|
349
|
-
call_metadata =
|
372
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
350
373
|
|
351
374
|
# Set x-goog-api-client header
|
352
375
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -354,19 +377,17 @@ module Google
|
|
354
377
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
355
378
|
transports_version_send: [:rest]
|
356
379
|
|
357
|
-
options.apply_defaults timeout: @config.timeout,
|
380
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
358
381
|
metadata: call_metadata
|
359
382
|
|
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
|
383
|
+
options.apply_defaults timeout: @config.timeout,
|
384
|
+
metadata: @config.metadata
|
367
385
|
|
368
|
-
|
369
|
-
|
386
|
+
@node_groups_stub.delete request, options do |result, response|
|
387
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
388
|
+
yield result, response if block_given?
|
389
|
+
return result
|
390
|
+
end
|
370
391
|
rescue ::Faraday::Error => e
|
371
392
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
372
393
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -406,11 +427,11 @@ module Google
|
|
406
427
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
407
428
|
# @param zone [::String]
|
408
429
|
# The name of the zone for this request.
|
409
|
-
# @yield [result,
|
410
|
-
# @yieldparam result [::
|
430
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
431
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
411
432
|
# @yieldparam response [::Faraday::Response]
|
412
433
|
#
|
413
|
-
# @return [::
|
434
|
+
# @return [::Gapic::Rest::BaseOperation]
|
414
435
|
#
|
415
436
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
416
437
|
def delete_nodes request, options = nil
|
@@ -422,7 +443,7 @@ module Google
|
|
422
443
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
423
444
|
|
424
445
|
# Customize the options with defaults
|
425
|
-
call_metadata =
|
446
|
+
call_metadata = @config.rpcs.delete_nodes.metadata.to_h
|
426
447
|
|
427
448
|
# Set x-goog-api-client header
|
428
449
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -430,20 +451,17 @@ module Google
|
|
430
451
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
431
452
|
transports_version_send: [:rest]
|
432
453
|
|
433
|
-
options.apply_defaults timeout: @config.timeout,
|
454
|
+
options.apply_defaults timeout: @config.rpcs.delete_nodes.timeout,
|
434
455
|
metadata: call_metadata
|
435
456
|
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
yield result, response if block_given?
|
446
|
-
result
|
457
|
+
options.apply_defaults timeout: @config.timeout,
|
458
|
+
metadata: @config.metadata
|
459
|
+
|
460
|
+
@node_groups_stub.delete_nodes request, options do |result, response|
|
461
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
462
|
+
yield result, response if block_given?
|
463
|
+
return result
|
464
|
+
end
|
447
465
|
rescue ::Faraday::Error => e
|
448
466
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
449
467
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -475,7 +493,7 @@ module Google
|
|
475
493
|
# Project ID for this request.
|
476
494
|
# @param zone [::String]
|
477
495
|
# The name of the zone for this request.
|
478
|
-
# @yield [result,
|
496
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
479
497
|
# @yieldparam result [::Google::Cloud::Compute::V1::NodeGroup]
|
480
498
|
# @yieldparam response [::Faraday::Response]
|
481
499
|
#
|
@@ -491,7 +509,7 @@ module Google
|
|
491
509
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
492
510
|
|
493
511
|
# Customize the options with defaults
|
494
|
-
call_metadata =
|
512
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
495
513
|
|
496
514
|
# Set x-goog-api-client header
|
497
515
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -499,18 +517,16 @@ module Google
|
|
499
517
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
500
518
|
transports_version_send: [:rest]
|
501
519
|
|
502
|
-
options.apply_defaults timeout: @config.timeout,
|
520
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
503
521
|
metadata: call_metadata
|
504
522
|
|
505
|
-
|
506
|
-
|
507
|
-
uri: uri,
|
508
|
-
options: options
|
509
|
-
)
|
510
|
-
result = ::Google::Cloud::Compute::V1::NodeGroup.decode_json response.body, ignore_unknown_fields: true
|
523
|
+
options.apply_defaults timeout: @config.timeout,
|
524
|
+
metadata: @config.metadata
|
511
525
|
|
512
|
-
|
513
|
-
|
526
|
+
@node_groups_stub.get request, options do |result, response|
|
527
|
+
yield result, response if block_given?
|
528
|
+
return result
|
529
|
+
end
|
514
530
|
rescue ::Faraday::Error => e
|
515
531
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
516
532
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -544,7 +560,7 @@ module Google
|
|
544
560
|
# Name or id of the resource for this request.
|
545
561
|
# @param zone [::String]
|
546
562
|
# The name of the zone for this request.
|
547
|
-
# @yield [result,
|
563
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
548
564
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
549
565
|
# @yieldparam response [::Faraday::Response]
|
550
566
|
#
|
@@ -560,7 +576,7 @@ module Google
|
|
560
576
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
561
577
|
|
562
578
|
# Customize the options with defaults
|
563
|
-
call_metadata =
|
579
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
564
580
|
|
565
581
|
# Set x-goog-api-client header
|
566
582
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -568,19 +584,16 @@ module Google
|
|
568
584
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
569
585
|
transports_version_send: [:rest]
|
570
586
|
|
571
|
-
options.apply_defaults timeout: @config.timeout,
|
587
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
572
588
|
metadata: call_metadata
|
573
589
|
|
574
|
-
|
575
|
-
|
576
|
-
uri: uri,
|
577
|
-
params: query_string_params,
|
578
|
-
options: options
|
579
|
-
)
|
580
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
590
|
+
options.apply_defaults timeout: @config.timeout,
|
591
|
+
metadata: @config.metadata
|
581
592
|
|
582
|
-
|
583
|
-
|
593
|
+
@node_groups_stub.get_iam_policy request, options do |result, response|
|
594
|
+
yield result, response if block_given?
|
595
|
+
return result
|
596
|
+
end
|
584
597
|
rescue ::Faraday::Error => e
|
585
598
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
586
599
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -620,11 +633,11 @@ module Google
|
|
620
633
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
621
634
|
# @param zone [::String]
|
622
635
|
# The name of the zone for this request.
|
623
|
-
# @yield [result,
|
624
|
-
# @yieldparam result [::
|
636
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
637
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
625
638
|
# @yieldparam response [::Faraday::Response]
|
626
639
|
#
|
627
|
-
# @return [::
|
640
|
+
# @return [::Gapic::Rest::BaseOperation]
|
628
641
|
#
|
629
642
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
630
643
|
def insert request, options = nil
|
@@ -636,7 +649,7 @@ module Google
|
|
636
649
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
637
650
|
|
638
651
|
# Customize the options with defaults
|
639
|
-
call_metadata =
|
652
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
640
653
|
|
641
654
|
# Set x-goog-api-client header
|
642
655
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -644,20 +657,17 @@ module Google
|
|
644
657
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
645
658
|
transports_version_send: [:rest]
|
646
659
|
|
647
|
-
options.apply_defaults timeout: @config.timeout,
|
660
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
648
661
|
metadata: call_metadata
|
649
662
|
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
yield result, response if block_given?
|
660
|
-
result
|
663
|
+
options.apply_defaults timeout: @config.timeout,
|
664
|
+
metadata: @config.metadata
|
665
|
+
|
666
|
+
@node_groups_stub.insert request, options do |result, response|
|
667
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
668
|
+
yield result, response if block_given?
|
669
|
+
return result
|
670
|
+
end
|
661
671
|
rescue ::Faraday::Error => e
|
662
672
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
663
673
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -704,14 +714,14 @@ module Google
|
|
704
714
|
# @param project [::String]
|
705
715
|
# Project ID for this request.
|
706
716
|
# @param return_partial_success [::Boolean]
|
707
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
717
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
708
718
|
# @param zone [::String]
|
709
719
|
# The name of the zone for this request.
|
710
|
-
# @yield [result,
|
711
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
720
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
721
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NodeGroup>]
|
712
722
|
# @yieldparam response [::Faraday::Response]
|
713
723
|
#
|
714
|
-
# @return [::Google::Cloud::Compute::V1::
|
724
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NodeGroup>]
|
715
725
|
#
|
716
726
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
717
727
|
def list request, options = nil
|
@@ -723,7 +733,7 @@ module Google
|
|
723
733
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
724
734
|
|
725
735
|
# Customize the options with defaults
|
726
|
-
call_metadata =
|
736
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
727
737
|
|
728
738
|
# Set x-goog-api-client header
|
729
739
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -731,19 +741,17 @@ module Google
|
|
731
741
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
732
742
|
transports_version_send: [:rest]
|
733
743
|
|
734
|
-
options.apply_defaults timeout: @config.timeout,
|
744
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
735
745
|
metadata: call_metadata
|
736
746
|
|
737
|
-
|
738
|
-
|
739
|
-
uri: uri,
|
740
|
-
params: query_string_params,
|
741
|
-
options: options
|
742
|
-
)
|
743
|
-
result = ::Google::Cloud::Compute::V1::NodeGroupList.decode_json response.body, ignore_unknown_fields: true
|
747
|
+
options.apply_defaults timeout: @config.timeout,
|
748
|
+
metadata: @config.metadata
|
744
749
|
|
745
|
-
|
746
|
-
|
750
|
+
@node_groups_stub.list request, options do |result, response|
|
751
|
+
result = ::Gapic::Rest::PagedEnumerable.new @node_groups_stub, :list, "items", request, result, options
|
752
|
+
yield result, response if block_given?
|
753
|
+
return result
|
754
|
+
end
|
747
755
|
rescue ::Faraday::Error => e
|
748
756
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
749
757
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -792,14 +800,14 @@ module Google
|
|
792
800
|
# @param project [::String]
|
793
801
|
# Project ID for this request.
|
794
802
|
# @param return_partial_success [::Boolean]
|
795
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
803
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
796
804
|
# @param zone [::String]
|
797
805
|
# The name of the zone for this request.
|
798
|
-
# @yield [result,
|
799
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
806
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
807
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NodeGroupNode>]
|
800
808
|
# @yieldparam response [::Faraday::Response]
|
801
809
|
#
|
802
|
-
# @return [::Google::Cloud::Compute::V1::
|
810
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NodeGroupNode>]
|
803
811
|
#
|
804
812
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
805
813
|
def list_nodes request, options = nil
|
@@ -811,7 +819,7 @@ module Google
|
|
811
819
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
812
820
|
|
813
821
|
# Customize the options with defaults
|
814
|
-
call_metadata =
|
822
|
+
call_metadata = @config.rpcs.list_nodes.metadata.to_h
|
815
823
|
|
816
824
|
# Set x-goog-api-client header
|
817
825
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -819,19 +827,17 @@ module Google
|
|
819
827
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
820
828
|
transports_version_send: [:rest]
|
821
829
|
|
822
|
-
options.apply_defaults timeout: @config.timeout,
|
830
|
+
options.apply_defaults timeout: @config.rpcs.list_nodes.timeout,
|
823
831
|
metadata: call_metadata
|
824
832
|
|
825
|
-
|
826
|
-
|
827
|
-
uri: uri,
|
828
|
-
params: query_string_params,
|
829
|
-
options: options
|
830
|
-
)
|
831
|
-
result = ::Google::Cloud::Compute::V1::NodeGroupsListNodes.decode_json response.body, ignore_unknown_fields: true
|
833
|
+
options.apply_defaults timeout: @config.timeout,
|
834
|
+
metadata: @config.metadata
|
832
835
|
|
833
|
-
|
834
|
-
|
836
|
+
@node_groups_stub.list_nodes request, options do |result, response|
|
837
|
+
result = ::Gapic::Rest::PagedEnumerable.new @node_groups_stub, :list_nodes, "items", request, result, options
|
838
|
+
yield result, response if block_given?
|
839
|
+
return result
|
840
|
+
end
|
835
841
|
rescue ::Faraday::Error => e
|
836
842
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
837
843
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -871,11 +877,11 @@ module Google
|
|
871
877
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
872
878
|
# @param zone [::String]
|
873
879
|
# The name of the zone for this request.
|
874
|
-
# @yield [result,
|
875
|
-
# @yieldparam result [::
|
880
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
881
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
876
882
|
# @yieldparam response [::Faraday::Response]
|
877
883
|
#
|
878
|
-
# @return [::
|
884
|
+
# @return [::Gapic::Rest::BaseOperation]
|
879
885
|
#
|
880
886
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
881
887
|
def patch request, options = nil
|
@@ -887,7 +893,7 @@ module Google
|
|
887
893
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
888
894
|
|
889
895
|
# Customize the options with defaults
|
890
|
-
call_metadata =
|
896
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
891
897
|
|
892
898
|
# Set x-goog-api-client header
|
893
899
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -895,20 +901,17 @@ module Google
|
|
895
901
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
896
902
|
transports_version_send: [:rest]
|
897
903
|
|
898
|
-
options.apply_defaults timeout: @config.timeout,
|
904
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
899
905
|
metadata: call_metadata
|
900
906
|
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
yield result, response if block_given?
|
911
|
-
result
|
907
|
+
options.apply_defaults timeout: @config.timeout,
|
908
|
+
metadata: @config.metadata
|
909
|
+
|
910
|
+
@node_groups_stub.patch request, options do |result, response|
|
911
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
912
|
+
yield result, response if block_given?
|
913
|
+
return result
|
914
|
+
end
|
912
915
|
rescue ::Faraday::Error => e
|
913
916
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
914
917
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -942,7 +945,7 @@ module Google
|
|
942
945
|
# The name of the zone for this request.
|
943
946
|
# @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash]
|
944
947
|
# The body resource for this request
|
945
|
-
# @yield [result,
|
948
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
946
949
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
947
950
|
# @yieldparam response [::Faraday::Response]
|
948
951
|
#
|
@@ -958,7 +961,7 @@ module Google
|
|
958
961
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
959
962
|
|
960
963
|
# Customize the options with defaults
|
961
|
-
call_metadata =
|
964
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
962
965
|
|
963
966
|
# Set x-goog-api-client header
|
964
967
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -966,19 +969,16 @@ module Google
|
|
966
969
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
967
970
|
transports_version_send: [:rest]
|
968
971
|
|
969
|
-
options.apply_defaults timeout: @config.timeout,
|
972
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
970
973
|
metadata: call_metadata
|
971
974
|
|
972
|
-
|
973
|
-
|
974
|
-
uri: uri,
|
975
|
-
body: body,
|
976
|
-
options: options
|
977
|
-
)
|
978
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
975
|
+
options.apply_defaults timeout: @config.timeout,
|
976
|
+
metadata: @config.metadata
|
979
977
|
|
980
|
-
|
981
|
-
|
978
|
+
@node_groups_stub.set_iam_policy request, options do |result, response|
|
979
|
+
yield result, response if block_given?
|
980
|
+
return result
|
981
|
+
end
|
982
982
|
rescue ::Faraday::Error => e
|
983
983
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
984
984
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1018,11 +1018,11 @@ module Google
|
|
1018
1018
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1019
1019
|
# @param zone [::String]
|
1020
1020
|
# The name of the zone for this request.
|
1021
|
-
# @yield [result,
|
1022
|
-
# @yieldparam result [::
|
1021
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1022
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1023
1023
|
# @yieldparam response [::Faraday::Response]
|
1024
1024
|
#
|
1025
|
-
# @return [::
|
1025
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1026
1026
|
#
|
1027
1027
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1028
1028
|
def set_node_template request, options = nil
|
@@ -1034,7 +1034,7 @@ module Google
|
|
1034
1034
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1035
1035
|
|
1036
1036
|
# Customize the options with defaults
|
1037
|
-
call_metadata =
|
1037
|
+
call_metadata = @config.rpcs.set_node_template.metadata.to_h
|
1038
1038
|
|
1039
1039
|
# Set x-goog-api-client header
|
1040
1040
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1042,20 +1042,17 @@ module Google
|
|
1042
1042
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1043
1043
|
transports_version_send: [:rest]
|
1044
1044
|
|
1045
|
-
options.apply_defaults timeout: @config.timeout,
|
1045
|
+
options.apply_defaults timeout: @config.rpcs.set_node_template.timeout,
|
1046
1046
|
metadata: call_metadata
|
1047
1047
|
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
yield result, response if block_given?
|
1058
|
-
result
|
1048
|
+
options.apply_defaults timeout: @config.timeout,
|
1049
|
+
metadata: @config.metadata
|
1050
|
+
|
1051
|
+
@node_groups_stub.set_node_template request, options do |result, response|
|
1052
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1053
|
+
yield result, response if block_given?
|
1054
|
+
return result
|
1055
|
+
end
|
1059
1056
|
rescue ::Faraday::Error => e
|
1060
1057
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1061
1058
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1089,7 +1086,7 @@ module Google
|
|
1089
1086
|
# The body resource for this request
|
1090
1087
|
# @param zone [::String]
|
1091
1088
|
# The name of the zone for this request.
|
1092
|
-
# @yield [result,
|
1089
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1093
1090
|
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1094
1091
|
# @yieldparam response [::Faraday::Response]
|
1095
1092
|
#
|
@@ -1105,7 +1102,7 @@ module Google
|
|
1105
1102
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1106
1103
|
|
1107
1104
|
# Customize the options with defaults
|
1108
|
-
call_metadata =
|
1105
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1109
1106
|
|
1110
1107
|
# Set x-goog-api-client header
|
1111
1108
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1113,19 +1110,16 @@ module Google
|
|
1113
1110
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1114
1111
|
transports_version_send: [:rest]
|
1115
1112
|
|
1116
|
-
options.apply_defaults timeout: @config.timeout,
|
1113
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1117
1114
|
metadata: call_metadata
|
1118
1115
|
|
1119
|
-
|
1120
|
-
|
1121
|
-
uri: uri,
|
1122
|
-
body: body,
|
1123
|
-
options: options
|
1124
|
-
)
|
1125
|
-
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
1116
|
+
options.apply_defaults timeout: @config.timeout,
|
1117
|
+
metadata: @config.metadata
|
1126
1118
|
|
1127
|
-
|
1128
|
-
|
1119
|
+
@node_groups_stub.test_iam_permissions request, options do |result, response|
|
1120
|
+
yield result, response if block_given?
|
1121
|
+
return result
|
1122
|
+
end
|
1129
1123
|
rescue ::Faraday::Error => e
|
1130
1124
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1131
1125
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1180,6 +1174,9 @@ module Google
|
|
1180
1174
|
# @!attribute [rw] timeout
|
1181
1175
|
# The call timeout in seconds.
|
1182
1176
|
# @return [::Numeric]
|
1177
|
+
# @!attribute [rw] metadata
|
1178
|
+
# Additional REST headers to be sent with the call.
|
1179
|
+
# @return [::Hash{::Symbol=>::String}]
|
1183
1180
|
#
|
1184
1181
|
class Configuration
|
1185
1182
|
extend ::Gapic::Config
|
@@ -1193,6 +1190,7 @@ module Google
|
|
1193
1190
|
config_attr :lib_name, nil, ::String, nil
|
1194
1191
|
config_attr :lib_version, nil, ::String, nil
|
1195
1192
|
config_attr :timeout, nil, ::Numeric, nil
|
1193
|
+
config_attr :metadata, nil, ::Hash, nil
|
1196
1194
|
|
1197
1195
|
# @private
|
1198
1196
|
def initialize parent_config = nil
|
@@ -1200,6 +1198,130 @@ module Google
|
|
1200
1198
|
|
1201
1199
|
yield self if block_given?
|
1202
1200
|
end
|
1201
|
+
|
1202
|
+
##
|
1203
|
+
# Configurations for individual RPCs
|
1204
|
+
# @return [Rpcs]
|
1205
|
+
#
|
1206
|
+
def rpcs
|
1207
|
+
@rpcs ||= begin
|
1208
|
+
parent_rpcs = nil
|
1209
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1210
|
+
Rpcs.new parent_rpcs
|
1211
|
+
end
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
##
|
1215
|
+
# Configuration RPC class for the NodeGroups API.
|
1216
|
+
#
|
1217
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1218
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1219
|
+
# the following configuration fields:
|
1220
|
+
#
|
1221
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1222
|
+
#
|
1223
|
+
# there is one other field (`retry_policy`) that can be set
|
1224
|
+
# but is currently not supported for REST Gapic libraries.
|
1225
|
+
#
|
1226
|
+
class Rpcs
|
1227
|
+
##
|
1228
|
+
# RPC-specific configuration for `add_nodes`
|
1229
|
+
# @return [::Gapic::Config::Method]
|
1230
|
+
#
|
1231
|
+
attr_reader :add_nodes
|
1232
|
+
##
|
1233
|
+
# RPC-specific configuration for `aggregated_list`
|
1234
|
+
# @return [::Gapic::Config::Method]
|
1235
|
+
#
|
1236
|
+
attr_reader :aggregated_list
|
1237
|
+
##
|
1238
|
+
# RPC-specific configuration for `delete`
|
1239
|
+
# @return [::Gapic::Config::Method]
|
1240
|
+
#
|
1241
|
+
attr_reader :delete
|
1242
|
+
##
|
1243
|
+
# RPC-specific configuration for `delete_nodes`
|
1244
|
+
# @return [::Gapic::Config::Method]
|
1245
|
+
#
|
1246
|
+
attr_reader :delete_nodes
|
1247
|
+
##
|
1248
|
+
# RPC-specific configuration for `get`
|
1249
|
+
# @return [::Gapic::Config::Method]
|
1250
|
+
#
|
1251
|
+
attr_reader :get
|
1252
|
+
##
|
1253
|
+
# RPC-specific configuration for `get_iam_policy`
|
1254
|
+
# @return [::Gapic::Config::Method]
|
1255
|
+
#
|
1256
|
+
attr_reader :get_iam_policy
|
1257
|
+
##
|
1258
|
+
# RPC-specific configuration for `insert`
|
1259
|
+
# @return [::Gapic::Config::Method]
|
1260
|
+
#
|
1261
|
+
attr_reader :insert
|
1262
|
+
##
|
1263
|
+
# RPC-specific configuration for `list`
|
1264
|
+
# @return [::Gapic::Config::Method]
|
1265
|
+
#
|
1266
|
+
attr_reader :list
|
1267
|
+
##
|
1268
|
+
# RPC-specific configuration for `list_nodes`
|
1269
|
+
# @return [::Gapic::Config::Method]
|
1270
|
+
#
|
1271
|
+
attr_reader :list_nodes
|
1272
|
+
##
|
1273
|
+
# RPC-specific configuration for `patch`
|
1274
|
+
# @return [::Gapic::Config::Method]
|
1275
|
+
#
|
1276
|
+
attr_reader :patch
|
1277
|
+
##
|
1278
|
+
# RPC-specific configuration for `set_iam_policy`
|
1279
|
+
# @return [::Gapic::Config::Method]
|
1280
|
+
#
|
1281
|
+
attr_reader :set_iam_policy
|
1282
|
+
##
|
1283
|
+
# RPC-specific configuration for `set_node_template`
|
1284
|
+
# @return [::Gapic::Config::Method]
|
1285
|
+
#
|
1286
|
+
attr_reader :set_node_template
|
1287
|
+
##
|
1288
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1289
|
+
# @return [::Gapic::Config::Method]
|
1290
|
+
#
|
1291
|
+
attr_reader :test_iam_permissions
|
1292
|
+
|
1293
|
+
# @private
|
1294
|
+
def initialize parent_rpcs = nil
|
1295
|
+
add_nodes_config = parent_rpcs.add_nodes if parent_rpcs.respond_to? :add_nodes
|
1296
|
+
@add_nodes = ::Gapic::Config::Method.new add_nodes_config
|
1297
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1298
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1299
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1300
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1301
|
+
delete_nodes_config = parent_rpcs.delete_nodes if parent_rpcs.respond_to? :delete_nodes
|
1302
|
+
@delete_nodes = ::Gapic::Config::Method.new delete_nodes_config
|
1303
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1304
|
+
@get = ::Gapic::Config::Method.new get_config
|
1305
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1306
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1307
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1308
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1309
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1310
|
+
@list = ::Gapic::Config::Method.new list_config
|
1311
|
+
list_nodes_config = parent_rpcs.list_nodes if parent_rpcs.respond_to? :list_nodes
|
1312
|
+
@list_nodes = ::Gapic::Config::Method.new list_nodes_config
|
1313
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1314
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1315
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1316
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1317
|
+
set_node_template_config = parent_rpcs.set_node_template if parent_rpcs.respond_to? :set_node_template
|
1318
|
+
@set_node_template = ::Gapic::Config::Method.new set_node_template_config
|
1319
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1320
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1321
|
+
|
1322
|
+
yield self if block_given?
|
1323
|
+
end
|
1324
|
+
end
|
1203
1325
|
end
|
1204
1326
|
end
|
1205
1327
|
end
|