google-cloud-compute-v1 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +12 -12
- data/README.md +4 -30
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +373 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +228 -143
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +294 -187
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +816 -135
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +334 -213
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +644 -0
- data/lib/google/cloud/compute/v1/disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +180 -107
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +317 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +463 -280
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/firewalls/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +292 -127
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +417 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +259 -112
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +207 -128
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +370 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +159 -88
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +274 -0
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +116 -64
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +186 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +170 -97
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +284 -174
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
- data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +497 -328
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +255 -161
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +198 -117
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +1079 -609
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1975 -0
- data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +188 -112
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +184 -108
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
- data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +91 -48
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
- data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +198 -117
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +251 -157
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +349 -173
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +333 -211
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
- data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +223 -132
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +123 -66
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +206 -124
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +338 -219
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
- data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +170 -97
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +196 -112
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +203 -125
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +145 -82
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +309 -198
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
- data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +472 -313
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +143 -84
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +75 -40
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +134 -73
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +203 -125
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +245 -148
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
- data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +223 -132
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +274 -166
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
- data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +141 -81
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +270 -166
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
- data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +197 -115
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
- data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +185 -110
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +314 -195
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +163 -97
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +210 -128
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +334 -159
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -188
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
- data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +229 -145
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +185 -113
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +250 -156
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
- data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +227 -135
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +166 -96
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +134 -73
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +98 -51
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
- data/lib/google/cloud/compute/v1.rb +5 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +2526 -640
- metadata +84 -8
@@ -0,0 +1,321 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/compute/v1/compute_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module RegionHealthChecks
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the RegionHealthChecks service.
|
29
|
+
# service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call and deserialing the response
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Baseline implementation for the delete REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionHealthCheckRequest]
|
45
|
+
# A request object representing the call parameters. Required.
|
46
|
+
# @param options [::Gapic::CallOptions]
|
47
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
48
|
+
#
|
49
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
50
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def delete request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
uri, _body, query_string_params = transcode_delete_request request_pb
|
59
|
+
response = @client_stub.make_delete_request(
|
60
|
+
uri: uri,
|
61
|
+
params: query_string_params,
|
62
|
+
options: options
|
63
|
+
)
|
64
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
65
|
+
|
66
|
+
yield result, response if block_given?
|
67
|
+
result
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# GRPC transcoding helper method for the delete REST call
|
72
|
+
#
|
73
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionHealthCheckRequest]
|
74
|
+
# A request object representing the call parameters. Required.
|
75
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
76
|
+
# Uri, Body, Query string parameters
|
77
|
+
def transcode_delete_request request_pb
|
78
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
|
79
|
+
body = nil
|
80
|
+
query_string_params = {}
|
81
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
82
|
+
|
83
|
+
[uri, body, query_string_params]
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Baseline implementation for the get REST call
|
88
|
+
#
|
89
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRegionHealthCheckRequest]
|
90
|
+
# A request object representing the call parameters. Required.
|
91
|
+
# @param options [::Gapic::CallOptions]
|
92
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
93
|
+
#
|
94
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
95
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::HealthCheck]
|
96
|
+
# @yieldparam response [::Faraday::Response]
|
97
|
+
#
|
98
|
+
# @return [::Google::Cloud::Compute::V1::HealthCheck]
|
99
|
+
# A result object deserialized from the server's reply
|
100
|
+
def get request_pb, options = nil
|
101
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
102
|
+
|
103
|
+
uri, _body, _query_string_params = transcode_get_request request_pb
|
104
|
+
response = @client_stub.make_get_request(
|
105
|
+
uri: uri,
|
106
|
+
options: options
|
107
|
+
)
|
108
|
+
result = ::Google::Cloud::Compute::V1::HealthCheck.decode_json response.body, ignore_unknown_fields: true
|
109
|
+
|
110
|
+
yield result, response if block_given?
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# GRPC transcoding helper method for the get REST call
|
116
|
+
#
|
117
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetRegionHealthCheckRequest]
|
118
|
+
# A request object representing the call parameters. Required.
|
119
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
120
|
+
# Uri, Body, Query string parameters
|
121
|
+
def transcode_get_request request_pb
|
122
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
|
123
|
+
body = nil
|
124
|
+
query_string_params = {}
|
125
|
+
|
126
|
+
[uri, body, query_string_params]
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# Baseline implementation for the insert REST call
|
131
|
+
#
|
132
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertRegionHealthCheckRequest]
|
133
|
+
# A request object representing the call parameters. Required.
|
134
|
+
# @param options [::Gapic::CallOptions]
|
135
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
136
|
+
#
|
137
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
138
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
139
|
+
# @yieldparam response [::Faraday::Response]
|
140
|
+
#
|
141
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
142
|
+
# A result object deserialized from the server's reply
|
143
|
+
def insert request_pb, options = nil
|
144
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
145
|
+
|
146
|
+
uri, body, query_string_params = transcode_insert_request request_pb
|
147
|
+
response = @client_stub.make_post_request(
|
148
|
+
uri: uri,
|
149
|
+
body: body,
|
150
|
+
params: query_string_params,
|
151
|
+
options: options
|
152
|
+
)
|
153
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
154
|
+
|
155
|
+
yield result, response if block_given?
|
156
|
+
result
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# GRPC transcoding helper method for the insert REST call
|
161
|
+
#
|
162
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertRegionHealthCheckRequest]
|
163
|
+
# A request object representing the call parameters. Required.
|
164
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
165
|
+
# Uri, Body, Query string parameters
|
166
|
+
def transcode_insert_request request_pb
|
167
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks"
|
168
|
+
body = request_pb.health_check_resource.to_json
|
169
|
+
query_string_params = {}
|
170
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
171
|
+
|
172
|
+
[uri, body, query_string_params]
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# Baseline implementation for the list REST call
|
177
|
+
#
|
178
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionHealthChecksRequest]
|
179
|
+
# A request object representing the call parameters. Required.
|
180
|
+
# @param options [::Gapic::CallOptions]
|
181
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
182
|
+
#
|
183
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
184
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::HealthCheckList]
|
185
|
+
# @yieldparam response [::Faraday::Response]
|
186
|
+
#
|
187
|
+
# @return [::Google::Cloud::Compute::V1::HealthCheckList]
|
188
|
+
# A result object deserialized from the server's reply
|
189
|
+
def list request_pb, options = nil
|
190
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
191
|
+
|
192
|
+
uri, _body, query_string_params = transcode_list_request request_pb
|
193
|
+
response = @client_stub.make_get_request(
|
194
|
+
uri: uri,
|
195
|
+
params: query_string_params,
|
196
|
+
options: options
|
197
|
+
)
|
198
|
+
result = ::Google::Cloud::Compute::V1::HealthCheckList.decode_json response.body, ignore_unknown_fields: true
|
199
|
+
|
200
|
+
yield result, response if block_given?
|
201
|
+
result
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# GRPC transcoding helper method for the list REST call
|
206
|
+
#
|
207
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListRegionHealthChecksRequest]
|
208
|
+
# A request object representing the call parameters. Required.
|
209
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
210
|
+
# Uri, Body, Query string parameters
|
211
|
+
def transcode_list_request request_pb
|
212
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks"
|
213
|
+
body = nil
|
214
|
+
query_string_params = {}
|
215
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
216
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
217
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
218
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
219
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
220
|
+
|
221
|
+
[uri, body, query_string_params]
|
222
|
+
end
|
223
|
+
|
224
|
+
##
|
225
|
+
# Baseline implementation for the patch REST call
|
226
|
+
#
|
227
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionHealthCheckRequest]
|
228
|
+
# A request object representing the call parameters. Required.
|
229
|
+
# @param options [::Gapic::CallOptions]
|
230
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
231
|
+
#
|
232
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
233
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
234
|
+
# @yieldparam response [::Faraday::Response]
|
235
|
+
#
|
236
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
237
|
+
# A result object deserialized from the server's reply
|
238
|
+
def patch request_pb, options = nil
|
239
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
240
|
+
|
241
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
242
|
+
response = @client_stub.make_patch_request(
|
243
|
+
uri: uri,
|
244
|
+
body: body,
|
245
|
+
params: query_string_params,
|
246
|
+
options: options
|
247
|
+
)
|
248
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
249
|
+
|
250
|
+
yield result, response if block_given?
|
251
|
+
result
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# GRPC transcoding helper method for the patch REST call
|
256
|
+
#
|
257
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionHealthCheckRequest]
|
258
|
+
# A request object representing the call parameters. Required.
|
259
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
260
|
+
# Uri, Body, Query string parameters
|
261
|
+
def transcode_patch_request request_pb
|
262
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
|
263
|
+
body = request_pb.health_check_resource.to_json
|
264
|
+
query_string_params = {}
|
265
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
266
|
+
|
267
|
+
[uri, body, query_string_params]
|
268
|
+
end
|
269
|
+
|
270
|
+
##
|
271
|
+
# Baseline implementation for the update REST call
|
272
|
+
#
|
273
|
+
# @param request_pb [::Google::Cloud::Compute::V1::UpdateRegionHealthCheckRequest]
|
274
|
+
# A request object representing the call parameters. Required.
|
275
|
+
# @param options [::Gapic::CallOptions]
|
276
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
277
|
+
#
|
278
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
279
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
280
|
+
# @yieldparam response [::Faraday::Response]
|
281
|
+
#
|
282
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
283
|
+
# A result object deserialized from the server's reply
|
284
|
+
def update request_pb, options = nil
|
285
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
286
|
+
|
287
|
+
uri, body, query_string_params = transcode_update_request request_pb
|
288
|
+
response = @client_stub.make_put_request(
|
289
|
+
uri: uri,
|
290
|
+
body: body,
|
291
|
+
params: query_string_params,
|
292
|
+
options: options
|
293
|
+
)
|
294
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
295
|
+
|
296
|
+
yield result, response if block_given?
|
297
|
+
result
|
298
|
+
end
|
299
|
+
|
300
|
+
##
|
301
|
+
# GRPC transcoding helper method for the update REST call
|
302
|
+
#
|
303
|
+
# @param request_pb [::Google::Cloud::Compute::V1::UpdateRegionHealthCheckRequest]
|
304
|
+
# A request object representing the call parameters. Required.
|
305
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
306
|
+
# Uri, Body, Query string parameters
|
307
|
+
def transcode_update_request request_pb
|
308
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
|
309
|
+
body = request_pb.health_check_resource.to_json
|
310
|
+
query_string_params = {}
|
311
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
312
|
+
|
313
|
+
[uri, body, query_string_params]
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
@@ -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/region_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 RegionInstanceGroupManagers API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :region_instance_group_managers_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all RegionInstanceGroupManagers clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all RegionInstanceGroupManagers clients
|
47
|
+
# ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::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,53 @@ 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.apply_updates_to_instances.timeout = 600.0
|
70
|
+
|
71
|
+
default_config.rpcs.create_instances.timeout = 600.0
|
72
|
+
|
73
|
+
default_config.rpcs.delete.timeout = 600.0
|
74
|
+
|
75
|
+
default_config.rpcs.delete_instances.timeout = 600.0
|
76
|
+
|
77
|
+
default_config.rpcs.delete_per_instance_configs.timeout = 600.0
|
78
|
+
|
79
|
+
default_config.rpcs.get.timeout = 600.0
|
80
|
+
default_config.rpcs.get.retry_policy = {
|
81
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
82
|
+
}
|
83
|
+
|
84
|
+
default_config.rpcs.insert.timeout = 600.0
|
85
|
+
|
86
|
+
default_config.rpcs.list.timeout = 600.0
|
87
|
+
default_config.rpcs.list.retry_policy = {
|
88
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.list_errors.timeout = 600.0
|
92
|
+
default_config.rpcs.list_errors.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_managed_instances.timeout = 600.0
|
97
|
+
|
98
|
+
default_config.rpcs.list_per_instance_configs.timeout = 600.0
|
99
|
+
|
100
|
+
default_config.rpcs.patch.timeout = 600.0
|
101
|
+
|
102
|
+
default_config.rpcs.patch_per_instance_configs.timeout = 600.0
|
103
|
+
|
104
|
+
default_config.rpcs.recreate_instances.timeout = 600.0
|
105
|
+
|
106
|
+
default_config.rpcs.resize.timeout = 600.0
|
107
|
+
|
108
|
+
default_config.rpcs.set_instance_template.timeout = 600.0
|
109
|
+
|
110
|
+
default_config.rpcs.set_target_pools.timeout = 600.0
|
111
|
+
|
112
|
+
default_config.rpcs.update_per_instance_configs.timeout = 600.0
|
113
|
+
|
69
114
|
default_config
|
70
115
|
end
|
71
116
|
yield @configure if block_given?
|
@@ -95,28 +140,20 @@ module Google
|
|
95
140
|
##
|
96
141
|
# Create a new RegionInstanceGroupManagers REST client object.
|
97
142
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new RegionInstanceGroupManagers REST client with the default
|
101
|
-
# configuration:
|
102
|
-
#
|
103
|
-
# client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new
|
143
|
+
# @example
|
104
144
|
#
|
105
|
-
#
|
106
|
-
#
|
145
|
+
# # Create a client using the default configuration
|
146
|
+
# client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new
|
107
147
|
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
148
|
+
# # Create a client using a custom configuration
|
149
|
+
# client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new do |config|
|
150
|
+
# config.timeout = 10.0
|
151
|
+
# end
|
111
152
|
#
|
112
153
|
# @yield [config] Configure the RegionInstanceGroupManagers client.
|
113
154
|
# @yieldparam config [Client::Configuration]
|
114
155
|
#
|
115
156
|
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
157
|
# Create the configuration object
|
121
158
|
@config = Configuration.new Client.configure
|
122
159
|
|
@@ -126,11 +163,11 @@ module Google
|
|
126
163
|
# Create credentials
|
127
164
|
credentials = @config.credentials
|
128
165
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
166
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
167
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
168
|
end
|
132
169
|
|
133
|
-
@
|
170
|
+
@region_instance_group_managers_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
171
|
end
|
135
172
|
|
136
173
|
# Service calls
|
@@ -173,11 +210,11 @@ module Google
|
|
173
210
|
# 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.
|
174
211
|
#
|
175
212
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
176
|
-
# @yield [result,
|
177
|
-
# @yieldparam result [::
|
213
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
214
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
178
215
|
# @yieldparam response [::Faraday::Response]
|
179
216
|
#
|
180
|
-
# @return [::
|
217
|
+
# @return [::Gapic::Rest::BaseOperation]
|
181
218
|
#
|
182
219
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
183
220
|
def abandon_instances request, options = nil
|
@@ -189,7 +226,7 @@ module Google
|
|
189
226
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
190
227
|
|
191
228
|
# Customize the options with defaults
|
192
|
-
call_metadata =
|
229
|
+
call_metadata = @config.rpcs.abandon_instances.metadata.to_h
|
193
230
|
|
194
231
|
# Set x-goog-api-client header
|
195
232
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -197,20 +234,17 @@ module Google
|
|
197
234
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
198
235
|
transports_version_send: [:rest]
|
199
236
|
|
200
|
-
options.apply_defaults timeout: @config.timeout,
|
237
|
+
options.apply_defaults timeout: @config.rpcs.abandon_instances.timeout,
|
201
238
|
metadata: call_metadata
|
202
239
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
yield result, response if block_given?
|
213
|
-
result
|
240
|
+
options.apply_defaults timeout: @config.timeout,
|
241
|
+
metadata: @config.metadata
|
242
|
+
|
243
|
+
@region_instance_group_managers_stub.abandon_instances request, options do |result, response|
|
244
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
245
|
+
yield result, response if block_given?
|
246
|
+
return result
|
247
|
+
end
|
214
248
|
rescue ::Faraday::Error => e
|
215
249
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
216
250
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -244,11 +278,11 @@ module Google
|
|
244
278
|
# Name of the region scoping this request, should conform to RFC1035.
|
245
279
|
# @param region_instance_group_managers_apply_updates_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersApplyUpdatesRequest, ::Hash]
|
246
280
|
# The body resource for this request
|
247
|
-
# @yield [result,
|
248
|
-
# @yieldparam result [::
|
281
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
282
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
249
283
|
# @yieldparam response [::Faraday::Response]
|
250
284
|
#
|
251
|
-
# @return [::
|
285
|
+
# @return [::Gapic::Rest::BaseOperation]
|
252
286
|
#
|
253
287
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
254
288
|
def apply_updates_to_instances request, options = nil
|
@@ -260,7 +294,7 @@ module Google
|
|
260
294
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
261
295
|
|
262
296
|
# Customize the options with defaults
|
263
|
-
call_metadata =
|
297
|
+
call_metadata = @config.rpcs.apply_updates_to_instances.metadata.to_h
|
264
298
|
|
265
299
|
# Set x-goog-api-client header
|
266
300
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -268,19 +302,17 @@ module Google
|
|
268
302
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
269
303
|
transports_version_send: [:rest]
|
270
304
|
|
271
|
-
options.apply_defaults timeout: @config.timeout,
|
305
|
+
options.apply_defaults timeout: @config.rpcs.apply_updates_to_instances.timeout,
|
272
306
|
metadata: call_metadata
|
273
307
|
|
274
|
-
|
275
|
-
|
276
|
-
uri: uri,
|
277
|
-
body: body,
|
278
|
-
options: options
|
279
|
-
)
|
280
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
308
|
+
options.apply_defaults timeout: @config.timeout,
|
309
|
+
metadata: @config.metadata
|
281
310
|
|
282
|
-
|
283
|
-
|
311
|
+
@region_instance_group_managers_stub.apply_updates_to_instances request, options do |result, response|
|
312
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
313
|
+
yield result, response if block_given?
|
314
|
+
return result
|
315
|
+
end
|
284
316
|
rescue ::Faraday::Error => e
|
285
317
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
286
318
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -320,11 +352,11 @@ module Google
|
|
320
352
|
# 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.
|
321
353
|
#
|
322
354
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
323
|
-
# @yield [result,
|
324
|
-
# @yieldparam result [::
|
355
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
356
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
325
357
|
# @yieldparam response [::Faraday::Response]
|
326
358
|
#
|
327
|
-
# @return [::
|
359
|
+
# @return [::Gapic::Rest::BaseOperation]
|
328
360
|
#
|
329
361
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
330
362
|
def create_instances request, options = nil
|
@@ -336,7 +368,7 @@ module Google
|
|
336
368
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
337
369
|
|
338
370
|
# Customize the options with defaults
|
339
|
-
call_metadata =
|
371
|
+
call_metadata = @config.rpcs.create_instances.metadata.to_h
|
340
372
|
|
341
373
|
# Set x-goog-api-client header
|
342
374
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -344,20 +376,17 @@ module Google
|
|
344
376
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
345
377
|
transports_version_send: [:rest]
|
346
378
|
|
347
|
-
options.apply_defaults timeout: @config.timeout,
|
379
|
+
options.apply_defaults timeout: @config.rpcs.create_instances.timeout,
|
348
380
|
metadata: call_metadata
|
349
381
|
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
yield result, response if block_given?
|
360
|
-
result
|
382
|
+
options.apply_defaults timeout: @config.timeout,
|
383
|
+
metadata: @config.metadata
|
384
|
+
|
385
|
+
@region_instance_group_managers_stub.create_instances request, options do |result, response|
|
386
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
387
|
+
yield result, response if block_given?
|
388
|
+
return result
|
389
|
+
end
|
361
390
|
rescue ::Faraday::Error => e
|
362
391
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
363
392
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -395,11 +424,11 @@ module Google
|
|
395
424
|
# 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.
|
396
425
|
#
|
397
426
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
398
|
-
# @yield [result,
|
399
|
-
# @yieldparam result [::
|
427
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
428
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
400
429
|
# @yieldparam response [::Faraday::Response]
|
401
430
|
#
|
402
|
-
# @return [::
|
431
|
+
# @return [::Gapic::Rest::BaseOperation]
|
403
432
|
#
|
404
433
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
405
434
|
def delete request, options = nil
|
@@ -411,7 +440,7 @@ module Google
|
|
411
440
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
412
441
|
|
413
442
|
# Customize the options with defaults
|
414
|
-
call_metadata =
|
443
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
415
444
|
|
416
445
|
# Set x-goog-api-client header
|
417
446
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -419,19 +448,17 @@ module Google
|
|
419
448
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
420
449
|
transports_version_send: [:rest]
|
421
450
|
|
422
|
-
options.apply_defaults timeout: @config.timeout,
|
451
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
423
452
|
metadata: call_metadata
|
424
453
|
|
425
|
-
|
426
|
-
|
427
|
-
uri: uri,
|
428
|
-
params: query_string_params,
|
429
|
-
options: options
|
430
|
-
)
|
431
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
454
|
+
options.apply_defaults timeout: @config.timeout,
|
455
|
+
metadata: @config.metadata
|
432
456
|
|
433
|
-
|
434
|
-
|
457
|
+
@region_instance_group_managers_stub.delete request, options do |result, response|
|
458
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
459
|
+
yield result, response if block_given?
|
460
|
+
return result
|
461
|
+
end
|
435
462
|
rescue ::Faraday::Error => e
|
436
463
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
437
464
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -475,11 +502,11 @@ module Google
|
|
475
502
|
# 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.
|
476
503
|
#
|
477
504
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
478
|
-
# @yield [result,
|
479
|
-
# @yieldparam result [::
|
505
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
506
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
480
507
|
# @yieldparam response [::Faraday::Response]
|
481
508
|
#
|
482
|
-
# @return [::
|
509
|
+
# @return [::Gapic::Rest::BaseOperation]
|
483
510
|
#
|
484
511
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
485
512
|
def delete_instances request, options = nil
|
@@ -491,7 +518,7 @@ module Google
|
|
491
518
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
492
519
|
|
493
520
|
# Customize the options with defaults
|
494
|
-
call_metadata =
|
521
|
+
call_metadata = @config.rpcs.delete_instances.metadata.to_h
|
495
522
|
|
496
523
|
# Set x-goog-api-client header
|
497
524
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -499,20 +526,17 @@ module Google
|
|
499
526
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
500
527
|
transports_version_send: [:rest]
|
501
528
|
|
502
|
-
options.apply_defaults timeout: @config.timeout,
|
529
|
+
options.apply_defaults timeout: @config.rpcs.delete_instances.timeout,
|
503
530
|
metadata: call_metadata
|
504
531
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
yield result, response if block_given?
|
515
|
-
result
|
532
|
+
options.apply_defaults timeout: @config.timeout,
|
533
|
+
metadata: @config.metadata
|
534
|
+
|
535
|
+
@region_instance_group_managers_stub.delete_instances request, options do |result, response|
|
536
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
537
|
+
yield result, response if block_given?
|
538
|
+
return result
|
539
|
+
end
|
516
540
|
rescue ::Faraday::Error => e
|
517
541
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
518
542
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -546,11 +570,11 @@ module Google
|
|
546
570
|
# Name of the region scoping this request, should conform to RFC1035.
|
547
571
|
# @param region_instance_group_manager_delete_instance_config_req_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerDeleteInstanceConfigReq, ::Hash]
|
548
572
|
# The body resource for this request
|
549
|
-
# @yield [result,
|
550
|
-
# @yieldparam result [::
|
573
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
574
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
551
575
|
# @yieldparam response [::Faraday::Response]
|
552
576
|
#
|
553
|
-
# @return [::
|
577
|
+
# @return [::Gapic::Rest::BaseOperation]
|
554
578
|
#
|
555
579
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
556
580
|
def delete_per_instance_configs request, options = nil
|
@@ -562,7 +586,7 @@ module Google
|
|
562
586
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
563
587
|
|
564
588
|
# Customize the options with defaults
|
565
|
-
call_metadata =
|
589
|
+
call_metadata = @config.rpcs.delete_per_instance_configs.metadata.to_h
|
566
590
|
|
567
591
|
# Set x-goog-api-client header
|
568
592
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -570,19 +594,17 @@ module Google
|
|
570
594
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
571
595
|
transports_version_send: [:rest]
|
572
596
|
|
573
|
-
options.apply_defaults timeout: @config.timeout,
|
597
|
+
options.apply_defaults timeout: @config.rpcs.delete_per_instance_configs.timeout,
|
574
598
|
metadata: call_metadata
|
575
599
|
|
576
|
-
|
577
|
-
|
578
|
-
uri: uri,
|
579
|
-
body: body,
|
580
|
-
options: options
|
581
|
-
)
|
582
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
600
|
+
options.apply_defaults timeout: @config.timeout,
|
601
|
+
metadata: @config.metadata
|
583
602
|
|
584
|
-
|
585
|
-
|
603
|
+
@region_instance_group_managers_stub.delete_per_instance_configs request, options do |result, response|
|
604
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
605
|
+
yield result, response if block_given?
|
606
|
+
return result
|
607
|
+
end
|
586
608
|
rescue ::Faraday::Error => e
|
587
609
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
588
610
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -614,7 +636,7 @@ module Google
|
|
614
636
|
# Project ID for this request.
|
615
637
|
# @param region [::String]
|
616
638
|
# Name of the region scoping this request.
|
617
|
-
# @yield [result,
|
639
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
618
640
|
# @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManager]
|
619
641
|
# @yieldparam response [::Faraday::Response]
|
620
642
|
#
|
@@ -630,7 +652,7 @@ module Google
|
|
630
652
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
631
653
|
|
632
654
|
# Customize the options with defaults
|
633
|
-
call_metadata =
|
655
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
634
656
|
|
635
657
|
# Set x-goog-api-client header
|
636
658
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -638,18 +660,16 @@ module Google
|
|
638
660
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
639
661
|
transports_version_send: [:rest]
|
640
662
|
|
641
|
-
options.apply_defaults timeout: @config.timeout,
|
663
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
642
664
|
metadata: call_metadata
|
643
665
|
|
644
|
-
|
645
|
-
|
646
|
-
uri: uri,
|
647
|
-
options: options
|
648
|
-
)
|
649
|
-
result = ::Google::Cloud::Compute::V1::InstanceGroupManager.decode_json response.body, ignore_unknown_fields: true
|
666
|
+
options.apply_defaults timeout: @config.timeout,
|
667
|
+
metadata: @config.metadata
|
650
668
|
|
651
|
-
|
652
|
-
|
669
|
+
@region_instance_group_managers_stub.get request, options do |result, response|
|
670
|
+
yield result, response if block_given?
|
671
|
+
return result
|
672
|
+
end
|
653
673
|
rescue ::Faraday::Error => e
|
654
674
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
655
675
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -689,11 +709,11 @@ module Google
|
|
689
709
|
# 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.
|
690
710
|
#
|
691
711
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
692
|
-
# @yield [result,
|
693
|
-
# @yieldparam result [::
|
712
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
713
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
694
714
|
# @yieldparam response [::Faraday::Response]
|
695
715
|
#
|
696
|
-
# @return [::
|
716
|
+
# @return [::Gapic::Rest::BaseOperation]
|
697
717
|
#
|
698
718
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
699
719
|
def insert request, options = nil
|
@@ -705,7 +725,7 @@ module Google
|
|
705
725
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
706
726
|
|
707
727
|
# Customize the options with defaults
|
708
|
-
call_metadata =
|
728
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
709
729
|
|
710
730
|
# Set x-goog-api-client header
|
711
731
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -713,20 +733,17 @@ module Google
|
|
713
733
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
714
734
|
transports_version_send: [:rest]
|
715
735
|
|
716
|
-
options.apply_defaults timeout: @config.timeout,
|
736
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
717
737
|
metadata: call_metadata
|
718
738
|
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
yield result, response if block_given?
|
729
|
-
result
|
739
|
+
options.apply_defaults timeout: @config.timeout,
|
740
|
+
metadata: @config.metadata
|
741
|
+
|
742
|
+
@region_instance_group_managers_stub.insert request, options do |result, response|
|
743
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
744
|
+
yield result, response if block_given?
|
745
|
+
return result
|
746
|
+
end
|
730
747
|
rescue ::Faraday::Error => e
|
731
748
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
732
749
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -775,12 +792,12 @@ module Google
|
|
775
792
|
# @param region [::String]
|
776
793
|
# Name of the region scoping this request.
|
777
794
|
# @param return_partial_success [::Boolean]
|
778
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
779
|
-
# @yield [result,
|
780
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
795
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
796
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
797
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>]
|
781
798
|
# @yieldparam response [::Faraday::Response]
|
782
799
|
#
|
783
|
-
# @return [::Google::Cloud::Compute::V1::
|
800
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>]
|
784
801
|
#
|
785
802
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
786
803
|
def list request, options = nil
|
@@ -792,7 +809,7 @@ module Google
|
|
792
809
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
793
810
|
|
794
811
|
# Customize the options with defaults
|
795
|
-
call_metadata =
|
812
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
796
813
|
|
797
814
|
# Set x-goog-api-client header
|
798
815
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -800,19 +817,17 @@ module Google
|
|
800
817
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
801
818
|
transports_version_send: [:rest]
|
802
819
|
|
803
|
-
options.apply_defaults timeout: @config.timeout,
|
820
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
804
821
|
metadata: call_metadata
|
805
822
|
|
806
|
-
|
807
|
-
|
808
|
-
uri: uri,
|
809
|
-
params: query_string_params,
|
810
|
-
options: options
|
811
|
-
)
|
812
|
-
result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList.decode_json response.body, ignore_unknown_fields: true
|
823
|
+
options.apply_defaults timeout: @config.timeout,
|
824
|
+
metadata: @config.metadata
|
813
825
|
|
814
|
-
|
815
|
-
|
826
|
+
@region_instance_group_managers_stub.list request, options do |result, response|
|
827
|
+
result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list, "items", request, result, options
|
828
|
+
yield result, response if block_given?
|
829
|
+
return result
|
830
|
+
end
|
816
831
|
rescue ::Faraday::Error => e
|
817
832
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
818
833
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -863,12 +878,12 @@ module Google
|
|
863
878
|
# @param region [::String]
|
864
879
|
# Name of the region scoping this request. This should conform to RFC1035.
|
865
880
|
# @param return_partial_success [::Boolean]
|
866
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
867
|
-
# @yield [result,
|
868
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
881
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
882
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
883
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>]
|
869
884
|
# @yieldparam response [::Faraday::Response]
|
870
885
|
#
|
871
|
-
# @return [::Google::Cloud::Compute::V1::
|
886
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>]
|
872
887
|
#
|
873
888
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
874
889
|
def list_errors request, options = nil
|
@@ -880,7 +895,7 @@ module Google
|
|
880
895
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
881
896
|
|
882
897
|
# Customize the options with defaults
|
883
|
-
call_metadata =
|
898
|
+
call_metadata = @config.rpcs.list_errors.metadata.to_h
|
884
899
|
|
885
900
|
# Set x-goog-api-client header
|
886
901
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -888,19 +903,17 @@ module Google
|
|
888
903
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
889
904
|
transports_version_send: [:rest]
|
890
905
|
|
891
|
-
options.apply_defaults timeout: @config.timeout,
|
906
|
+
options.apply_defaults timeout: @config.rpcs.list_errors.timeout,
|
892
907
|
metadata: call_metadata
|
893
908
|
|
894
|
-
|
895
|
-
|
896
|
-
uri: uri,
|
897
|
-
params: query_string_params,
|
898
|
-
options: options
|
899
|
-
)
|
900
|
-
result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse.decode_json response.body, ignore_unknown_fields: true
|
909
|
+
options.apply_defaults timeout: @config.timeout,
|
910
|
+
metadata: @config.metadata
|
901
911
|
|
902
|
-
|
903
|
-
|
912
|
+
@region_instance_group_managers_stub.list_errors request, options do |result, response|
|
913
|
+
result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_errors, "items", request, result, options
|
914
|
+
yield result, response if block_given?
|
915
|
+
return result
|
916
|
+
end
|
904
917
|
rescue ::Faraday::Error => e
|
905
918
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
906
919
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -951,12 +964,12 @@ module Google
|
|
951
964
|
# @param region [::String]
|
952
965
|
# Name of the region scoping this request.
|
953
966
|
# @param return_partial_success [::Boolean]
|
954
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
955
|
-
# @yield [result,
|
956
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
967
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
968
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
969
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>]
|
957
970
|
# @yieldparam response [::Faraday::Response]
|
958
971
|
#
|
959
|
-
# @return [::Google::Cloud::Compute::V1::
|
972
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>]
|
960
973
|
#
|
961
974
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
962
975
|
def list_managed_instances request, options = nil
|
@@ -968,7 +981,7 @@ module Google
|
|
968
981
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
969
982
|
|
970
983
|
# Customize the options with defaults
|
971
|
-
call_metadata =
|
984
|
+
call_metadata = @config.rpcs.list_managed_instances.metadata.to_h
|
972
985
|
|
973
986
|
# Set x-goog-api-client header
|
974
987
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -976,19 +989,17 @@ module Google
|
|
976
989
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
977
990
|
transports_version_send: [:rest]
|
978
991
|
|
979
|
-
options.apply_defaults timeout: @config.timeout,
|
992
|
+
options.apply_defaults timeout: @config.rpcs.list_managed_instances.timeout,
|
980
993
|
metadata: call_metadata
|
981
994
|
|
982
|
-
|
983
|
-
|
984
|
-
uri: uri,
|
985
|
-
params: query_string_params,
|
986
|
-
options: options
|
987
|
-
)
|
988
|
-
result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse.decode_json response.body, ignore_unknown_fields: true
|
995
|
+
options.apply_defaults timeout: @config.timeout,
|
996
|
+
metadata: @config.metadata
|
989
997
|
|
990
|
-
|
991
|
-
|
998
|
+
@region_instance_group_managers_stub.list_managed_instances request, options do |result, response|
|
999
|
+
result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_managed_instances, "managed_instances", request, result, options
|
1000
|
+
yield result, response if block_given?
|
1001
|
+
return result
|
1002
|
+
end
|
992
1003
|
rescue ::Faraday::Error => e
|
993
1004
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
994
1005
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1039,12 +1050,12 @@ module Google
|
|
1039
1050
|
# @param region [::String]
|
1040
1051
|
# Name of the region scoping this request, should conform to RFC1035.
|
1041
1052
|
# @param return_partial_success [::Boolean]
|
1042
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
1043
|
-
# @yield [result,
|
1044
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
1053
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
1054
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1055
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>]
|
1045
1056
|
# @yieldparam response [::Faraday::Response]
|
1046
1057
|
#
|
1047
|
-
# @return [::Google::Cloud::Compute::V1::
|
1058
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>]
|
1048
1059
|
#
|
1049
1060
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1050
1061
|
def list_per_instance_configs request, options = nil
|
@@ -1056,7 +1067,7 @@ module Google
|
|
1056
1067
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1057
1068
|
|
1058
1069
|
# Customize the options with defaults
|
1059
|
-
call_metadata =
|
1070
|
+
call_metadata = @config.rpcs.list_per_instance_configs.metadata.to_h
|
1060
1071
|
|
1061
1072
|
# Set x-goog-api-client header
|
1062
1073
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1064,19 +1075,17 @@ module Google
|
|
1064
1075
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1065
1076
|
transports_version_send: [:rest]
|
1066
1077
|
|
1067
|
-
options.apply_defaults timeout: @config.timeout,
|
1078
|
+
options.apply_defaults timeout: @config.rpcs.list_per_instance_configs.timeout,
|
1068
1079
|
metadata: call_metadata
|
1069
1080
|
|
1070
|
-
|
1071
|
-
|
1072
|
-
uri: uri,
|
1073
|
-
params: query_string_params,
|
1074
|
-
options: options
|
1075
|
-
)
|
1076
|
-
result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true
|
1081
|
+
options.apply_defaults timeout: @config.timeout,
|
1082
|
+
metadata: @config.metadata
|
1077
1083
|
|
1078
|
-
|
1079
|
-
|
1084
|
+
@region_instance_group_managers_stub.list_per_instance_configs request, options do |result, response|
|
1085
|
+
result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_per_instance_configs, "items", request, result, options
|
1086
|
+
yield result, response if block_given?
|
1087
|
+
return result
|
1088
|
+
end
|
1080
1089
|
rescue ::Faraday::Error => e
|
1081
1090
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1082
1091
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1116,11 +1125,11 @@ module Google
|
|
1116
1125
|
# 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.
|
1117
1126
|
#
|
1118
1127
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1119
|
-
# @yield [result,
|
1120
|
-
# @yieldparam result [::
|
1128
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1129
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1121
1130
|
# @yieldparam response [::Faraday::Response]
|
1122
1131
|
#
|
1123
|
-
# @return [::
|
1132
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1124
1133
|
#
|
1125
1134
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1126
1135
|
def patch request, options = nil
|
@@ -1132,7 +1141,7 @@ module Google
|
|
1132
1141
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1133
1142
|
|
1134
1143
|
# Customize the options with defaults
|
1135
|
-
call_metadata =
|
1144
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
1136
1145
|
|
1137
1146
|
# Set x-goog-api-client header
|
1138
1147
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1140,20 +1149,17 @@ module Google
|
|
1140
1149
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1141
1150
|
transports_version_send: [:rest]
|
1142
1151
|
|
1143
|
-
options.apply_defaults timeout: @config.timeout,
|
1152
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
1144
1153
|
metadata: call_metadata
|
1145
1154
|
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
yield result, response if block_given?
|
1156
|
-
result
|
1155
|
+
options.apply_defaults timeout: @config.timeout,
|
1156
|
+
metadata: @config.metadata
|
1157
|
+
|
1158
|
+
@region_instance_group_managers_stub.patch request, options do |result, response|
|
1159
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1160
|
+
yield result, response if block_given?
|
1161
|
+
return result
|
1162
|
+
end
|
1157
1163
|
rescue ::Faraday::Error => e
|
1158
1164
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1159
1165
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1193,11 +1199,11 @@ module Google
|
|
1193
1199
|
# 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.
|
1194
1200
|
#
|
1195
1201
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1196
|
-
# @yield [result,
|
1197
|
-
# @yieldparam result [::
|
1202
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1203
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1198
1204
|
# @yieldparam response [::Faraday::Response]
|
1199
1205
|
#
|
1200
|
-
# @return [::
|
1206
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1201
1207
|
#
|
1202
1208
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1203
1209
|
def patch_per_instance_configs request, options = nil
|
@@ -1209,7 +1215,7 @@ module Google
|
|
1209
1215
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1210
1216
|
|
1211
1217
|
# Customize the options with defaults
|
1212
|
-
call_metadata =
|
1218
|
+
call_metadata = @config.rpcs.patch_per_instance_configs.metadata.to_h
|
1213
1219
|
|
1214
1220
|
# Set x-goog-api-client header
|
1215
1221
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1217,27 +1223,24 @@ module Google
|
|
1217
1223
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1218
1224
|
transports_version_send: [:rest]
|
1219
1225
|
|
1220
|
-
options.apply_defaults timeout: @config.timeout,
|
1226
|
+
options.apply_defaults timeout: @config.rpcs.patch_per_instance_configs.timeout,
|
1221
1227
|
metadata: call_metadata
|
1222
1228
|
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
yield result, response if block_given?
|
1233
|
-
result
|
1229
|
+
options.apply_defaults timeout: @config.timeout,
|
1230
|
+
metadata: @config.metadata
|
1231
|
+
|
1232
|
+
@region_instance_group_managers_stub.patch_per_instance_configs request, options do |result, response|
|
1233
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1234
|
+
yield result, response if block_given?
|
1235
|
+
return result
|
1236
|
+
end
|
1234
1237
|
rescue ::Faraday::Error => e
|
1235
1238
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1236
1239
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
1237
1240
|
end
|
1238
1241
|
|
1239
1242
|
##
|
1240
|
-
# Flags the specified instances in the managed instance group to be immediately recreated.
|
1243
|
+
# 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.
|
1241
1244
|
#
|
1242
1245
|
# 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.
|
1243
1246
|
#
|
@@ -1274,11 +1277,11 @@ module Google
|
|
1274
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.
|
1275
1278
|
#
|
1276
1279
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1277
|
-
# @yield [result,
|
1278
|
-
# @yieldparam result [::
|
1280
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1281
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1279
1282
|
# @yieldparam response [::Faraday::Response]
|
1280
1283
|
#
|
1281
|
-
# @return [::
|
1284
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1282
1285
|
#
|
1283
1286
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1284
1287
|
def recreate_instances request, options = nil
|
@@ -1290,7 +1293,7 @@ module Google
|
|
1290
1293
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1291
1294
|
|
1292
1295
|
# Customize the options with defaults
|
1293
|
-
call_metadata =
|
1296
|
+
call_metadata = @config.rpcs.recreate_instances.metadata.to_h
|
1294
1297
|
|
1295
1298
|
# Set x-goog-api-client header
|
1296
1299
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1298,20 +1301,17 @@ module Google
|
|
1298
1301
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1299
1302
|
transports_version_send: [:rest]
|
1300
1303
|
|
1301
|
-
options.apply_defaults timeout: @config.timeout,
|
1304
|
+
options.apply_defaults timeout: @config.rpcs.recreate_instances.timeout,
|
1302
1305
|
metadata: call_metadata
|
1303
1306
|
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
yield result, response if block_given?
|
1314
|
-
result
|
1307
|
+
options.apply_defaults timeout: @config.timeout,
|
1308
|
+
metadata: @config.metadata
|
1309
|
+
|
1310
|
+
@region_instance_group_managers_stub.recreate_instances request, options do |result, response|
|
1311
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1312
|
+
yield result, response if block_given?
|
1313
|
+
return result
|
1314
|
+
end
|
1315
1315
|
rescue ::Faraday::Error => e
|
1316
1316
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1317
1317
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1355,11 +1355,11 @@ module Google
|
|
1355
1355
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1356
1356
|
# @param size [::Integer]
|
1357
1357
|
# Number of instances that should exist in this instance group manager.
|
1358
|
-
# @yield [result,
|
1359
|
-
# @yieldparam result [::
|
1358
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1359
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1360
1360
|
# @yieldparam response [::Faraday::Response]
|
1361
1361
|
#
|
1362
|
-
# @return [::
|
1362
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1363
1363
|
#
|
1364
1364
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1365
1365
|
def resize request, options = nil
|
@@ -1371,7 +1371,7 @@ module Google
|
|
1371
1371
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1372
1372
|
|
1373
1373
|
# Customize the options with defaults
|
1374
|
-
call_metadata =
|
1374
|
+
call_metadata = @config.rpcs.resize.metadata.to_h
|
1375
1375
|
|
1376
1376
|
# Set x-goog-api-client header
|
1377
1377
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1379,19 +1379,17 @@ module Google
|
|
1379
1379
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1380
1380
|
transports_version_send: [:rest]
|
1381
1381
|
|
1382
|
-
options.apply_defaults timeout: @config.timeout,
|
1382
|
+
options.apply_defaults timeout: @config.rpcs.resize.timeout,
|
1383
1383
|
metadata: call_metadata
|
1384
1384
|
|
1385
|
-
|
1386
|
-
|
1387
|
-
uri: uri,
|
1388
|
-
params: query_string_params,
|
1389
|
-
options: options
|
1390
|
-
)
|
1391
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
1385
|
+
options.apply_defaults timeout: @config.timeout,
|
1386
|
+
metadata: @config.metadata
|
1392
1387
|
|
1393
|
-
|
1394
|
-
|
1388
|
+
@region_instance_group_managers_stub.resize request, options do |result, response|
|
1389
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1390
|
+
yield result, response if block_given?
|
1391
|
+
return result
|
1392
|
+
end
|
1395
1393
|
rescue ::Faraday::Error => e
|
1396
1394
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1397
1395
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1431,11 +1429,11 @@ module Google
|
|
1431
1429
|
# 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.
|
1432
1430
|
#
|
1433
1431
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1434
|
-
# @yield [result,
|
1435
|
-
# @yieldparam result [::
|
1432
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1433
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1436
1434
|
# @yieldparam response [::Faraday::Response]
|
1437
1435
|
#
|
1438
|
-
# @return [::
|
1436
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1439
1437
|
#
|
1440
1438
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1441
1439
|
def set_instance_template request, options = nil
|
@@ -1447,7 +1445,7 @@ module Google
|
|
1447
1445
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1448
1446
|
|
1449
1447
|
# Customize the options with defaults
|
1450
|
-
call_metadata =
|
1448
|
+
call_metadata = @config.rpcs.set_instance_template.metadata.to_h
|
1451
1449
|
|
1452
1450
|
# Set x-goog-api-client header
|
1453
1451
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1455,20 +1453,17 @@ module Google
|
|
1455
1453
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1456
1454
|
transports_version_send: [:rest]
|
1457
1455
|
|
1458
|
-
options.apply_defaults timeout: @config.timeout,
|
1456
|
+
options.apply_defaults timeout: @config.rpcs.set_instance_template.timeout,
|
1459
1457
|
metadata: call_metadata
|
1460
1458
|
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
yield result, response if block_given?
|
1471
|
-
result
|
1459
|
+
options.apply_defaults timeout: @config.timeout,
|
1460
|
+
metadata: @config.metadata
|
1461
|
+
|
1462
|
+
@region_instance_group_managers_stub.set_instance_template request, options do |result, response|
|
1463
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1464
|
+
yield result, response if block_given?
|
1465
|
+
return result
|
1466
|
+
end
|
1472
1467
|
rescue ::Faraday::Error => e
|
1473
1468
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1474
1469
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1508,11 +1503,11 @@ module Google
|
|
1508
1503
|
# 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.
|
1509
1504
|
#
|
1510
1505
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1511
|
-
# @yield [result,
|
1512
|
-
# @yieldparam result [::
|
1506
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1507
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1513
1508
|
# @yieldparam response [::Faraday::Response]
|
1514
1509
|
#
|
1515
|
-
# @return [::
|
1510
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1516
1511
|
#
|
1517
1512
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1518
1513
|
def set_target_pools request, options = nil
|
@@ -1524,7 +1519,7 @@ module Google
|
|
1524
1519
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1525
1520
|
|
1526
1521
|
# Customize the options with defaults
|
1527
|
-
call_metadata =
|
1522
|
+
call_metadata = @config.rpcs.set_target_pools.metadata.to_h
|
1528
1523
|
|
1529
1524
|
# Set x-goog-api-client header
|
1530
1525
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1532,20 +1527,17 @@ module Google
|
|
1532
1527
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1533
1528
|
transports_version_send: [:rest]
|
1534
1529
|
|
1535
|
-
options.apply_defaults timeout: @config.timeout,
|
1530
|
+
options.apply_defaults timeout: @config.rpcs.set_target_pools.timeout,
|
1536
1531
|
metadata: call_metadata
|
1537
1532
|
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
yield result, response if block_given?
|
1548
|
-
result
|
1533
|
+
options.apply_defaults timeout: @config.timeout,
|
1534
|
+
metadata: @config.metadata
|
1535
|
+
|
1536
|
+
@region_instance_group_managers_stub.set_target_pools request, options do |result, response|
|
1537
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1538
|
+
yield result, response if block_given?
|
1539
|
+
return result
|
1540
|
+
end
|
1549
1541
|
rescue ::Faraday::Error => e
|
1550
1542
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1551
1543
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1585,11 +1577,11 @@ module Google
|
|
1585
1577
|
# 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.
|
1586
1578
|
#
|
1587
1579
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1588
|
-
# @yield [result,
|
1589
|
-
# @yieldparam result [::
|
1580
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1581
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1590
1582
|
# @yieldparam response [::Faraday::Response]
|
1591
1583
|
#
|
1592
|
-
# @return [::
|
1584
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1593
1585
|
#
|
1594
1586
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1595
1587
|
def update_per_instance_configs request, options = nil
|
@@ -1601,7 +1593,7 @@ module Google
|
|
1601
1593
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1602
1594
|
|
1603
1595
|
# Customize the options with defaults
|
1604
|
-
call_metadata =
|
1596
|
+
call_metadata = @config.rpcs.update_per_instance_configs.metadata.to_h
|
1605
1597
|
|
1606
1598
|
# Set x-goog-api-client header
|
1607
1599
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1609,20 +1601,17 @@ module Google
|
|
1609
1601
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1610
1602
|
transports_version_send: [:rest]
|
1611
1603
|
|
1612
|
-
options.apply_defaults timeout: @config.timeout,
|
1604
|
+
options.apply_defaults timeout: @config.rpcs.update_per_instance_configs.timeout,
|
1613
1605
|
metadata: call_metadata
|
1614
1606
|
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
yield result, response if block_given?
|
1625
|
-
result
|
1607
|
+
options.apply_defaults timeout: @config.timeout,
|
1608
|
+
metadata: @config.metadata
|
1609
|
+
|
1610
|
+
@region_instance_group_managers_stub.update_per_instance_configs request, options do |result, response|
|
1611
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1612
|
+
yield result, response if block_given?
|
1613
|
+
return result
|
1614
|
+
end
|
1626
1615
|
rescue ::Faraday::Error => e
|
1627
1616
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1628
1617
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1677,6 +1666,9 @@ module Google
|
|
1677
1666
|
# @!attribute [rw] timeout
|
1678
1667
|
# The call timeout in seconds.
|
1679
1668
|
# @return [::Numeric]
|
1669
|
+
# @!attribute [rw] metadata
|
1670
|
+
# Additional REST headers to be sent with the call.
|
1671
|
+
# @return [::Hash{::Symbol=>::String}]
|
1680
1672
|
#
|
1681
1673
|
class Configuration
|
1682
1674
|
extend ::Gapic::Config
|
@@ -1690,6 +1682,7 @@ module Google
|
|
1690
1682
|
config_attr :lib_name, nil, ::String, nil
|
1691
1683
|
config_attr :lib_version, nil, ::String, nil
|
1692
1684
|
config_attr :timeout, nil, ::Numeric, nil
|
1685
|
+
config_attr :metadata, nil, ::Hash, nil
|
1693
1686
|
|
1694
1687
|
# @private
|
1695
1688
|
def initialize parent_config = nil
|
@@ -1697,6 +1690,172 @@ module Google
|
|
1697
1690
|
|
1698
1691
|
yield self if block_given?
|
1699
1692
|
end
|
1693
|
+
|
1694
|
+
##
|
1695
|
+
# Configurations for individual RPCs
|
1696
|
+
# @return [Rpcs]
|
1697
|
+
#
|
1698
|
+
def rpcs
|
1699
|
+
@rpcs ||= begin
|
1700
|
+
parent_rpcs = nil
|
1701
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1702
|
+
Rpcs.new parent_rpcs
|
1703
|
+
end
|
1704
|
+
end
|
1705
|
+
|
1706
|
+
##
|
1707
|
+
# Configuration RPC class for the RegionInstanceGroupManagers API.
|
1708
|
+
#
|
1709
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1710
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1711
|
+
# the following configuration fields:
|
1712
|
+
#
|
1713
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1714
|
+
#
|
1715
|
+
# there is one other field (`retry_policy`) that can be set
|
1716
|
+
# but is currently not supported for REST Gapic libraries.
|
1717
|
+
#
|
1718
|
+
class Rpcs
|
1719
|
+
##
|
1720
|
+
# RPC-specific configuration for `abandon_instances`
|
1721
|
+
# @return [::Gapic::Config::Method]
|
1722
|
+
#
|
1723
|
+
attr_reader :abandon_instances
|
1724
|
+
##
|
1725
|
+
# RPC-specific configuration for `apply_updates_to_instances`
|
1726
|
+
# @return [::Gapic::Config::Method]
|
1727
|
+
#
|
1728
|
+
attr_reader :apply_updates_to_instances
|
1729
|
+
##
|
1730
|
+
# RPC-specific configuration for `create_instances`
|
1731
|
+
# @return [::Gapic::Config::Method]
|
1732
|
+
#
|
1733
|
+
attr_reader :create_instances
|
1734
|
+
##
|
1735
|
+
# RPC-specific configuration for `delete`
|
1736
|
+
# @return [::Gapic::Config::Method]
|
1737
|
+
#
|
1738
|
+
attr_reader :delete
|
1739
|
+
##
|
1740
|
+
# RPC-specific configuration for `delete_instances`
|
1741
|
+
# @return [::Gapic::Config::Method]
|
1742
|
+
#
|
1743
|
+
attr_reader :delete_instances
|
1744
|
+
##
|
1745
|
+
# RPC-specific configuration for `delete_per_instance_configs`
|
1746
|
+
# @return [::Gapic::Config::Method]
|
1747
|
+
#
|
1748
|
+
attr_reader :delete_per_instance_configs
|
1749
|
+
##
|
1750
|
+
# RPC-specific configuration for `get`
|
1751
|
+
# @return [::Gapic::Config::Method]
|
1752
|
+
#
|
1753
|
+
attr_reader :get
|
1754
|
+
##
|
1755
|
+
# RPC-specific configuration for `insert`
|
1756
|
+
# @return [::Gapic::Config::Method]
|
1757
|
+
#
|
1758
|
+
attr_reader :insert
|
1759
|
+
##
|
1760
|
+
# RPC-specific configuration for `list`
|
1761
|
+
# @return [::Gapic::Config::Method]
|
1762
|
+
#
|
1763
|
+
attr_reader :list
|
1764
|
+
##
|
1765
|
+
# RPC-specific configuration for `list_errors`
|
1766
|
+
# @return [::Gapic::Config::Method]
|
1767
|
+
#
|
1768
|
+
attr_reader :list_errors
|
1769
|
+
##
|
1770
|
+
# RPC-specific configuration for `list_managed_instances`
|
1771
|
+
# @return [::Gapic::Config::Method]
|
1772
|
+
#
|
1773
|
+
attr_reader :list_managed_instances
|
1774
|
+
##
|
1775
|
+
# RPC-specific configuration for `list_per_instance_configs`
|
1776
|
+
# @return [::Gapic::Config::Method]
|
1777
|
+
#
|
1778
|
+
attr_reader :list_per_instance_configs
|
1779
|
+
##
|
1780
|
+
# RPC-specific configuration for `patch`
|
1781
|
+
# @return [::Gapic::Config::Method]
|
1782
|
+
#
|
1783
|
+
attr_reader :patch
|
1784
|
+
##
|
1785
|
+
# RPC-specific configuration for `patch_per_instance_configs`
|
1786
|
+
# @return [::Gapic::Config::Method]
|
1787
|
+
#
|
1788
|
+
attr_reader :patch_per_instance_configs
|
1789
|
+
##
|
1790
|
+
# RPC-specific configuration for `recreate_instances`
|
1791
|
+
# @return [::Gapic::Config::Method]
|
1792
|
+
#
|
1793
|
+
attr_reader :recreate_instances
|
1794
|
+
##
|
1795
|
+
# RPC-specific configuration for `resize`
|
1796
|
+
# @return [::Gapic::Config::Method]
|
1797
|
+
#
|
1798
|
+
attr_reader :resize
|
1799
|
+
##
|
1800
|
+
# RPC-specific configuration for `set_instance_template`
|
1801
|
+
# @return [::Gapic::Config::Method]
|
1802
|
+
#
|
1803
|
+
attr_reader :set_instance_template
|
1804
|
+
##
|
1805
|
+
# RPC-specific configuration for `set_target_pools`
|
1806
|
+
# @return [::Gapic::Config::Method]
|
1807
|
+
#
|
1808
|
+
attr_reader :set_target_pools
|
1809
|
+
##
|
1810
|
+
# RPC-specific configuration for `update_per_instance_configs`
|
1811
|
+
# @return [::Gapic::Config::Method]
|
1812
|
+
#
|
1813
|
+
attr_reader :update_per_instance_configs
|
1814
|
+
|
1815
|
+
# @private
|
1816
|
+
def initialize parent_rpcs = nil
|
1817
|
+
abandon_instances_config = parent_rpcs.abandon_instances if parent_rpcs.respond_to? :abandon_instances
|
1818
|
+
@abandon_instances = ::Gapic::Config::Method.new abandon_instances_config
|
1819
|
+
apply_updates_to_instances_config = parent_rpcs.apply_updates_to_instances if parent_rpcs.respond_to? :apply_updates_to_instances
|
1820
|
+
@apply_updates_to_instances = ::Gapic::Config::Method.new apply_updates_to_instances_config
|
1821
|
+
create_instances_config = parent_rpcs.create_instances if parent_rpcs.respond_to? :create_instances
|
1822
|
+
@create_instances = ::Gapic::Config::Method.new create_instances_config
|
1823
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1824
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1825
|
+
delete_instances_config = parent_rpcs.delete_instances if parent_rpcs.respond_to? :delete_instances
|
1826
|
+
@delete_instances = ::Gapic::Config::Method.new delete_instances_config
|
1827
|
+
delete_per_instance_configs_config = parent_rpcs.delete_per_instance_configs if parent_rpcs.respond_to? :delete_per_instance_configs
|
1828
|
+
@delete_per_instance_configs = ::Gapic::Config::Method.new delete_per_instance_configs_config
|
1829
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1830
|
+
@get = ::Gapic::Config::Method.new get_config
|
1831
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1832
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1833
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1834
|
+
@list = ::Gapic::Config::Method.new list_config
|
1835
|
+
list_errors_config = parent_rpcs.list_errors if parent_rpcs.respond_to? :list_errors
|
1836
|
+
@list_errors = ::Gapic::Config::Method.new list_errors_config
|
1837
|
+
list_managed_instances_config = parent_rpcs.list_managed_instances if parent_rpcs.respond_to? :list_managed_instances
|
1838
|
+
@list_managed_instances = ::Gapic::Config::Method.new list_managed_instances_config
|
1839
|
+
list_per_instance_configs_config = parent_rpcs.list_per_instance_configs if parent_rpcs.respond_to? :list_per_instance_configs
|
1840
|
+
@list_per_instance_configs = ::Gapic::Config::Method.new list_per_instance_configs_config
|
1841
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1842
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1843
|
+
patch_per_instance_configs_config = parent_rpcs.patch_per_instance_configs if parent_rpcs.respond_to? :patch_per_instance_configs
|
1844
|
+
@patch_per_instance_configs = ::Gapic::Config::Method.new patch_per_instance_configs_config
|
1845
|
+
recreate_instances_config = parent_rpcs.recreate_instances if parent_rpcs.respond_to? :recreate_instances
|
1846
|
+
@recreate_instances = ::Gapic::Config::Method.new recreate_instances_config
|
1847
|
+
resize_config = parent_rpcs.resize if parent_rpcs.respond_to? :resize
|
1848
|
+
@resize = ::Gapic::Config::Method.new resize_config
|
1849
|
+
set_instance_template_config = parent_rpcs.set_instance_template if parent_rpcs.respond_to? :set_instance_template
|
1850
|
+
@set_instance_template = ::Gapic::Config::Method.new set_instance_template_config
|
1851
|
+
set_target_pools_config = parent_rpcs.set_target_pools if parent_rpcs.respond_to? :set_target_pools
|
1852
|
+
@set_target_pools = ::Gapic::Config::Method.new set_target_pools_config
|
1853
|
+
update_per_instance_configs_config = parent_rpcs.update_per_instance_configs if parent_rpcs.respond_to? :update_per_instance_configs
|
1854
|
+
@update_per_instance_configs = ::Gapic::Config::Method.new update_per_instance_configs_config
|
1855
|
+
|
1856
|
+
yield self if block_given?
|
1857
|
+
end
|
1858
|
+
end
|
1700
1859
|
end
|
1701
1860
|
end
|
1702
1861
|
end
|