google-cloud-compute-v1 1.1.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +84 -22
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +95 -26
- data/lib/google/cloud/compute/v1/compute_pb.rb +671 -3
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +177 -52
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +72 -19
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +372 -101
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +105 -29
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +91 -22
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +176 -51
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +145 -13
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +59 -14
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +170 -23
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +55 -1
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +169 -23
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +158 -19
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +6 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
- metadata +27 -3
@@ -161,7 +161,7 @@ module Google
|
|
161
161
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
162
162
|
#
|
163
163
|
# @param filter [::String]
|
164
|
-
# A filter expression that filters resources listed in the response.
|
164
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
165
165
|
# @param include_all_scopes [::Boolean]
|
166
166
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
167
167
|
# @param max_results [::Integer]
|
@@ -300,7 +300,7 @@ module Google
|
|
300
300
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
301
301
|
#
|
302
302
|
# @param filter [::String]
|
303
|
-
# A filter expression that filters resources listed in the response.
|
303
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
304
304
|
# @param max_results [::Integer]
|
305
305
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
306
306
|
# @param order_by [::String]
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/disks/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -158,9 +159,21 @@ module Google
|
|
158
159
|
credentials = Credentials.new credentials, scope: @config.scope
|
159
160
|
end
|
160
161
|
|
162
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
163
|
+
config.credentials = credentials
|
164
|
+
config.endpoint = @config.endpoint
|
165
|
+
end
|
166
|
+
|
161
167
|
@disks_stub = ::Google::Cloud::Compute::V1::Disks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
162
168
|
end
|
163
169
|
|
170
|
+
##
|
171
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
172
|
+
#
|
173
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
174
|
+
#
|
175
|
+
attr_reader :zone_operations
|
176
|
+
|
164
177
|
# Service calls
|
165
178
|
|
166
179
|
##
|
@@ -194,10 +207,10 @@ module Google
|
|
194
207
|
# @param zone [::String]
|
195
208
|
# The name of the zone for this request.
|
196
209
|
# @yield [result, response] Access the result along with the Faraday response object
|
197
|
-
# @yieldparam result [::Gapic::
|
210
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
198
211
|
# @yieldparam response [::Faraday::Response]
|
199
212
|
#
|
200
|
-
# @return [::Gapic::
|
213
|
+
# @return [::Gapic::GenericLRO::Operation]
|
201
214
|
#
|
202
215
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
203
216
|
def add_resource_policies request, options = nil
|
@@ -224,7 +237,15 @@ module Google
|
|
224
237
|
metadata: @config.metadata
|
225
238
|
|
226
239
|
@disks_stub.add_resource_policies request, options do |result, response|
|
227
|
-
result = ::
|
240
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
241
|
+
operation: result,
|
242
|
+
client: zone_operations,
|
243
|
+
request_values: {
|
244
|
+
"project" => request.project,
|
245
|
+
"zone" => request.zone
|
246
|
+
},
|
247
|
+
options: options
|
248
|
+
)
|
228
249
|
yield result, response if block_given?
|
229
250
|
return result
|
230
251
|
end
|
@@ -254,7 +275,7 @@ module Google
|
|
254
275
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
255
276
|
#
|
256
277
|
# @param filter [::String]
|
257
|
-
# A filter expression that filters resources listed in the response.
|
278
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
258
279
|
# @param include_all_scopes [::Boolean]
|
259
280
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
260
281
|
# @param max_results [::Integer]
|
@@ -330,7 +351,7 @@ module Google
|
|
330
351
|
# @param disk [::String]
|
331
352
|
# Name of the persistent disk to snapshot.
|
332
353
|
# @param guest_flush [::Boolean]
|
333
|
-
# [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.
|
354
|
+
# [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.
|
334
355
|
# @param project [::String]
|
335
356
|
# Project ID for this request.
|
336
357
|
# @param request_id [::String]
|
@@ -340,10 +361,10 @@ module Google
|
|
340
361
|
# @param zone [::String]
|
341
362
|
# The name of the zone for this request.
|
342
363
|
# @yield [result, response] Access the result along with the Faraday response object
|
343
|
-
# @yieldparam result [::Gapic::
|
364
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
344
365
|
# @yieldparam response [::Faraday::Response]
|
345
366
|
#
|
346
|
-
# @return [::Gapic::
|
367
|
+
# @return [::Gapic::GenericLRO::Operation]
|
347
368
|
#
|
348
369
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
349
370
|
def create_snapshot request, options = nil
|
@@ -370,7 +391,15 @@ module Google
|
|
370
391
|
metadata: @config.metadata
|
371
392
|
|
372
393
|
@disks_stub.create_snapshot request, options do |result, response|
|
373
|
-
result = ::
|
394
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
395
|
+
operation: result,
|
396
|
+
client: zone_operations,
|
397
|
+
request_values: {
|
398
|
+
"project" => request.project,
|
399
|
+
"zone" => request.zone
|
400
|
+
},
|
401
|
+
options: options
|
402
|
+
)
|
374
403
|
yield result, response if block_given?
|
375
404
|
return result
|
376
405
|
end
|
@@ -408,10 +437,10 @@ module Google
|
|
408
437
|
# @param zone [::String]
|
409
438
|
# The name of the zone for this request.
|
410
439
|
# @yield [result, response] Access the result along with the Faraday response object
|
411
|
-
# @yieldparam result [::Gapic::
|
440
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
412
441
|
# @yieldparam response [::Faraday::Response]
|
413
442
|
#
|
414
|
-
# @return [::Gapic::
|
443
|
+
# @return [::Gapic::GenericLRO::Operation]
|
415
444
|
#
|
416
445
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
417
446
|
def delete request, options = nil
|
@@ -438,7 +467,15 @@ module Google
|
|
438
467
|
metadata: @config.metadata
|
439
468
|
|
440
469
|
@disks_stub.delete request, options do |result, response|
|
441
|
-
result = ::
|
470
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
471
|
+
operation: result,
|
472
|
+
client: zone_operations,
|
473
|
+
request_values: {
|
474
|
+
"project" => request.project,
|
475
|
+
"zone" => request.zone
|
476
|
+
},
|
477
|
+
options: options
|
478
|
+
)
|
442
479
|
yield result, response if block_given?
|
443
480
|
return result
|
444
481
|
end
|
@@ -610,10 +647,10 @@ module Google
|
|
610
647
|
# @param zone [::String]
|
611
648
|
# The name of the zone for this request.
|
612
649
|
# @yield [result, response] Access the result along with the Faraday response object
|
613
|
-
# @yieldparam result [::Gapic::
|
650
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
614
651
|
# @yieldparam response [::Faraday::Response]
|
615
652
|
#
|
616
|
-
# @return [::Gapic::
|
653
|
+
# @return [::Gapic::GenericLRO::Operation]
|
617
654
|
#
|
618
655
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
619
656
|
def insert request, options = nil
|
@@ -640,7 +677,15 @@ module Google
|
|
640
677
|
metadata: @config.metadata
|
641
678
|
|
642
679
|
@disks_stub.insert request, options do |result, response|
|
643
|
-
result = ::
|
680
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
681
|
+
operation: result,
|
682
|
+
client: zone_operations,
|
683
|
+
request_values: {
|
684
|
+
"project" => request.project,
|
685
|
+
"zone" => request.zone
|
686
|
+
},
|
687
|
+
options: options
|
688
|
+
)
|
644
689
|
yield result, response if block_given?
|
645
690
|
return result
|
646
691
|
end
|
@@ -670,7 +715,7 @@ module Google
|
|
670
715
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
671
716
|
#
|
672
717
|
# @param filter [::String]
|
673
|
-
# A filter expression that filters resources listed in the response.
|
718
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
674
719
|
# @param max_results [::Integer]
|
675
720
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
676
721
|
# @param order_by [::String]
|
@@ -754,10 +799,10 @@ module Google
|
|
754
799
|
# @param zone [::String]
|
755
800
|
# The name of the zone for this request.
|
756
801
|
# @yield [result, response] Access the result along with the Faraday response object
|
757
|
-
# @yieldparam result [::Gapic::
|
802
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
758
803
|
# @yieldparam response [::Faraday::Response]
|
759
804
|
#
|
760
|
-
# @return [::Gapic::
|
805
|
+
# @return [::Gapic::GenericLRO::Operation]
|
761
806
|
#
|
762
807
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
763
808
|
def remove_resource_policies request, options = nil
|
@@ -784,7 +829,15 @@ module Google
|
|
784
829
|
metadata: @config.metadata
|
785
830
|
|
786
831
|
@disks_stub.remove_resource_policies request, options do |result, response|
|
787
|
-
result = ::
|
832
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
833
|
+
operation: result,
|
834
|
+
client: zone_operations,
|
835
|
+
request_values: {
|
836
|
+
"project" => request.project,
|
837
|
+
"zone" => request.zone
|
838
|
+
},
|
839
|
+
options: options
|
840
|
+
)
|
788
841
|
yield result, response if block_given?
|
789
842
|
return result
|
790
843
|
end
|
@@ -824,10 +877,10 @@ module Google
|
|
824
877
|
# @param zone [::String]
|
825
878
|
# The name of the zone for this request.
|
826
879
|
# @yield [result, response] Access the result along with the Faraday response object
|
827
|
-
# @yieldparam result [::Gapic::
|
880
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
828
881
|
# @yieldparam response [::Faraday::Response]
|
829
882
|
#
|
830
|
-
# @return [::Gapic::
|
883
|
+
# @return [::Gapic::GenericLRO::Operation]
|
831
884
|
#
|
832
885
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
833
886
|
def resize request, options = nil
|
@@ -854,7 +907,15 @@ module Google
|
|
854
907
|
metadata: @config.metadata
|
855
908
|
|
856
909
|
@disks_stub.resize request, options do |result, response|
|
857
|
-
result = ::
|
910
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
911
|
+
operation: result,
|
912
|
+
client: zone_operations,
|
913
|
+
request_values: {
|
914
|
+
"project" => request.project,
|
915
|
+
"zone" => request.zone
|
916
|
+
},
|
917
|
+
options: options
|
918
|
+
)
|
858
919
|
yield result, response if block_given?
|
859
920
|
return result
|
860
921
|
end
|
@@ -961,10 +1022,10 @@ module Google
|
|
961
1022
|
# @param zone_set_labels_request_resource [::Google::Cloud::Compute::V1::ZoneSetLabelsRequest, ::Hash]
|
962
1023
|
# The body resource for this request
|
963
1024
|
# @yield [result, response] Access the result along with the Faraday response object
|
964
|
-
# @yieldparam result [::Gapic::
|
1025
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
965
1026
|
# @yieldparam response [::Faraday::Response]
|
966
1027
|
#
|
967
|
-
# @return [::Gapic::
|
1028
|
+
# @return [::Gapic::GenericLRO::Operation]
|
968
1029
|
#
|
969
1030
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
970
1031
|
def set_labels request, options = nil
|
@@ -991,7 +1052,15 @@ module Google
|
|
991
1052
|
metadata: @config.metadata
|
992
1053
|
|
993
1054
|
@disks_stub.set_labels request, options do |result, response|
|
994
|
-
result = ::
|
1055
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
1056
|
+
operation: result,
|
1057
|
+
client: zone_operations,
|
1058
|
+
request_values: {
|
1059
|
+
"project" => request.project,
|
1060
|
+
"zone" => request.zone
|
1061
|
+
},
|
1062
|
+
options: options
|
1063
|
+
)
|
995
1064
|
yield result, response if block_given?
|
996
1065
|
return result
|
997
1066
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/external_vpn_gateways/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -138,9 +139,21 @@ module Google
|
|
138
139
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
140
|
end
|
140
141
|
|
142
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
143
|
+
config.credentials = credentials
|
144
|
+
config.endpoint = @config.endpoint
|
145
|
+
end
|
146
|
+
|
141
147
|
@external_vpn_gateways_stub = ::Google::Cloud::Compute::V1::ExternalVpnGateways::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
142
148
|
end
|
143
149
|
|
150
|
+
##
|
151
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
152
|
+
#
|
153
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
154
|
+
#
|
155
|
+
attr_reader :global_operations
|
156
|
+
|
144
157
|
# Service calls
|
145
158
|
|
146
159
|
##
|
@@ -170,10 +183,10 @@ module Google
|
|
170
183
|
# @param request_id [::String]
|
171
184
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
172
185
|
# @yield [result, response] Access the result along with the Faraday response object
|
173
|
-
# @yieldparam result [::Gapic::
|
186
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
174
187
|
# @yieldparam response [::Faraday::Response]
|
175
188
|
#
|
176
|
-
# @return [::Gapic::
|
189
|
+
# @return [::Gapic::GenericLRO::Operation]
|
177
190
|
#
|
178
191
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
179
192
|
def delete request, options = nil
|
@@ -200,7 +213,14 @@ module Google
|
|
200
213
|
metadata: @config.metadata
|
201
214
|
|
202
215
|
@external_vpn_gateways_stub.delete request, options do |result, response|
|
203
|
-
result = ::
|
216
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
217
|
+
operation: result,
|
218
|
+
client: global_operations,
|
219
|
+
request_values: {
|
220
|
+
"project" => request.project
|
221
|
+
},
|
222
|
+
options: options
|
223
|
+
)
|
204
224
|
yield result, response if block_given?
|
205
225
|
return result
|
206
226
|
end
|
@@ -299,10 +319,10 @@ module Google
|
|
299
319
|
# @param request_id [::String]
|
300
320
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
301
321
|
# @yield [result, response] Access the result along with the Faraday response object
|
302
|
-
# @yieldparam result [::Gapic::
|
322
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
303
323
|
# @yieldparam response [::Faraday::Response]
|
304
324
|
#
|
305
|
-
# @return [::Gapic::
|
325
|
+
# @return [::Gapic::GenericLRO::Operation]
|
306
326
|
#
|
307
327
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
308
328
|
def insert request, options = nil
|
@@ -329,7 +349,14 @@ module Google
|
|
329
349
|
metadata: @config.metadata
|
330
350
|
|
331
351
|
@external_vpn_gateways_stub.insert request, options do |result, response|
|
332
|
-
result = ::
|
352
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
353
|
+
operation: result,
|
354
|
+
client: global_operations,
|
355
|
+
request_values: {
|
356
|
+
"project" => request.project
|
357
|
+
},
|
358
|
+
options: options
|
359
|
+
)
|
333
360
|
yield result, response if block_given?
|
334
361
|
return result
|
335
362
|
end
|
@@ -359,7 +386,7 @@ module Google
|
|
359
386
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
360
387
|
#
|
361
388
|
# @param filter [::String]
|
362
|
-
# A filter expression that filters resources listed in the response.
|
389
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
363
390
|
# @param max_results [::Integer]
|
364
391
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
365
392
|
# @param order_by [::String]
|
@@ -437,10 +464,10 @@ module Google
|
|
437
464
|
# @param resource [::String]
|
438
465
|
# Name or id of the resource for this request.
|
439
466
|
# @yield [result, response] Access the result along with the Faraday response object
|
440
|
-
# @yieldparam result [::Gapic::
|
467
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
441
468
|
# @yieldparam response [::Faraday::Response]
|
442
469
|
#
|
443
|
-
# @return [::Gapic::
|
470
|
+
# @return [::Gapic::GenericLRO::Operation]
|
444
471
|
#
|
445
472
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
446
473
|
def set_labels request, options = nil
|
@@ -467,7 +494,14 @@ module Google
|
|
467
494
|
metadata: @config.metadata
|
468
495
|
|
469
496
|
@external_vpn_gateways_stub.set_labels request, options do |result, response|
|
470
|
-
result = ::
|
497
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
498
|
+
operation: result,
|
499
|
+
client: global_operations,
|
500
|
+
request_values: {
|
501
|
+
"project" => request.project
|
502
|
+
},
|
503
|
+
options: options
|
504
|
+
)
|
471
505
|
yield result, response if block_given?
|
472
506
|
return result
|
473
507
|
end
|