google-cloud-compute-v1 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +10 -8
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +6 -3
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +12 -6
- data/lib/google/cloud/compute/v1/addresses/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/autoscalers/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +24 -12
- data/lib/google/cloud/compute/v1/backend_buckets/rest/grpc_transcoding.rb +4 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +32 -16
- data/lib/google/cloud/compute/v1/backend_services/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +6 -3
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +38 -19
- data/lib/google/cloud/compute/v1/disks/rest/grpc_transcoding.rb +8 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +14 -7
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/firewall_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +35 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1459 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb +269 -0
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/firewalls/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/global_addresses/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +6 -3
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +44 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +35 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +576 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/grpc_transcoding.rb +100 -0
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/health_checks/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +28 -14
- data/lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb +4 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +60 -30
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/grpc_transcoding.rb +10 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +28 -14
- data/lib/google/cloud/compute/v1/instance_groups/rest/grpc_transcoding.rb +9 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +16 -8
- data/lib/google/cloud/compute/v1/instance_templates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +120 -60
- data/lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb +27 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +16 -8
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +16 -8
- data/lib/google/cloud/compute/v1/interconnects/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +16 -8
- data/lib/google/cloud/compute/v1/licenses/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +6 -3
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +26 -13
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/grpc_transcoding.rb +8 -0
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +30 -15
- data/lib/google/cloud/compute/v1/networks/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +36 -18
- data/lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb +6 -0
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/node_templates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +6 -3
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +42 -21
- data/lib/google/cloud/compute/v1/projects/rest/grpc_transcoding.rb +12 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +44 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +35 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +576 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/grpc_transcoding.rb +100 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +44 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +35 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +671 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/grpc_transcoding.rb +118 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/region_backend_services/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/region_commitments/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +36 -18
- data/lib/google/cloud/compute/v1/region_disks/rest/grpc_transcoding.rb +7 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +14 -7
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/region_health_checks/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +58 -29
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/grpc_transcoding.rb +10 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +12 -6
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/grpc_transcoding.rb +6 -0
- data/lib/google/cloud/compute/v1/region_instances.rb +44 -0
- data/lib/google/cloud/compute/v1/region_instances/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +35 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +287 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/grpc_transcoding.rb +46 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +8 -4
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +14 -7
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/region_url_maps/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +22 -11
- data/lib/google/cloud/compute/v1/reservations/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/resource_policies/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +26 -13
- data/lib/google/cloud/compute/v1/routers/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +10 -5
- data/lib/google/cloud/compute/v1/routes/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +26 -13
- data/lib/google/cloud/compute/v1/security_policies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +14 -7
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +12 -6
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +16 -8
- data/lib/google/cloud/compute/v1/ssl_policies/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +32 -16
- data/lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +14 -7
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +28 -14
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +12 -6
- data/lib/google/cloud/compute/v1/target_instances/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +34 -17
- data/lib/google/cloud/compute/v1/target_pools/rest/grpc_transcoding.rb +7 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +26 -13
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +18 -9
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +12 -6
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +26 -13
- data/lib/google/cloud/compute/v1/url_maps/rest/grpc_transcoding.rb +4 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +20 -10
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +12 -6
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +8 -4
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +4 -2
- metadata +37 -12
@@ -33,6 +33,7 @@ module Google
|
|
33
33
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/abandonInstances"
|
34
34
|
body = request_pb.region_instance_group_managers_abandon_instances_request_resource.to_json
|
35
35
|
query_string_params = {}
|
36
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
36
37
|
|
37
38
|
[uri, body, query_string_params]
|
38
39
|
end
|
@@ -57,6 +58,7 @@ module Google
|
|
57
58
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/createInstances"
|
58
59
|
body = request_pb.region_instance_group_managers_create_instances_request_resource.to_json
|
59
60
|
query_string_params = {}
|
61
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
60
62
|
|
61
63
|
[uri, body, query_string_params]
|
62
64
|
end
|
@@ -82,6 +84,7 @@ module Google
|
|
82
84
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/deleteInstances"
|
83
85
|
body = request_pb.region_instance_group_managers_delete_instances_request_resource.to_json
|
84
86
|
query_string_params = {}
|
87
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
85
88
|
|
86
89
|
[uri, body, query_string_params]
|
87
90
|
end
|
@@ -118,6 +121,7 @@ module Google
|
|
118
121
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers"
|
119
122
|
body = request_pb.instance_group_manager_resource.to_json
|
120
123
|
query_string_params = {}
|
124
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
121
125
|
|
122
126
|
[uri, body, query_string_params]
|
123
127
|
end
|
@@ -198,6 +202,7 @@ module Google
|
|
198
202
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}"
|
199
203
|
body = request_pb.instance_group_manager_resource.to_json
|
200
204
|
query_string_params = {}
|
205
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
201
206
|
|
202
207
|
[uri, body, query_string_params]
|
203
208
|
end
|
@@ -210,6 +215,7 @@ module Google
|
|
210
215
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/patchPerInstanceConfigs"
|
211
216
|
body = request_pb.region_instance_group_manager_patch_instance_config_req_resource.to_json
|
212
217
|
query_string_params = {}
|
218
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
213
219
|
|
214
220
|
[uri, body, query_string_params]
|
215
221
|
end
|
@@ -222,6 +228,7 @@ module Google
|
|
222
228
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/recreateInstances"
|
223
229
|
body = request_pb.region_instance_group_managers_recreate_request_resource.to_json
|
224
230
|
query_string_params = {}
|
231
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
225
232
|
|
226
233
|
[uri, body, query_string_params]
|
227
234
|
end
|
@@ -248,6 +255,7 @@ module Google
|
|
248
255
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/setInstanceTemplate"
|
249
256
|
body = request_pb.region_instance_group_managers_set_template_request_resource.to_json
|
250
257
|
query_string_params = {}
|
258
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
251
259
|
|
252
260
|
[uri, body, query_string_params]
|
253
261
|
end
|
@@ -260,6 +268,7 @@ module Google
|
|
260
268
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/setTargetPools"
|
261
269
|
body = request_pb.region_instance_group_managers_set_target_pools_request_resource.to_json
|
262
270
|
query_string_params = {}
|
271
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
263
272
|
|
264
273
|
[uri, body, query_string_params]
|
265
274
|
end
|
@@ -272,6 +281,7 @@ module Google
|
|
272
281
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/updatePerInstanceConfigs"
|
273
282
|
body = request_pb.region_instance_group_manager_update_instance_config_req_resource.to_json
|
274
283
|
query_string_params = {}
|
284
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
275
285
|
|
276
286
|
[uri, body, query_string_params]
|
277
287
|
end
|
@@ -182,7 +182,8 @@ module Google
|
|
182
182
|
# Set x-goog-api-client header
|
183
183
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
184
184
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
185
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
185
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
186
|
+
transports_version_send: [:rest]
|
186
187
|
|
187
188
|
options.apply_defaults timeout: @config.timeout,
|
188
189
|
metadata: call_metadata
|
@@ -266,7 +267,8 @@ module Google
|
|
266
267
|
# Set x-goog-api-client header
|
267
268
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
268
269
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
269
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
270
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
271
|
+
transports_version_send: [:rest]
|
270
272
|
|
271
273
|
options.apply_defaults timeout: @config.timeout,
|
272
274
|
metadata: call_metadata
|
@@ -355,15 +357,17 @@ module Google
|
|
355
357
|
# Set x-goog-api-client header
|
356
358
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
357
359
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
358
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
360
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
361
|
+
transports_version_send: [:rest]
|
359
362
|
|
360
363
|
options.apply_defaults timeout: @config.timeout,
|
361
364
|
metadata: call_metadata
|
362
365
|
|
363
|
-
uri, body,
|
366
|
+
uri, body, query_string_params = transcode_list_instances request
|
364
367
|
response = @client_stub.make_post_request(
|
365
368
|
uri: uri,
|
366
369
|
body: body,
|
370
|
+
params: query_string_params,
|
367
371
|
options: options
|
368
372
|
)
|
369
373
|
result = ::Google::Cloud::Compute::V1::RegionInstanceGroupsListInstances.decode_json response.body, ignore_unknown_fields: true
|
@@ -430,15 +434,17 @@ module Google
|
|
430
434
|
# Set x-goog-api-client header
|
431
435
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
432
436
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
433
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
437
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
438
|
+
transports_version_send: [:rest]
|
434
439
|
|
435
440
|
options.apply_defaults timeout: @config.timeout,
|
436
441
|
metadata: call_metadata
|
437
442
|
|
438
|
-
uri, body,
|
443
|
+
uri, body, query_string_params = transcode_set_named_ports request
|
439
444
|
response = @client_stub.make_post_request(
|
440
445
|
uri: uri,
|
441
446
|
body: body,
|
447
|
+
params: query_string_params,
|
442
448
|
options: options
|
443
449
|
)
|
444
450
|
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
@@ -62,6 +62,11 @@ module Google
|
|
62
62
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroups/#{request_pb.instance_group}/listInstances"
|
63
63
|
body = request_pb.region_instance_groups_list_instances_request_resource.to_json
|
64
64
|
query_string_params = {}
|
65
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
66
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
67
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
68
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
69
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
65
70
|
|
66
71
|
[uri, body, query_string_params]
|
67
72
|
end
|
@@ -74,6 +79,7 @@ module Google
|
|
74
79
|
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroups/#{request_pb.instance_group}/setNamedPorts"
|
75
80
|
body = request_pb.region_instance_groups_set_named_ports_request_resource.to_json
|
76
81
|
query_string_params = {}
|
82
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
77
83
|
|
78
84
|
[uri, body, query_string_params]
|
79
85
|
end
|
@@ -0,0 +1,44 @@
|
|
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 "gapic/config"
|
20
|
+
require "gapic/config/method"
|
21
|
+
|
22
|
+
require "google/cloud/compute/v1/version"
|
23
|
+
|
24
|
+
require "google/cloud/compute/v1/region_instances/credentials"
|
25
|
+
require "google/cloud/compute/v1/region_instances/rest"
|
26
|
+
|
27
|
+
module Google
|
28
|
+
module Cloud
|
29
|
+
module Compute
|
30
|
+
module V1
|
31
|
+
# To load this service and instantiate a REST client:
|
32
|
+
#
|
33
|
+
# require "google/cloud/compute/v1/region_instances"
|
34
|
+
# client = ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.new
|
35
|
+
#
|
36
|
+
module RegionInstances
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
helper_path = ::File.join __dir__, "region_instances", "helpers.rb"
|
44
|
+
require "google/cloud/compute/v1/region_instances/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,52 @@
|
|
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 "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module RegionInstances
|
26
|
+
# Credentials for the RegionInstances API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/compute",
|
30
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"COMPUTE_CREDENTIALS",
|
34
|
+
"COMPUTE_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"COMPUTE_CREDENTIALS_JSON",
|
39
|
+
"COMPUTE_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,35 @@
|
|
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 "gapic/rest"
|
20
|
+
require "google/cloud/compute/v1/region_instances/rest/grpc_transcoding"
|
21
|
+
require "google/cloud/compute/v1/region_instances/rest/client"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Compute
|
26
|
+
module V1
|
27
|
+
module RegionInstances
|
28
|
+
# Client for the REST transport
|
29
|
+
module Rest
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,287 @@
|
|
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/errors"
|
20
|
+
require "google/cloud/compute/v1/compute_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Compute
|
25
|
+
module V1
|
26
|
+
module RegionInstances
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST client for the RegionInstances service.
|
30
|
+
#
|
31
|
+
# The RegionInstances API.
|
32
|
+
#
|
33
|
+
class Client
|
34
|
+
include GrpcTranscoding
|
35
|
+
|
36
|
+
# @private
|
37
|
+
attr_reader :region_instances_stub
|
38
|
+
|
39
|
+
##
|
40
|
+
# Configure the RegionInstances Client class.
|
41
|
+
#
|
42
|
+
# See {::Google::Cloud::Compute::V1::RegionInstances::Rest::Client::Configuration}
|
43
|
+
# for a description of the configuration fields.
|
44
|
+
#
|
45
|
+
# ## Example
|
46
|
+
#
|
47
|
+
# To modify the configuration for all RegionInstances clients:
|
48
|
+
#
|
49
|
+
# ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# @yield [config] Configure the Client client.
|
54
|
+
# @yieldparam config [Client::Configuration]
|
55
|
+
#
|
56
|
+
# @return [Client::Configuration]
|
57
|
+
#
|
58
|
+
def self.configure
|
59
|
+
@configure ||= begin
|
60
|
+
namespace = ["Google", "Cloud", "Compute", "V1"]
|
61
|
+
parent_config = while namespace.any?
|
62
|
+
parent_name = namespace.join "::"
|
63
|
+
parent_const = const_get parent_name
|
64
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
65
|
+
namespace.pop
|
66
|
+
end
|
67
|
+
default_config = Client::Configuration.new parent_config
|
68
|
+
|
69
|
+
default_config
|
70
|
+
end
|
71
|
+
yield @configure if block_given?
|
72
|
+
@configure
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Configure the RegionInstances Client instance.
|
77
|
+
#
|
78
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
79
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
80
|
+
# should be made on {Client.configure}.
|
81
|
+
#
|
82
|
+
# See {::Google::Cloud::Compute::V1::RegionInstances::Rest::Client::Configuration}
|
83
|
+
# for a description of the configuration fields.
|
84
|
+
#
|
85
|
+
# @yield [config] Configure the Client client.
|
86
|
+
# @yieldparam config [Client::Configuration]
|
87
|
+
#
|
88
|
+
# @return [Client::Configuration]
|
89
|
+
#
|
90
|
+
def configure
|
91
|
+
yield @config if block_given?
|
92
|
+
@config
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Create a new RegionInstances REST client object.
|
97
|
+
#
|
98
|
+
# ## Examples
|
99
|
+
#
|
100
|
+
# To create a new RegionInstances REST client with the default
|
101
|
+
# configuration:
|
102
|
+
#
|
103
|
+
# client = ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.new
|
104
|
+
#
|
105
|
+
# To create a new RegionInstances REST client with a custom
|
106
|
+
# configuration:
|
107
|
+
#
|
108
|
+
# client = ::Google::Cloud::Compute::V1::RegionInstances::Rest::Client.new do |config|
|
109
|
+
# config.timeout = 10.0
|
110
|
+
# end
|
111
|
+
#
|
112
|
+
# @yield [config] Configure the RegionInstances client.
|
113
|
+
# @yieldparam config [Client::Configuration]
|
114
|
+
#
|
115
|
+
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
|
+
# Create the configuration object
|
121
|
+
@config = Configuration.new Client.configure
|
122
|
+
|
123
|
+
# Yield the configuration if needed
|
124
|
+
yield @config if block_given?
|
125
|
+
|
126
|
+
# Create credentials
|
127
|
+
credentials = @config.credentials
|
128
|
+
credentials ||= Credentials.default scope: @config.scope
|
129
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
130
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
131
|
+
end
|
132
|
+
|
133
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
|
134
|
+
end
|
135
|
+
|
136
|
+
# Service calls
|
137
|
+
|
138
|
+
##
|
139
|
+
# Creates multiple instances in a given region. Count specifies the number of instances to create.
|
140
|
+
#
|
141
|
+
# @overload bulk_insert(request, options = nil)
|
142
|
+
# Pass arguments to `bulk_insert` via a request object, either of type
|
143
|
+
# {::Google::Cloud::Compute::V1::BulkInsertRegionInstanceRequest} or an equivalent Hash.
|
144
|
+
#
|
145
|
+
# @param request [::Google::Cloud::Compute::V1::BulkInsertRegionInstanceRequest, ::Hash]
|
146
|
+
# A request object representing the call parameters. Required. To specify no
|
147
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
148
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
149
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
150
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
151
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
152
|
+
#
|
153
|
+
# @overload bulk_insert(bulk_insert_instance_resource_resource: nil, project: nil, region: nil, request_id: nil)
|
154
|
+
# Pass arguments to `bulk_insert` via keyword arguments. Note that at
|
155
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
156
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
157
|
+
#
|
158
|
+
# @param bulk_insert_instance_resource_resource [::Google::Cloud::Compute::V1::BulkInsertInstanceResource, ::Hash]
|
159
|
+
# The body resource for this request
|
160
|
+
# @param project [::String]
|
161
|
+
# Project ID for this request.
|
162
|
+
# @param region [::String]
|
163
|
+
# The name of the region for this request.
|
164
|
+
# @param request_id [::String]
|
165
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
166
|
+
#
|
167
|
+
# 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.
|
168
|
+
#
|
169
|
+
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
170
|
+
# @yield [result, env] Access the result along with the Faraday environment object
|
171
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
172
|
+
# @yieldparam response [::Faraday::Response]
|
173
|
+
#
|
174
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
175
|
+
#
|
176
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
177
|
+
def bulk_insert request, options = nil
|
178
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
179
|
+
|
180
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertRegionInstanceRequest
|
181
|
+
|
182
|
+
# Converts hash and nil to an options object
|
183
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
184
|
+
|
185
|
+
# Customize the options with defaults
|
186
|
+
call_metadata = {}
|
187
|
+
|
188
|
+
# Set x-goog-api-client header
|
189
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
190
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
191
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
192
|
+
|
193
|
+
options.apply_defaults timeout: @config.timeout,
|
194
|
+
metadata: call_metadata
|
195
|
+
|
196
|
+
uri, body, _query_string_params = transcode_bulk_insert request
|
197
|
+
response = @client_stub.make_post_request(
|
198
|
+
uri: uri,
|
199
|
+
body: body,
|
200
|
+
options: options
|
201
|
+
)
|
202
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
203
|
+
|
204
|
+
yield result, response if block_given?
|
205
|
+
result
|
206
|
+
rescue ::Faraday::Error => e
|
207
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
208
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
209
|
+
end
|
210
|
+
|
211
|
+
##
|
212
|
+
# Configuration class for the RegionInstances REST API.
|
213
|
+
#
|
214
|
+
# This class represents the configuration for RegionInstances REST,
|
215
|
+
# providing control over credentials, timeouts, retry behavior, logging.
|
216
|
+
#
|
217
|
+
# Configuration can be applied globally to all clients, or to a single client
|
218
|
+
# on construction.
|
219
|
+
#
|
220
|
+
# # Examples
|
221
|
+
#
|
222
|
+
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
223
|
+
#
|
224
|
+
# ::Google::Cloud::Compute::V1::RegionInstances::Client.configure do |config|
|
225
|
+
# config.timeout = 10.0
|
226
|
+
# end
|
227
|
+
#
|
228
|
+
# To apply the above configuration only to a new client:
|
229
|
+
#
|
230
|
+
# client = ::Google::Cloud::Compute::V1::RegionInstances::Client.new do |config|
|
231
|
+
# config.timeout = 10.0
|
232
|
+
# end
|
233
|
+
#
|
234
|
+
# @!attribute [rw] endpoint
|
235
|
+
# The hostname or hostname:port of the service endpoint.
|
236
|
+
# Defaults to `"compute.googleapis.com"`.
|
237
|
+
# @return [::String]
|
238
|
+
# @!attribute [rw] credentials
|
239
|
+
# Credentials to send with calls. You may provide any of the following types:
|
240
|
+
# * (`String`) The path to a service account key file in JSON format
|
241
|
+
# * (`Hash`) A service account key as a Hash
|
242
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
243
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
244
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
245
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
246
|
+
# * (`nil`) indicating no credentials
|
247
|
+
# @return [::Object]
|
248
|
+
# @!attribute [rw] scope
|
249
|
+
# The OAuth scopes
|
250
|
+
# @return [::Array<::String>]
|
251
|
+
# @!attribute [rw] lib_name
|
252
|
+
# The library name as recorded in instrumentation and logging
|
253
|
+
# @return [::String]
|
254
|
+
# @!attribute [rw] lib_version
|
255
|
+
# The library version as recorded in instrumentation and logging
|
256
|
+
# @return [::String]
|
257
|
+
# @!attribute [rw] timeout
|
258
|
+
# The call timeout in seconds.
|
259
|
+
# @return [::Numeric]
|
260
|
+
#
|
261
|
+
class Configuration
|
262
|
+
extend ::Gapic::Config
|
263
|
+
|
264
|
+
config_attr :endpoint, "compute.googleapis.com", ::String
|
265
|
+
config_attr :credentials, nil do |value|
|
266
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
267
|
+
allowed.any? { |klass| klass === value }
|
268
|
+
end
|
269
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
270
|
+
config_attr :lib_name, nil, ::String, nil
|
271
|
+
config_attr :lib_version, nil, ::String, nil
|
272
|
+
config_attr :timeout, nil, ::Numeric, nil
|
273
|
+
|
274
|
+
# @private
|
275
|
+
def initialize parent_config = nil
|
276
|
+
@parent_config = parent_config unless parent_config.nil?
|
277
|
+
|
278
|
+
yield self if block_given?
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|