google-cloud-compute-v1 0.2.0 → 1.0.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 +19 -37
- data/README.md +4 -30
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +127 -90
- 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 +172 -130
- 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 +218 -172
- 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 +236 -185
- 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 +308 -253
- 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 +8507 -7466
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +127 -90
- 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 +345 -272
- 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 +184 -129
- 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 +476 -343
- 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 +191 -145
- 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 +296 -171
- 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 +145 -103
- 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 +265 -144
- 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 +215 -172
- 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 +165 -118
- 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 +118 -76
- 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 +175 -124
- 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 +218 -172
- 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/image_family_views/credentials.rb +53 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +318 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +89 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/image_family_views.rb +44 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +291 -209
- 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 +526 -477
- 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 +271 -233
- 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 +202 -139
- 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 +1186 -797
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +2018 -0
- data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +195 -151
- 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 +100 -63
- 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 +189 -135
- 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 +93 -50
- 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 +209 -146
- 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 +127 -90
- 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 +261 -213
- 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 +363 -234
- 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 +345 -277
- 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 +229 -166
- 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 +127 -90
- 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 +213 -163
- 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 +351 -288
- 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 +175 -124
- 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 +203 -151
- 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 +191 -145
- 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 +212 -160
- 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 +151 -112
- 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 +100 -63
- 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 +318 -245
- 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 +168 -124
- 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 +191 -145
- 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 +498 -445
- 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 +148 -113
- 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 +76 -45
- 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 +145 -103
- 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 +145 -103
- 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 +137 -90
- 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 +145 -103
- 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 +168 -124
- 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 +191 -145
- 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 +205 -137
- 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 +100 -63
- 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 +252 -187
- 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 +229 -166
- 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 +284 -222
- 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 +145 -103
- 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 +277 -205
- 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/service_attachments/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +954 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +458 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/service_attachments.rb +44 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +201 -135
- 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 +172 -130
- 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 +192 -149
- 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 +325 -256
- 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 +168 -124
- 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 +219 -173
- 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 +340 -213
- 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 +172 -130
- 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 +305 -247
- 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 +237 -187
- 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 +191 -145
- 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 +172 -130
- 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 +260 -208
- 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 +234 -174
- 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 +172 -130
- 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 +137 -90
- 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 +100 -63
- 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 +7 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/compute/v1/compute.rb +18964 -19481
- data/proto_docs/google/cloud/extended_operations.rb +51 -0
- metadata +110 -9
@@ -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_group_managers/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The InstanceGroupManagers API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :instance_group_managers_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all InstanceGroupManagers clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all InstanceGroupManagers clients
|
47
|
+
# ::Google::Cloud::Compute::V1::InstanceGroupManagers::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,58 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.abandon_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.apply_updates_to_instances.timeout = 600.0
|
75
|
+
|
76
|
+
default_config.rpcs.create_instances.timeout = 600.0
|
77
|
+
|
78
|
+
default_config.rpcs.delete.timeout = 600.0
|
79
|
+
|
80
|
+
default_config.rpcs.delete_instances.timeout = 600.0
|
81
|
+
|
82
|
+
default_config.rpcs.delete_per_instance_configs.timeout = 600.0
|
83
|
+
|
84
|
+
default_config.rpcs.get.timeout = 600.0
|
85
|
+
default_config.rpcs.get.retry_policy = {
|
86
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
87
|
+
}
|
88
|
+
|
89
|
+
default_config.rpcs.insert.timeout = 600.0
|
90
|
+
|
91
|
+
default_config.rpcs.list.timeout = 600.0
|
92
|
+
default_config.rpcs.list.retry_policy = {
|
93
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.list_errors.timeout = 600.0
|
97
|
+
default_config.rpcs.list_errors.retry_policy = {
|
98
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config.rpcs.list_managed_instances.timeout = 600.0
|
102
|
+
|
103
|
+
default_config.rpcs.list_per_instance_configs.timeout = 600.0
|
104
|
+
|
105
|
+
default_config.rpcs.patch.timeout = 600.0
|
106
|
+
|
107
|
+
default_config.rpcs.patch_per_instance_configs.timeout = 600.0
|
108
|
+
|
109
|
+
default_config.rpcs.recreate_instances.timeout = 600.0
|
110
|
+
|
111
|
+
default_config.rpcs.resize.timeout = 600.0
|
112
|
+
|
113
|
+
default_config.rpcs.set_instance_template.timeout = 600.0
|
114
|
+
|
115
|
+
default_config.rpcs.set_target_pools.timeout = 600.0
|
116
|
+
|
117
|
+
default_config.rpcs.update_per_instance_configs.timeout = 600.0
|
118
|
+
|
69
119
|
default_config
|
70
120
|
end
|
71
121
|
yield @configure if block_given?
|
@@ -95,28 +145,20 @@ module Google
|
|
95
145
|
##
|
96
146
|
# Create a new InstanceGroupManagers REST client object.
|
97
147
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new InstanceGroupManagers REST client with the default
|
101
|
-
# configuration:
|
102
|
-
#
|
103
|
-
# client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.new
|
148
|
+
# @example
|
104
149
|
#
|
105
|
-
#
|
106
|
-
#
|
150
|
+
# # Create a client using the default configuration
|
151
|
+
# client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.new
|
107
152
|
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
153
|
+
# # Create a client using a custom configuration
|
154
|
+
# client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.new do |config|
|
155
|
+
# config.timeout = 10.0
|
156
|
+
# end
|
111
157
|
#
|
112
158
|
# @yield [config] Configure the InstanceGroupManagers client.
|
113
159
|
# @yieldparam config [Client::Configuration]
|
114
160
|
#
|
115
161
|
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
162
|
# Create the configuration object
|
121
163
|
@config = Configuration.new Client.configure
|
122
164
|
|
@@ -126,21 +168,17 @@ module Google
|
|
126
168
|
# Create credentials
|
127
169
|
credentials = @config.credentials
|
128
170
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
171
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
172
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
173
|
end
|
132
174
|
|
133
|
-
@
|
175
|
+
@instance_group_managers_stub = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
176
|
end
|
135
177
|
|
136
178
|
# Service calls
|
137
179
|
|
138
180
|
##
|
139
|
-
# Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
|
140
|
-
#
|
141
|
-
# If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
|
142
|
-
#
|
143
|
-
# You can specify a maximum of 1000 instances with this method per request.
|
181
|
+
# Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
|
144
182
|
#
|
145
183
|
# @overload abandon_instances(request, options = nil)
|
146
184
|
# Pass arguments to `abandon_instances` via a request object, either of type
|
@@ -166,18 +204,14 @@ module Google
|
|
166
204
|
# @param project [::String]
|
167
205
|
# Project ID for this request.
|
168
206
|
# @param request_id [::String]
|
169
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
170
|
-
#
|
171
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
172
|
-
#
|
173
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
207
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
174
208
|
# @param zone [::String]
|
175
209
|
# The name of the zone where the managed instance group is located.
|
176
|
-
# @yield [result,
|
177
|
-
# @yieldparam result [::
|
210
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
211
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
178
212
|
# @yieldparam response [::Faraday::Response]
|
179
213
|
#
|
180
|
-
# @return [::
|
214
|
+
# @return [::Gapic::Rest::BaseOperation]
|
181
215
|
#
|
182
216
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
183
217
|
def abandon_instances request, options = nil
|
@@ -189,7 +223,7 @@ module Google
|
|
189
223
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
190
224
|
|
191
225
|
# Customize the options with defaults
|
192
|
-
call_metadata =
|
226
|
+
call_metadata = @config.rpcs.abandon_instances.metadata.to_h
|
193
227
|
|
194
228
|
# Set x-goog-api-client header
|
195
229
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -197,20 +231,17 @@ module Google
|
|
197
231
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
198
232
|
transports_version_send: [:rest]
|
199
233
|
|
200
|
-
options.apply_defaults timeout: @config.timeout,
|
234
|
+
options.apply_defaults timeout: @config.rpcs.abandon_instances.timeout,
|
201
235
|
metadata: call_metadata
|
202
236
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
yield result, response if block_given?
|
213
|
-
result
|
237
|
+
options.apply_defaults timeout: @config.timeout,
|
238
|
+
metadata: @config.metadata
|
239
|
+
|
240
|
+
@instance_group_managers_stub.abandon_instances request, options do |result, response|
|
241
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
242
|
+
yield result, response if block_given?
|
243
|
+
return result
|
244
|
+
end
|
214
245
|
rescue ::Faraday::Error => e
|
215
246
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
216
247
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -237,34 +268,24 @@ module Google
|
|
237
268
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
238
269
|
#
|
239
270
|
# @param filter [::String]
|
240
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
241
|
-
#
|
242
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
243
|
-
#
|
244
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
245
|
-
#
|
246
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
271
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
247
272
|
# @param include_all_scopes [::Boolean]
|
248
273
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
249
274
|
# @param max_results [::Integer]
|
250
275
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
251
276
|
# @param order_by [::String]
|
252
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
253
|
-
#
|
254
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
255
|
-
#
|
256
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
277
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
257
278
|
# @param page_token [::String]
|
258
279
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
259
280
|
# @param project [::String]
|
260
281
|
# Project ID for this request.
|
261
282
|
# @param return_partial_success [::Boolean]
|
262
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
263
|
-
# @yield [result,
|
264
|
-
# @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::InstanceGroupManagersScopedList>]
|
265
286
|
# @yieldparam response [::Faraday::Response]
|
266
287
|
#
|
267
|
-
# @return [::Google::Cloud::Compute::V1::
|
288
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstanceGroupManagersScopedList>]
|
268
289
|
#
|
269
290
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
270
291
|
def aggregated_list request, options = nil
|
@@ -276,7 +297,7 @@ module Google
|
|
276
297
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
277
298
|
|
278
299
|
# Customize the options with defaults
|
279
|
-
call_metadata =
|
300
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
280
301
|
|
281
302
|
# Set x-goog-api-client header
|
282
303
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -284,19 +305,17 @@ module Google
|
|
284
305
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
285
306
|
transports_version_send: [:rest]
|
286
307
|
|
287
|
-
options.apply_defaults timeout: @config.timeout,
|
308
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
288
309
|
metadata: call_metadata
|
289
310
|
|
290
|
-
|
291
|
-
|
292
|
-
uri: uri,
|
293
|
-
params: query_string_params,
|
294
|
-
options: options
|
295
|
-
)
|
296
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
311
|
+
options.apply_defaults timeout: @config.timeout,
|
312
|
+
metadata: @config.metadata
|
297
313
|
|
298
|
-
|
299
|
-
|
314
|
+
@instance_group_managers_stub.aggregated_list request, options do |result, response|
|
315
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_group_managers_stub, :aggregated_list, "items", request, result, options
|
316
|
+
yield result, response if block_given?
|
317
|
+
return result
|
318
|
+
end
|
300
319
|
rescue ::Faraday::Error => e
|
301
320
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
302
321
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -330,11 +349,11 @@ module Google
|
|
330
349
|
# Project ID for this request.
|
331
350
|
# @param zone [::String]
|
332
351
|
# The name of the zone where the managed instance group is located. Should conform to RFC1035.
|
333
|
-
# @yield [result,
|
334
|
-
# @yieldparam result [::
|
352
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
353
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
335
354
|
# @yieldparam response [::Faraday::Response]
|
336
355
|
#
|
337
|
-
# @return [::
|
356
|
+
# @return [::Gapic::Rest::BaseOperation]
|
338
357
|
#
|
339
358
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
340
359
|
def apply_updates_to_instances request, options = nil
|
@@ -346,7 +365,7 @@ module Google
|
|
346
365
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
347
366
|
|
348
367
|
# Customize the options with defaults
|
349
|
-
call_metadata =
|
368
|
+
call_metadata = @config.rpcs.apply_updates_to_instances.metadata.to_h
|
350
369
|
|
351
370
|
# Set x-goog-api-client header
|
352
371
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -354,19 +373,17 @@ module Google
|
|
354
373
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
355
374
|
transports_version_send: [:rest]
|
356
375
|
|
357
|
-
options.apply_defaults timeout: @config.timeout,
|
376
|
+
options.apply_defaults timeout: @config.rpcs.apply_updates_to_instances.timeout,
|
358
377
|
metadata: call_metadata
|
359
378
|
|
360
|
-
|
361
|
-
|
362
|
-
uri: uri,
|
363
|
-
body: body,
|
364
|
-
options: options
|
365
|
-
)
|
366
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
379
|
+
options.apply_defaults timeout: @config.timeout,
|
380
|
+
metadata: @config.metadata
|
367
381
|
|
368
|
-
|
369
|
-
|
382
|
+
@instance_group_managers_stub.apply_updates_to_instances request, options do |result, response|
|
383
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
384
|
+
yield result, response if block_given?
|
385
|
+
return result
|
386
|
+
end
|
370
387
|
rescue ::Faraday::Error => e
|
371
388
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
372
389
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -399,18 +416,14 @@ module Google
|
|
399
416
|
# @param project [::String]
|
400
417
|
# Project ID for this request.
|
401
418
|
# @param request_id [::String]
|
402
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
403
|
-
#
|
404
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
|
405
|
-
#
|
406
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
419
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
407
420
|
# @param zone [::String]
|
408
421
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
409
|
-
# @yield [result,
|
410
|
-
# @yieldparam result [::
|
422
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
423
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
411
424
|
# @yieldparam response [::Faraday::Response]
|
412
425
|
#
|
413
|
-
# @return [::
|
426
|
+
# @return [::Gapic::Rest::BaseOperation]
|
414
427
|
#
|
415
428
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
416
429
|
def create_instances request, options = nil
|
@@ -422,7 +435,7 @@ module Google
|
|
422
435
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
423
436
|
|
424
437
|
# Customize the options with defaults
|
425
|
-
call_metadata =
|
438
|
+
call_metadata = @config.rpcs.create_instances.metadata.to_h
|
426
439
|
|
427
440
|
# Set x-goog-api-client header
|
428
441
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -430,27 +443,24 @@ module Google
|
|
430
443
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
431
444
|
transports_version_send: [:rest]
|
432
445
|
|
433
|
-
options.apply_defaults timeout: @config.timeout,
|
446
|
+
options.apply_defaults timeout: @config.rpcs.create_instances.timeout,
|
434
447
|
metadata: call_metadata
|
435
448
|
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
yield result, response if block_given?
|
446
|
-
result
|
449
|
+
options.apply_defaults timeout: @config.timeout,
|
450
|
+
metadata: @config.metadata
|
451
|
+
|
452
|
+
@instance_group_managers_stub.create_instances request, options do |result, response|
|
453
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
454
|
+
yield result, response if block_given?
|
455
|
+
return result
|
456
|
+
end
|
447
457
|
rescue ::Faraday::Error => e
|
448
458
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
449
459
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
450
460
|
end
|
451
461
|
|
452
462
|
##
|
453
|
-
# Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read
|
463
|
+
# Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
|
454
464
|
#
|
455
465
|
# @overload delete(request, options = nil)
|
456
466
|
# Pass arguments to `delete` via a request object, either of type
|
@@ -474,18 +484,14 @@ module Google
|
|
474
484
|
# @param project [::String]
|
475
485
|
# Project ID for this request.
|
476
486
|
# @param request_id [::String]
|
477
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
478
|
-
#
|
479
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
480
|
-
#
|
481
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
487
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
482
488
|
# @param zone [::String]
|
483
489
|
# The name of the zone where the managed instance group is located.
|
484
|
-
# @yield [result,
|
485
|
-
# @yieldparam result [::
|
490
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
491
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
486
492
|
# @yieldparam response [::Faraday::Response]
|
487
493
|
#
|
488
|
-
# @return [::
|
494
|
+
# @return [::Gapic::Rest::BaseOperation]
|
489
495
|
#
|
490
496
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
491
497
|
def delete request, options = nil
|
@@ -497,7 +503,7 @@ module Google
|
|
497
503
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
498
504
|
|
499
505
|
# Customize the options with defaults
|
500
|
-
call_metadata =
|
506
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
501
507
|
|
502
508
|
# Set x-goog-api-client header
|
503
509
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -505,30 +511,24 @@ module Google
|
|
505
511
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
506
512
|
transports_version_send: [:rest]
|
507
513
|
|
508
|
-
options.apply_defaults timeout: @config.timeout,
|
514
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
509
515
|
metadata: call_metadata
|
510
516
|
|
511
|
-
|
512
|
-
|
513
|
-
uri: uri,
|
514
|
-
params: query_string_params,
|
515
|
-
options: options
|
516
|
-
)
|
517
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata
|
518
519
|
|
519
|
-
|
520
|
-
|
520
|
+
@instance_group_managers_stub.delete request, options do |result, response|
|
521
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
522
|
+
yield result, response if block_given?
|
523
|
+
return result
|
524
|
+
end
|
521
525
|
rescue ::Faraday::Error => e
|
522
526
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
523
527
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
524
528
|
end
|
525
529
|
|
526
530
|
##
|
527
|
-
# Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
|
528
|
-
#
|
529
|
-
# If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
|
530
|
-
#
|
531
|
-
# You can specify a maximum of 1000 instances with this method per request.
|
531
|
+
# Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
|
532
532
|
#
|
533
533
|
# @overload delete_instances(request, options = nil)
|
534
534
|
# Pass arguments to `delete_instances` via a request object, either of type
|
@@ -554,18 +554,14 @@ module Google
|
|
554
554
|
# @param project [::String]
|
555
555
|
# Project ID for this request.
|
556
556
|
# @param request_id [::String]
|
557
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
558
|
-
#
|
559
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
560
|
-
#
|
561
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
557
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
562
558
|
# @param zone [::String]
|
563
559
|
# The name of the zone where the managed instance group is located.
|
564
|
-
# @yield [result,
|
565
|
-
# @yieldparam result [::
|
560
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
561
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
566
562
|
# @yieldparam response [::Faraday::Response]
|
567
563
|
#
|
568
|
-
# @return [::
|
564
|
+
# @return [::Gapic::Rest::BaseOperation]
|
569
565
|
#
|
570
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
571
567
|
def delete_instances request, options = nil
|
@@ -577,7 +573,7 @@ module Google
|
|
577
573
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
578
574
|
|
579
575
|
# Customize the options with defaults
|
580
|
-
call_metadata =
|
576
|
+
call_metadata = @config.rpcs.delete_instances.metadata.to_h
|
581
577
|
|
582
578
|
# Set x-goog-api-client header
|
583
579
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -585,20 +581,17 @@ module Google
|
|
585
581
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
586
582
|
transports_version_send: [:rest]
|
587
583
|
|
588
|
-
options.apply_defaults timeout: @config.timeout,
|
584
|
+
options.apply_defaults timeout: @config.rpcs.delete_instances.timeout,
|
589
585
|
metadata: call_metadata
|
590
586
|
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
yield result, response if block_given?
|
601
|
-
result
|
587
|
+
options.apply_defaults timeout: @config.timeout,
|
588
|
+
metadata: @config.metadata
|
589
|
+
|
590
|
+
@instance_group_managers_stub.delete_instances request, options do |result, response|
|
591
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
592
|
+
yield result, response if block_given?
|
593
|
+
return result
|
594
|
+
end
|
602
595
|
rescue ::Faraday::Error => e
|
603
596
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
604
597
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -632,11 +625,11 @@ module Google
|
|
632
625
|
# Project ID for this request.
|
633
626
|
# @param zone [::String]
|
634
627
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
635
|
-
# @yield [result,
|
636
|
-
# @yieldparam result [::
|
628
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
629
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
637
630
|
# @yieldparam response [::Faraday::Response]
|
638
631
|
#
|
639
|
-
# @return [::
|
632
|
+
# @return [::Gapic::Rest::BaseOperation]
|
640
633
|
#
|
641
634
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
642
635
|
def delete_per_instance_configs request, options = nil
|
@@ -648,7 +641,7 @@ module Google
|
|
648
641
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
649
642
|
|
650
643
|
# Customize the options with defaults
|
651
|
-
call_metadata =
|
644
|
+
call_metadata = @config.rpcs.delete_per_instance_configs.metadata.to_h
|
652
645
|
|
653
646
|
# Set x-goog-api-client header
|
654
647
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -656,19 +649,17 @@ module Google
|
|
656
649
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
657
650
|
transports_version_send: [:rest]
|
658
651
|
|
659
|
-
options.apply_defaults timeout: @config.timeout,
|
652
|
+
options.apply_defaults timeout: @config.rpcs.delete_per_instance_configs.timeout,
|
660
653
|
metadata: call_metadata
|
661
654
|
|
662
|
-
|
663
|
-
|
664
|
-
uri: uri,
|
665
|
-
body: body,
|
666
|
-
options: options
|
667
|
-
)
|
668
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
655
|
+
options.apply_defaults timeout: @config.timeout,
|
656
|
+
metadata: @config.metadata
|
669
657
|
|
670
|
-
|
671
|
-
|
658
|
+
@instance_group_managers_stub.delete_per_instance_configs request, options do |result, response|
|
659
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
660
|
+
yield result, response if block_given?
|
661
|
+
return result
|
662
|
+
end
|
672
663
|
rescue ::Faraday::Error => e
|
673
664
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
674
665
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -700,7 +691,7 @@ module Google
|
|
700
691
|
# Project ID for this request.
|
701
692
|
# @param zone [::String]
|
702
693
|
# The name of the zone where the managed instance group is located.
|
703
|
-
# @yield [result,
|
694
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
704
695
|
# @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManager]
|
705
696
|
# @yieldparam response [::Faraday::Response]
|
706
697
|
#
|
@@ -716,7 +707,7 @@ module Google
|
|
716
707
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
717
708
|
|
718
709
|
# Customize the options with defaults
|
719
|
-
call_metadata =
|
710
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
720
711
|
|
721
712
|
# Set x-goog-api-client header
|
722
713
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -724,27 +715,23 @@ module Google
|
|
724
715
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
725
716
|
transports_version_send: [:rest]
|
726
717
|
|
727
|
-
options.apply_defaults timeout: @config.timeout,
|
718
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
728
719
|
metadata: call_metadata
|
729
720
|
|
730
|
-
|
731
|
-
|
732
|
-
uri: uri,
|
733
|
-
options: options
|
734
|
-
)
|
735
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManager.decode_json response.body, ignore_unknown_fields: true
|
721
|
+
options.apply_defaults timeout: @config.timeout,
|
722
|
+
metadata: @config.metadata
|
736
723
|
|
737
|
-
|
738
|
-
|
724
|
+
@instance_group_managers_stub.get request, options do |result, response|
|
725
|
+
yield result, response if block_given?
|
726
|
+
return result
|
727
|
+
end
|
739
728
|
rescue ::Faraday::Error => e
|
740
729
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
741
730
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
742
731
|
end
|
743
732
|
|
744
733
|
##
|
745
|
-
# Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
|
746
|
-
#
|
747
|
-
# A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
|
734
|
+
# Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
|
748
735
|
#
|
749
736
|
# @overload insert(request, options = nil)
|
750
737
|
# Pass arguments to `insert` via a request object, either of type
|
@@ -768,18 +755,14 @@ module Google
|
|
768
755
|
# @param project [::String]
|
769
756
|
# Project ID for this request.
|
770
757
|
# @param request_id [::String]
|
771
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
772
|
-
#
|
773
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
774
|
-
#
|
775
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
758
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
776
759
|
# @param zone [::String]
|
777
760
|
# The name of the zone where you want to create the managed instance group.
|
778
|
-
# @yield [result,
|
779
|
-
# @yieldparam result [::
|
761
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
762
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
780
763
|
# @yieldparam response [::Faraday::Response]
|
781
764
|
#
|
782
|
-
# @return [::
|
765
|
+
# @return [::Gapic::Rest::BaseOperation]
|
783
766
|
#
|
784
767
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
785
768
|
def insert request, options = nil
|
@@ -791,7 +774,7 @@ module Google
|
|
791
774
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
792
775
|
|
793
776
|
# Customize the options with defaults
|
794
|
-
call_metadata =
|
777
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
795
778
|
|
796
779
|
# Set x-goog-api-client header
|
797
780
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -799,20 +782,17 @@ module Google
|
|
799
782
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
800
783
|
transports_version_send: [:rest]
|
801
784
|
|
802
|
-
options.apply_defaults timeout: @config.timeout,
|
785
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
803
786
|
metadata: call_metadata
|
804
787
|
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
yield result, response if block_given?
|
815
|
-
result
|
788
|
+
options.apply_defaults timeout: @config.timeout,
|
789
|
+
metadata: @config.metadata
|
790
|
+
|
791
|
+
@instance_group_managers_stub.insert request, options do |result, response|
|
792
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
793
|
+
yield result, response if block_given?
|
794
|
+
return result
|
795
|
+
end
|
816
796
|
rescue ::Faraday::Error => e
|
817
797
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
818
798
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -839,34 +819,24 @@ module Google
|
|
839
819
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
840
820
|
#
|
841
821
|
# @param filter [::String]
|
842
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
843
|
-
#
|
844
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
845
|
-
#
|
846
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
847
|
-
#
|
848
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
822
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
849
823
|
# @param max_results [::Integer]
|
850
824
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
851
825
|
# @param order_by [::String]
|
852
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
853
|
-
#
|
854
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
855
|
-
#
|
856
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
826
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
857
827
|
# @param page_token [::String]
|
858
828
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
859
829
|
# @param project [::String]
|
860
830
|
# Project ID for this request.
|
861
831
|
# @param return_partial_success [::Boolean]
|
862
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
832
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
863
833
|
# @param zone [::String]
|
864
834
|
# The name of the zone where the managed instance group is located.
|
865
|
-
# @yield [result,
|
866
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
835
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
836
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>]
|
867
837
|
# @yieldparam response [::Faraday::Response]
|
868
838
|
#
|
869
|
-
# @return [::Google::Cloud::Compute::V1::
|
839
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>]
|
870
840
|
#
|
871
841
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
872
842
|
def list request, options = nil
|
@@ -878,7 +848,7 @@ module Google
|
|
878
848
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
879
849
|
|
880
850
|
# Customize the options with defaults
|
881
|
-
call_metadata =
|
851
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
882
852
|
|
883
853
|
# Set x-goog-api-client header
|
884
854
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -886,19 +856,17 @@ module Google
|
|
886
856
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
887
857
|
transports_version_send: [:rest]
|
888
858
|
|
889
|
-
options.apply_defaults timeout: @config.timeout,
|
859
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
890
860
|
metadata: call_metadata
|
891
861
|
|
892
|
-
|
893
|
-
|
894
|
-
uri: uri,
|
895
|
-
params: query_string_params,
|
896
|
-
options: options
|
897
|
-
)
|
898
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManagerList.decode_json response.body, ignore_unknown_fields: true
|
862
|
+
options.apply_defaults timeout: @config.timeout,
|
863
|
+
metadata: @config.metadata
|
899
864
|
|
900
|
-
|
901
|
-
|
865
|
+
@instance_group_managers_stub.list request, options do |result, response|
|
866
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_group_managers_stub, :list, "items", request, result, options
|
867
|
+
yield result, response if block_given?
|
868
|
+
return result
|
869
|
+
end
|
902
870
|
rescue ::Faraday::Error => e
|
903
871
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
904
872
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -925,36 +893,26 @@ module Google
|
|
925
893
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
926
894
|
#
|
927
895
|
# @param filter [::String]
|
928
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
929
|
-
#
|
930
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
931
|
-
#
|
932
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
933
|
-
#
|
934
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
896
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
935
897
|
# @param instance_group_manager [::String]
|
936
|
-
# The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]\\{0,61}[a-z0-9])?)|
|
898
|
+
# The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]\\{0,61}[a-z0-9])?)|1-9\\{0,19}.
|
937
899
|
# @param max_results [::Integer]
|
938
900
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
939
901
|
# @param order_by [::String]
|
940
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
941
|
-
#
|
942
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
943
|
-
#
|
944
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
902
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
945
903
|
# @param page_token [::String]
|
946
904
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
947
905
|
# @param project [::String]
|
948
906
|
# Project ID for this request.
|
949
907
|
# @param return_partial_success [::Boolean]
|
950
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
908
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
951
909
|
# @param zone [::String]
|
952
910
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
953
|
-
# @yield [result,
|
954
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
911
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
912
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>]
|
955
913
|
# @yieldparam response [::Faraday::Response]
|
956
914
|
#
|
957
|
-
# @return [::Google::Cloud::Compute::V1::
|
915
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>]
|
958
916
|
#
|
959
917
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
960
918
|
def list_errors request, options = nil
|
@@ -966,7 +924,7 @@ module Google
|
|
966
924
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
967
925
|
|
968
926
|
# Customize the options with defaults
|
969
|
-
call_metadata =
|
927
|
+
call_metadata = @config.rpcs.list_errors.metadata.to_h
|
970
928
|
|
971
929
|
# Set x-goog-api-client header
|
972
930
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -974,19 +932,17 @@ module Google
|
|
974
932
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
975
933
|
transports_version_send: [:rest]
|
976
934
|
|
977
|
-
options.apply_defaults timeout: @config.timeout,
|
935
|
+
options.apply_defaults timeout: @config.rpcs.list_errors.timeout,
|
978
936
|
metadata: call_metadata
|
979
937
|
|
980
|
-
|
981
|
-
|
982
|
-
uri: uri,
|
983
|
-
params: query_string_params,
|
984
|
-
options: options
|
985
|
-
)
|
986
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse.decode_json response.body, ignore_unknown_fields: true
|
938
|
+
options.apply_defaults timeout: @config.timeout,
|
939
|
+
metadata: @config.metadata
|
987
940
|
|
988
|
-
|
989
|
-
|
941
|
+
@instance_group_managers_stub.list_errors request, options do |result, response|
|
942
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_group_managers_stub, :list_errors, "items", request, result, options
|
943
|
+
yield result, response if block_given?
|
944
|
+
return result
|
945
|
+
end
|
990
946
|
rescue ::Faraday::Error => e
|
991
947
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
992
948
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1013,36 +969,26 @@ module Google
|
|
1013
969
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1014
970
|
#
|
1015
971
|
# @param filter [::String]
|
1016
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
1017
|
-
#
|
1018
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
1019
|
-
#
|
1020
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
1021
|
-
#
|
1022
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
972
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
1023
973
|
# @param instance_group_manager [::String]
|
1024
974
|
# The name of the managed instance group.
|
1025
975
|
# @param max_results [::Integer]
|
1026
976
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
1027
977
|
# @param order_by [::String]
|
1028
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
1029
|
-
#
|
1030
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
1031
|
-
#
|
1032
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
978
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
1033
979
|
# @param page_token [::String]
|
1034
980
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
1035
981
|
# @param project [::String]
|
1036
982
|
# Project ID for this request.
|
1037
983
|
# @param return_partial_success [::Boolean]
|
1038
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
984
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
1039
985
|
# @param zone [::String]
|
1040
986
|
# The name of the zone where the managed instance group is located.
|
1041
|
-
# @yield [result,
|
1042
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
987
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
988
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>]
|
1043
989
|
# @yieldparam response [::Faraday::Response]
|
1044
990
|
#
|
1045
|
-
# @return [::Google::Cloud::Compute::V1::
|
991
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>]
|
1046
992
|
#
|
1047
993
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1048
994
|
def list_managed_instances request, options = nil
|
@@ -1054,7 +1000,7 @@ module Google
|
|
1054
1000
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1055
1001
|
|
1056
1002
|
# Customize the options with defaults
|
1057
|
-
call_metadata =
|
1003
|
+
call_metadata = @config.rpcs.list_managed_instances.metadata.to_h
|
1058
1004
|
|
1059
1005
|
# Set x-goog-api-client header
|
1060
1006
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1062,19 +1008,17 @@ module Google
|
|
1062
1008
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1063
1009
|
transports_version_send: [:rest]
|
1064
1010
|
|
1065
|
-
options.apply_defaults timeout: @config.timeout,
|
1011
|
+
options.apply_defaults timeout: @config.rpcs.list_managed_instances.timeout,
|
1066
1012
|
metadata: call_metadata
|
1067
1013
|
|
1068
|
-
|
1069
|
-
|
1070
|
-
uri: uri,
|
1071
|
-
params: query_string_params,
|
1072
|
-
options: options
|
1073
|
-
)
|
1074
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse.decode_json response.body, ignore_unknown_fields: true
|
1014
|
+
options.apply_defaults timeout: @config.timeout,
|
1015
|
+
metadata: @config.metadata
|
1075
1016
|
|
1076
|
-
|
1077
|
-
|
1017
|
+
@instance_group_managers_stub.list_managed_instances request, options do |result, response|
|
1018
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_group_managers_stub, :list_managed_instances, "managed_instances", request, result, options
|
1019
|
+
yield result, response if block_given?
|
1020
|
+
return result
|
1021
|
+
end
|
1078
1022
|
rescue ::Faraday::Error => e
|
1079
1023
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1080
1024
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1101,36 +1045,26 @@ module Google
|
|
1101
1045
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1102
1046
|
#
|
1103
1047
|
# @param filter [::String]
|
1104
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
1105
|
-
#
|
1106
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
1107
|
-
#
|
1108
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
1109
|
-
#
|
1110
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
1048
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
1111
1049
|
# @param instance_group_manager [::String]
|
1112
1050
|
# The name of the managed instance group. It should conform to RFC1035.
|
1113
1051
|
# @param max_results [::Integer]
|
1114
1052
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
1115
1053
|
# @param order_by [::String]
|
1116
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
1117
|
-
#
|
1118
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
1119
|
-
#
|
1120
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
1054
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
1121
1055
|
# @param page_token [::String]
|
1122
1056
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
1123
1057
|
# @param project [::String]
|
1124
1058
|
# Project ID for this request.
|
1125
1059
|
# @param return_partial_success [::Boolean]
|
1126
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
1060
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
1127
1061
|
# @param zone [::String]
|
1128
1062
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
1129
|
-
# @yield [result,
|
1130
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
1063
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1064
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>]
|
1131
1065
|
# @yieldparam response [::Faraday::Response]
|
1132
1066
|
#
|
1133
|
-
# @return [::Google::Cloud::Compute::V1::
|
1067
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>]
|
1134
1068
|
#
|
1135
1069
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1136
1070
|
def list_per_instance_configs request, options = nil
|
@@ -1142,7 +1076,7 @@ module Google
|
|
1142
1076
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1143
1077
|
|
1144
1078
|
# Customize the options with defaults
|
1145
|
-
call_metadata =
|
1079
|
+
call_metadata = @config.rpcs.list_per_instance_configs.metadata.to_h
|
1146
1080
|
|
1147
1081
|
# Set x-goog-api-client header
|
1148
1082
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1150,26 +1084,24 @@ module Google
|
|
1150
1084
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1151
1085
|
transports_version_send: [:rest]
|
1152
1086
|
|
1153
|
-
options.apply_defaults timeout: @config.timeout,
|
1087
|
+
options.apply_defaults timeout: @config.rpcs.list_per_instance_configs.timeout,
|
1154
1088
|
metadata: call_metadata
|
1155
1089
|
|
1156
|
-
|
1157
|
-
|
1158
|
-
uri: uri,
|
1159
|
-
params: query_string_params,
|
1160
|
-
options: options
|
1161
|
-
)
|
1162
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true
|
1090
|
+
options.apply_defaults timeout: @config.timeout,
|
1091
|
+
metadata: @config.metadata
|
1163
1092
|
|
1164
|
-
|
1165
|
-
|
1093
|
+
@instance_group_managers_stub.list_per_instance_configs request, options do |result, response|
|
1094
|
+
result = ::Gapic::Rest::PagedEnumerable.new @instance_group_managers_stub, :list_per_instance_configs, "items", request, result, options
|
1095
|
+
yield result, response if block_given?
|
1096
|
+
return result
|
1097
|
+
end
|
1166
1098
|
rescue ::Faraday::Error => e
|
1167
1099
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1168
1100
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1169
1101
|
end
|
1170
1102
|
|
1171
1103
|
##
|
1172
|
-
# Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
|
1104
|
+
# Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.
|
1173
1105
|
#
|
1174
1106
|
# @overload patch(request, options = nil)
|
1175
1107
|
# Pass arguments to `patch` via a request object, either of type
|
@@ -1195,18 +1127,14 @@ module Google
|
|
1195
1127
|
# @param project [::String]
|
1196
1128
|
# Project ID for this request.
|
1197
1129
|
# @param request_id [::String]
|
1198
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1199
|
-
#
|
1200
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1201
|
-
#
|
1202
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1130
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1203
1131
|
# @param zone [::String]
|
1204
1132
|
# The name of the zone where you want to create the managed instance group.
|
1205
|
-
# @yield [result,
|
1206
|
-
# @yieldparam result [::
|
1133
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1134
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1207
1135
|
# @yieldparam response [::Faraday::Response]
|
1208
1136
|
#
|
1209
|
-
# @return [::
|
1137
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1210
1138
|
#
|
1211
1139
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1212
1140
|
def patch request, options = nil
|
@@ -1218,7 +1146,7 @@ module Google
|
|
1218
1146
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1219
1147
|
|
1220
1148
|
# Customize the options with defaults
|
1221
|
-
call_metadata =
|
1149
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
1222
1150
|
|
1223
1151
|
# Set x-goog-api-client header
|
1224
1152
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1226,20 +1154,17 @@ module Google
|
|
1226
1154
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1227
1155
|
transports_version_send: [:rest]
|
1228
1156
|
|
1229
|
-
options.apply_defaults timeout: @config.timeout,
|
1157
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
1230
1158
|
metadata: call_metadata
|
1231
1159
|
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
yield result, response if block_given?
|
1242
|
-
result
|
1160
|
+
options.apply_defaults timeout: @config.timeout,
|
1161
|
+
metadata: @config.metadata
|
1162
|
+
|
1163
|
+
@instance_group_managers_stub.patch request, options do |result, response|
|
1164
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1165
|
+
yield result, response if block_given?
|
1166
|
+
return result
|
1167
|
+
end
|
1243
1168
|
rescue ::Faraday::Error => e
|
1244
1169
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1245
1170
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1272,18 +1197,14 @@ module Google
|
|
1272
1197
|
# @param project [::String]
|
1273
1198
|
# Project ID for this request.
|
1274
1199
|
# @param request_id [::String]
|
1275
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1276
|
-
#
|
1277
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1278
|
-
#
|
1279
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1200
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1280
1201
|
# @param zone [::String]
|
1281
1202
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
1282
|
-
# @yield [result,
|
1283
|
-
# @yieldparam result [::
|
1203
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1204
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1284
1205
|
# @yieldparam response [::Faraday::Response]
|
1285
1206
|
#
|
1286
|
-
# @return [::
|
1207
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1287
1208
|
#
|
1288
1209
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1289
1210
|
def patch_per_instance_configs request, options = nil
|
@@ -1295,7 +1216,7 @@ module Google
|
|
1295
1216
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1296
1217
|
|
1297
1218
|
# Customize the options with defaults
|
1298
|
-
call_metadata =
|
1219
|
+
call_metadata = @config.rpcs.patch_per_instance_configs.metadata.to_h
|
1299
1220
|
|
1300
1221
|
# Set x-goog-api-client header
|
1301
1222
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1303,31 +1224,24 @@ module Google
|
|
1303
1224
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1304
1225
|
transports_version_send: [:rest]
|
1305
1226
|
|
1306
|
-
options.apply_defaults timeout: @config.timeout,
|
1227
|
+
options.apply_defaults timeout: @config.rpcs.patch_per_instance_configs.timeout,
|
1307
1228
|
metadata: call_metadata
|
1308
1229
|
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
yield result, response if block_given?
|
1319
|
-
result
|
1230
|
+
options.apply_defaults timeout: @config.timeout,
|
1231
|
+
metadata: @config.metadata
|
1232
|
+
|
1233
|
+
@instance_group_managers_stub.patch_per_instance_configs request, options do |result, response|
|
1234
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1235
|
+
yield result, response if block_given?
|
1236
|
+
return result
|
1237
|
+
end
|
1320
1238
|
rescue ::Faraday::Error => e
|
1321
1239
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1322
1240
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1323
1241
|
end
|
1324
1242
|
|
1325
1243
|
##
|
1326
|
-
# Flags the specified instances in the managed instance group to be immediately recreated.
|
1327
|
-
#
|
1328
|
-
# If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
|
1329
|
-
#
|
1330
|
-
# You can specify a maximum of 1000 instances with this method per request.
|
1244
|
+
# Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
|
1331
1245
|
#
|
1332
1246
|
# @overload recreate_instances(request, options = nil)
|
1333
1247
|
# Pass arguments to `recreate_instances` via a request object, either of type
|
@@ -1353,18 +1267,14 @@ module Google
|
|
1353
1267
|
# @param project [::String]
|
1354
1268
|
# Project ID for this request.
|
1355
1269
|
# @param request_id [::String]
|
1356
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1357
|
-
#
|
1358
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1359
|
-
#
|
1360
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1270
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1361
1271
|
# @param zone [::String]
|
1362
1272
|
# The name of the zone where the managed instance group is located.
|
1363
|
-
# @yield [result,
|
1364
|
-
# @yieldparam result [::
|
1273
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1274
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1365
1275
|
# @yieldparam response [::Faraday::Response]
|
1366
1276
|
#
|
1367
|
-
# @return [::
|
1277
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1368
1278
|
#
|
1369
1279
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1370
1280
|
def recreate_instances request, options = nil
|
@@ -1376,7 +1286,7 @@ module Google
|
|
1376
1286
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1377
1287
|
|
1378
1288
|
# Customize the options with defaults
|
1379
|
-
call_metadata =
|
1289
|
+
call_metadata = @config.rpcs.recreate_instances.metadata.to_h
|
1380
1290
|
|
1381
1291
|
# Set x-goog-api-client header
|
1382
1292
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1384,35 +1294,24 @@ module Google
|
|
1384
1294
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1385
1295
|
transports_version_send: [:rest]
|
1386
1296
|
|
1387
|
-
options.apply_defaults timeout: @config.timeout,
|
1297
|
+
options.apply_defaults timeout: @config.rpcs.recreate_instances.timeout,
|
1388
1298
|
metadata: call_metadata
|
1389
1299
|
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
yield result, response if block_given?
|
1400
|
-
result
|
1300
|
+
options.apply_defaults timeout: @config.timeout,
|
1301
|
+
metadata: @config.metadata
|
1302
|
+
|
1303
|
+
@instance_group_managers_stub.recreate_instances request, options do |result, response|
|
1304
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1305
|
+
yield result, response if block_given?
|
1306
|
+
return result
|
1307
|
+
end
|
1401
1308
|
rescue ::Faraday::Error => e
|
1402
1309
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1403
1310
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1404
1311
|
end
|
1405
1312
|
|
1406
1313
|
##
|
1407
|
-
# Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
|
1408
|
-
#
|
1409
|
-
# When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:
|
1410
|
-
#
|
1411
|
-
# + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.
|
1412
|
-
#
|
1413
|
-
# This list is subject to change.
|
1414
|
-
#
|
1415
|
-
# If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
|
1314
|
+
# Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
|
1416
1315
|
#
|
1417
1316
|
# @overload resize(request, options = nil)
|
1418
1317
|
# Pass arguments to `resize` via a request object, either of type
|
@@ -1436,20 +1335,16 @@ module Google
|
|
1436
1335
|
# @param project [::String]
|
1437
1336
|
# Project ID for this request.
|
1438
1337
|
# @param request_id [::String]
|
1439
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1440
|
-
#
|
1441
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1442
|
-
#
|
1443
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1338
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1444
1339
|
# @param size [::Integer]
|
1445
1340
|
# The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
|
1446
1341
|
# @param zone [::String]
|
1447
1342
|
# The name of the zone where the managed instance group is located.
|
1448
|
-
# @yield [result,
|
1449
|
-
# @yieldparam result [::
|
1343
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1344
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1450
1345
|
# @yieldparam response [::Faraday::Response]
|
1451
1346
|
#
|
1452
|
-
# @return [::
|
1347
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1453
1348
|
#
|
1454
1349
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1455
1350
|
def resize request, options = nil
|
@@ -1461,7 +1356,7 @@ module Google
|
|
1461
1356
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1462
1357
|
|
1463
1358
|
# Customize the options with defaults
|
1464
|
-
call_metadata =
|
1359
|
+
call_metadata = @config.rpcs.resize.metadata.to_h
|
1465
1360
|
|
1466
1361
|
# Set x-goog-api-client header
|
1467
1362
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1469,19 +1364,17 @@ module Google
|
|
1469
1364
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1470
1365
|
transports_version_send: [:rest]
|
1471
1366
|
|
1472
|
-
options.apply_defaults timeout: @config.timeout,
|
1367
|
+
options.apply_defaults timeout: @config.rpcs.resize.timeout,
|
1473
1368
|
metadata: call_metadata
|
1474
1369
|
|
1475
|
-
|
1476
|
-
|
1477
|
-
uri: uri,
|
1478
|
-
params: query_string_params,
|
1479
|
-
options: options
|
1480
|
-
)
|
1481
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
1370
|
+
options.apply_defaults timeout: @config.timeout,
|
1371
|
+
metadata: @config.metadata
|
1482
1372
|
|
1483
|
-
|
1484
|
-
|
1373
|
+
@instance_group_managers_stub.resize request, options do |result, response|
|
1374
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1375
|
+
yield result, response if block_given?
|
1376
|
+
return result
|
1377
|
+
end
|
1485
1378
|
rescue ::Faraday::Error => e
|
1486
1379
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1487
1380
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1514,18 +1407,14 @@ module Google
|
|
1514
1407
|
# @param project [::String]
|
1515
1408
|
# Project ID for this request.
|
1516
1409
|
# @param request_id [::String]
|
1517
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1518
|
-
#
|
1519
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1520
|
-
#
|
1521
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1410
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1522
1411
|
# @param zone [::String]
|
1523
1412
|
# The name of the zone where the managed instance group is located.
|
1524
|
-
# @yield [result,
|
1525
|
-
# @yieldparam result [::
|
1413
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1414
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1526
1415
|
# @yieldparam response [::Faraday::Response]
|
1527
1416
|
#
|
1528
|
-
# @return [::
|
1417
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1529
1418
|
#
|
1530
1419
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1531
1420
|
def set_instance_template request, options = nil
|
@@ -1537,7 +1426,7 @@ module Google
|
|
1537
1426
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1538
1427
|
|
1539
1428
|
# Customize the options with defaults
|
1540
|
-
call_metadata =
|
1429
|
+
call_metadata = @config.rpcs.set_instance_template.metadata.to_h
|
1541
1430
|
|
1542
1431
|
# Set x-goog-api-client header
|
1543
1432
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1545,20 +1434,17 @@ module Google
|
|
1545
1434
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1546
1435
|
transports_version_send: [:rest]
|
1547
1436
|
|
1548
|
-
options.apply_defaults timeout: @config.timeout,
|
1437
|
+
options.apply_defaults timeout: @config.rpcs.set_instance_template.timeout,
|
1549
1438
|
metadata: call_metadata
|
1550
1439
|
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
yield result, response if block_given?
|
1561
|
-
result
|
1440
|
+
options.apply_defaults timeout: @config.timeout,
|
1441
|
+
metadata: @config.metadata
|
1442
|
+
|
1443
|
+
@instance_group_managers_stub.set_instance_template request, options do |result, response|
|
1444
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1445
|
+
yield result, response if block_given?
|
1446
|
+
return result
|
1447
|
+
end
|
1562
1448
|
rescue ::Faraday::Error => e
|
1563
1449
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1564
1450
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1591,18 +1477,14 @@ module Google
|
|
1591
1477
|
# @param project [::String]
|
1592
1478
|
# Project ID for this request.
|
1593
1479
|
# @param request_id [::String]
|
1594
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1595
|
-
#
|
1596
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1597
|
-
#
|
1598
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1480
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1599
1481
|
# @param zone [::String]
|
1600
1482
|
# The name of the zone where the managed instance group is located.
|
1601
|
-
# @yield [result,
|
1602
|
-
# @yieldparam result [::
|
1483
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1484
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1603
1485
|
# @yieldparam response [::Faraday::Response]
|
1604
1486
|
#
|
1605
|
-
# @return [::
|
1487
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1606
1488
|
#
|
1607
1489
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1608
1490
|
def set_target_pools request, options = nil
|
@@ -1614,7 +1496,7 @@ module Google
|
|
1614
1496
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1615
1497
|
|
1616
1498
|
# Customize the options with defaults
|
1617
|
-
call_metadata =
|
1499
|
+
call_metadata = @config.rpcs.set_target_pools.metadata.to_h
|
1618
1500
|
|
1619
1501
|
# Set x-goog-api-client header
|
1620
1502
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1622,20 +1504,17 @@ module Google
|
|
1622
1504
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1623
1505
|
transports_version_send: [:rest]
|
1624
1506
|
|
1625
|
-
options.apply_defaults timeout: @config.timeout,
|
1507
|
+
options.apply_defaults timeout: @config.rpcs.set_target_pools.timeout,
|
1626
1508
|
metadata: call_metadata
|
1627
1509
|
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
yield result, response if block_given?
|
1638
|
-
result
|
1510
|
+
options.apply_defaults timeout: @config.timeout,
|
1511
|
+
metadata: @config.metadata
|
1512
|
+
|
1513
|
+
@instance_group_managers_stub.set_target_pools request, options do |result, response|
|
1514
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1515
|
+
yield result, response if block_given?
|
1516
|
+
return result
|
1517
|
+
end
|
1639
1518
|
rescue ::Faraday::Error => e
|
1640
1519
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1641
1520
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1668,18 +1547,14 @@ module Google
|
|
1668
1547
|
# @param project [::String]
|
1669
1548
|
# Project ID for this request.
|
1670
1549
|
# @param request_id [::String]
|
1671
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
1672
|
-
#
|
1673
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
1674
|
-
#
|
1675
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1550
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
1676
1551
|
# @param zone [::String]
|
1677
1552
|
# The name of the zone where the managed instance group is located. It should conform to RFC1035.
|
1678
|
-
# @yield [result,
|
1679
|
-
# @yieldparam result [::
|
1553
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1554
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1680
1555
|
# @yieldparam response [::Faraday::Response]
|
1681
1556
|
#
|
1682
|
-
# @return [::
|
1557
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1683
1558
|
#
|
1684
1559
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1685
1560
|
def update_per_instance_configs request, options = nil
|
@@ -1691,7 +1566,7 @@ module Google
|
|
1691
1566
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1692
1567
|
|
1693
1568
|
# Customize the options with defaults
|
1694
|
-
call_metadata =
|
1569
|
+
call_metadata = @config.rpcs.update_per_instance_configs.metadata.to_h
|
1695
1570
|
|
1696
1571
|
# Set x-goog-api-client header
|
1697
1572
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1699,20 +1574,17 @@ module Google
|
|
1699
1574
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1700
1575
|
transports_version_send: [:rest]
|
1701
1576
|
|
1702
|
-
options.apply_defaults timeout: @config.timeout,
|
1577
|
+
options.apply_defaults timeout: @config.rpcs.update_per_instance_configs.timeout,
|
1703
1578
|
metadata: call_metadata
|
1704
1579
|
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
yield result, response if block_given?
|
1715
|
-
result
|
1580
|
+
options.apply_defaults timeout: @config.timeout,
|
1581
|
+
metadata: @config.metadata
|
1582
|
+
|
1583
|
+
@instance_group_managers_stub.update_per_instance_configs request, options do |result, response|
|
1584
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1585
|
+
yield result, response if block_given?
|
1586
|
+
return result
|
1587
|
+
end
|
1716
1588
|
rescue ::Faraday::Error => e
|
1717
1589
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1718
1590
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1767,6 +1639,9 @@ module Google
|
|
1767
1639
|
# @!attribute [rw] timeout
|
1768
1640
|
# The call timeout in seconds.
|
1769
1641
|
# @return [::Numeric]
|
1642
|
+
# @!attribute [rw] metadata
|
1643
|
+
# Additional REST headers to be sent with the call.
|
1644
|
+
# @return [::Hash{::Symbol=>::String}]
|
1770
1645
|
#
|
1771
1646
|
class Configuration
|
1772
1647
|
extend ::Gapic::Config
|
@@ -1780,6 +1655,7 @@ module Google
|
|
1780
1655
|
config_attr :lib_name, nil, ::String, nil
|
1781
1656
|
config_attr :lib_version, nil, ::String, nil
|
1782
1657
|
config_attr :timeout, nil, ::Numeric, nil
|
1658
|
+
config_attr :metadata, nil, ::Hash, nil
|
1783
1659
|
|
1784
1660
|
# @private
|
1785
1661
|
def initialize parent_config = nil
|
@@ -1787,6 +1663,179 @@ module Google
|
|
1787
1663
|
|
1788
1664
|
yield self if block_given?
|
1789
1665
|
end
|
1666
|
+
|
1667
|
+
##
|
1668
|
+
# Configurations for individual RPCs
|
1669
|
+
# @return [Rpcs]
|
1670
|
+
#
|
1671
|
+
def rpcs
|
1672
|
+
@rpcs ||= begin
|
1673
|
+
parent_rpcs = nil
|
1674
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1675
|
+
Rpcs.new parent_rpcs
|
1676
|
+
end
|
1677
|
+
end
|
1678
|
+
|
1679
|
+
##
|
1680
|
+
# Configuration RPC class for the InstanceGroupManagers API.
|
1681
|
+
#
|
1682
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1683
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1684
|
+
# the following configuration fields:
|
1685
|
+
#
|
1686
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1687
|
+
#
|
1688
|
+
# there is one other field (`retry_policy`) that can be set
|
1689
|
+
# but is currently not supported for REST Gapic libraries.
|
1690
|
+
#
|
1691
|
+
class Rpcs
|
1692
|
+
##
|
1693
|
+
# RPC-specific configuration for `abandon_instances`
|
1694
|
+
# @return [::Gapic::Config::Method]
|
1695
|
+
#
|
1696
|
+
attr_reader :abandon_instances
|
1697
|
+
##
|
1698
|
+
# RPC-specific configuration for `aggregated_list`
|
1699
|
+
# @return [::Gapic::Config::Method]
|
1700
|
+
#
|
1701
|
+
attr_reader :aggregated_list
|
1702
|
+
##
|
1703
|
+
# RPC-specific configuration for `apply_updates_to_instances`
|
1704
|
+
# @return [::Gapic::Config::Method]
|
1705
|
+
#
|
1706
|
+
attr_reader :apply_updates_to_instances
|
1707
|
+
##
|
1708
|
+
# RPC-specific configuration for `create_instances`
|
1709
|
+
# @return [::Gapic::Config::Method]
|
1710
|
+
#
|
1711
|
+
attr_reader :create_instances
|
1712
|
+
##
|
1713
|
+
# RPC-specific configuration for `delete`
|
1714
|
+
# @return [::Gapic::Config::Method]
|
1715
|
+
#
|
1716
|
+
attr_reader :delete
|
1717
|
+
##
|
1718
|
+
# RPC-specific configuration for `delete_instances`
|
1719
|
+
# @return [::Gapic::Config::Method]
|
1720
|
+
#
|
1721
|
+
attr_reader :delete_instances
|
1722
|
+
##
|
1723
|
+
# RPC-specific configuration for `delete_per_instance_configs`
|
1724
|
+
# @return [::Gapic::Config::Method]
|
1725
|
+
#
|
1726
|
+
attr_reader :delete_per_instance_configs
|
1727
|
+
##
|
1728
|
+
# RPC-specific configuration for `get`
|
1729
|
+
# @return [::Gapic::Config::Method]
|
1730
|
+
#
|
1731
|
+
attr_reader :get
|
1732
|
+
##
|
1733
|
+
# RPC-specific configuration for `insert`
|
1734
|
+
# @return [::Gapic::Config::Method]
|
1735
|
+
#
|
1736
|
+
attr_reader :insert
|
1737
|
+
##
|
1738
|
+
# RPC-specific configuration for `list`
|
1739
|
+
# @return [::Gapic::Config::Method]
|
1740
|
+
#
|
1741
|
+
attr_reader :list
|
1742
|
+
##
|
1743
|
+
# RPC-specific configuration for `list_errors`
|
1744
|
+
# @return [::Gapic::Config::Method]
|
1745
|
+
#
|
1746
|
+
attr_reader :list_errors
|
1747
|
+
##
|
1748
|
+
# RPC-specific configuration for `list_managed_instances`
|
1749
|
+
# @return [::Gapic::Config::Method]
|
1750
|
+
#
|
1751
|
+
attr_reader :list_managed_instances
|
1752
|
+
##
|
1753
|
+
# RPC-specific configuration for `list_per_instance_configs`
|
1754
|
+
# @return [::Gapic::Config::Method]
|
1755
|
+
#
|
1756
|
+
attr_reader :list_per_instance_configs
|
1757
|
+
##
|
1758
|
+
# RPC-specific configuration for `patch`
|
1759
|
+
# @return [::Gapic::Config::Method]
|
1760
|
+
#
|
1761
|
+
attr_reader :patch
|
1762
|
+
##
|
1763
|
+
# RPC-specific configuration for `patch_per_instance_configs`
|
1764
|
+
# @return [::Gapic::Config::Method]
|
1765
|
+
#
|
1766
|
+
attr_reader :patch_per_instance_configs
|
1767
|
+
##
|
1768
|
+
# RPC-specific configuration for `recreate_instances`
|
1769
|
+
# @return [::Gapic::Config::Method]
|
1770
|
+
#
|
1771
|
+
attr_reader :recreate_instances
|
1772
|
+
##
|
1773
|
+
# RPC-specific configuration for `resize`
|
1774
|
+
# @return [::Gapic::Config::Method]
|
1775
|
+
#
|
1776
|
+
attr_reader :resize
|
1777
|
+
##
|
1778
|
+
# RPC-specific configuration for `set_instance_template`
|
1779
|
+
# @return [::Gapic::Config::Method]
|
1780
|
+
#
|
1781
|
+
attr_reader :set_instance_template
|
1782
|
+
##
|
1783
|
+
# RPC-specific configuration for `set_target_pools`
|
1784
|
+
# @return [::Gapic::Config::Method]
|
1785
|
+
#
|
1786
|
+
attr_reader :set_target_pools
|
1787
|
+
##
|
1788
|
+
# RPC-specific configuration for `update_per_instance_configs`
|
1789
|
+
# @return [::Gapic::Config::Method]
|
1790
|
+
#
|
1791
|
+
attr_reader :update_per_instance_configs
|
1792
|
+
|
1793
|
+
# @private
|
1794
|
+
def initialize parent_rpcs = nil
|
1795
|
+
abandon_instances_config = parent_rpcs.abandon_instances if parent_rpcs.respond_to? :abandon_instances
|
1796
|
+
@abandon_instances = ::Gapic::Config::Method.new abandon_instances_config
|
1797
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1798
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1799
|
+
apply_updates_to_instances_config = parent_rpcs.apply_updates_to_instances if parent_rpcs.respond_to? :apply_updates_to_instances
|
1800
|
+
@apply_updates_to_instances = ::Gapic::Config::Method.new apply_updates_to_instances_config
|
1801
|
+
create_instances_config = parent_rpcs.create_instances if parent_rpcs.respond_to? :create_instances
|
1802
|
+
@create_instances = ::Gapic::Config::Method.new create_instances_config
|
1803
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1804
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1805
|
+
delete_instances_config = parent_rpcs.delete_instances if parent_rpcs.respond_to? :delete_instances
|
1806
|
+
@delete_instances = ::Gapic::Config::Method.new delete_instances_config
|
1807
|
+
delete_per_instance_configs_config = parent_rpcs.delete_per_instance_configs if parent_rpcs.respond_to? :delete_per_instance_configs
|
1808
|
+
@delete_per_instance_configs = ::Gapic::Config::Method.new delete_per_instance_configs_config
|
1809
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1810
|
+
@get = ::Gapic::Config::Method.new get_config
|
1811
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1812
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1813
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1814
|
+
@list = ::Gapic::Config::Method.new list_config
|
1815
|
+
list_errors_config = parent_rpcs.list_errors if parent_rpcs.respond_to? :list_errors
|
1816
|
+
@list_errors = ::Gapic::Config::Method.new list_errors_config
|
1817
|
+
list_managed_instances_config = parent_rpcs.list_managed_instances if parent_rpcs.respond_to? :list_managed_instances
|
1818
|
+
@list_managed_instances = ::Gapic::Config::Method.new list_managed_instances_config
|
1819
|
+
list_per_instance_configs_config = parent_rpcs.list_per_instance_configs if parent_rpcs.respond_to? :list_per_instance_configs
|
1820
|
+
@list_per_instance_configs = ::Gapic::Config::Method.new list_per_instance_configs_config
|
1821
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1822
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1823
|
+
patch_per_instance_configs_config = parent_rpcs.patch_per_instance_configs if parent_rpcs.respond_to? :patch_per_instance_configs
|
1824
|
+
@patch_per_instance_configs = ::Gapic::Config::Method.new patch_per_instance_configs_config
|
1825
|
+
recreate_instances_config = parent_rpcs.recreate_instances if parent_rpcs.respond_to? :recreate_instances
|
1826
|
+
@recreate_instances = ::Gapic::Config::Method.new recreate_instances_config
|
1827
|
+
resize_config = parent_rpcs.resize if parent_rpcs.respond_to? :resize
|
1828
|
+
@resize = ::Gapic::Config::Method.new resize_config
|
1829
|
+
set_instance_template_config = parent_rpcs.set_instance_template if parent_rpcs.respond_to? :set_instance_template
|
1830
|
+
@set_instance_template = ::Gapic::Config::Method.new set_instance_template_config
|
1831
|
+
set_target_pools_config = parent_rpcs.set_target_pools if parent_rpcs.respond_to? :set_target_pools
|
1832
|
+
@set_target_pools = ::Gapic::Config::Method.new set_target_pools_config
|
1833
|
+
update_per_instance_configs_config = parent_rpcs.update_per_instance_configs if parent_rpcs.respond_to? :update_per_instance_configs
|
1834
|
+
@update_per_instance_configs = ::Gapic::Config::Method.new update_per_instance_configs_config
|
1835
|
+
|
1836
|
+
yield self if block_given?
|
1837
|
+
end
|
1838
|
+
end
|
1790
1839
|
end
|
1791
1840
|
end
|
1792
1841
|
end
|