google-cloud-compute-v1 1.0.0 → 1.3.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 +1 -1
- 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 +158 -19
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +169 -23
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +1117 -9
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +94 -25
- 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 +1 -1
- 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 +47 -13
- 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 +172 -47
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +524 -97
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
- 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/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +804 -0
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
- data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
- 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 +107 -31
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +47 -13
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +51 -14
- 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 +116 -5
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
- 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 +92 -23
- 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 +171 -46
- 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 +38 -9
- 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 +38 -9
- 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 +149 -17
- 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 +3 -3
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +138 -11
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
- 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 +161 -20
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +50 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +51 -14
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +116 -7
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +37 -10
- 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 +47 -13
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +56 -15
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -24
- 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 +74 -19
- 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 +7 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +3236 -422
- metadata +32 -3
@@ -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/global_network_endpoint_groups/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -140,9 +141,21 @@ module Google
|
|
140
141
|
credentials = Credentials.new credentials, scope: @config.scope
|
141
142
|
end
|
142
143
|
|
144
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.endpoint = @config.endpoint
|
147
|
+
end
|
148
|
+
|
143
149
|
@global_network_endpoint_groups_stub = ::Google::Cloud::Compute::V1::GlobalNetworkEndpointGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
144
150
|
end
|
145
151
|
|
152
|
+
##
|
153
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
154
|
+
#
|
155
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
156
|
+
#
|
157
|
+
attr_reader :global_operations
|
158
|
+
|
146
159
|
# Service calls
|
147
160
|
|
148
161
|
##
|
@@ -174,10 +187,10 @@ module Google
|
|
174
187
|
# @param request_id [::String]
|
175
188
|
# 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).
|
176
189
|
# @yield [result, response] Access the result along with the Faraday response object
|
177
|
-
# @yieldparam result [::Gapic::
|
190
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
178
191
|
# @yieldparam response [::Faraday::Response]
|
179
192
|
#
|
180
|
-
# @return [::Gapic::
|
193
|
+
# @return [::Gapic::GenericLRO::Operation]
|
181
194
|
#
|
182
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
183
196
|
def attach_network_endpoints request, options = nil
|
@@ -204,7 +217,14 @@ module Google
|
|
204
217
|
metadata: @config.metadata
|
205
218
|
|
206
219
|
@global_network_endpoint_groups_stub.attach_network_endpoints request, options do |result, response|
|
207
|
-
result = ::
|
220
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
221
|
+
operation: result,
|
222
|
+
client: global_operations,
|
223
|
+
request_values: {
|
224
|
+
"project" => request.project
|
225
|
+
},
|
226
|
+
options: options
|
227
|
+
)
|
208
228
|
yield result, response if block_given?
|
209
229
|
return result
|
210
230
|
end
|
@@ -240,10 +260,10 @@ module Google
|
|
240
260
|
# @param request_id [::String]
|
241
261
|
# 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).
|
242
262
|
# @yield [result, response] Access the result along with the Faraday response object
|
243
|
-
# @yieldparam result [::Gapic::
|
263
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
244
264
|
# @yieldparam response [::Faraday::Response]
|
245
265
|
#
|
246
|
-
# @return [::Gapic::
|
266
|
+
# @return [::Gapic::GenericLRO::Operation]
|
247
267
|
#
|
248
268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
249
269
|
def delete request, options = nil
|
@@ -270,7 +290,14 @@ module Google
|
|
270
290
|
metadata: @config.metadata
|
271
291
|
|
272
292
|
@global_network_endpoint_groups_stub.delete request, options do |result, response|
|
273
|
-
result = ::
|
293
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
294
|
+
operation: result,
|
295
|
+
client: global_operations,
|
296
|
+
request_values: {
|
297
|
+
"project" => request.project
|
298
|
+
},
|
299
|
+
options: options
|
300
|
+
)
|
274
301
|
yield result, response if block_given?
|
275
302
|
return result
|
276
303
|
end
|
@@ -308,10 +335,10 @@ module Google
|
|
308
335
|
# @param request_id [::String]
|
309
336
|
# 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).
|
310
337
|
# @yield [result, response] Access the result along with the Faraday response object
|
311
|
-
# @yieldparam result [::Gapic::
|
338
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
312
339
|
# @yieldparam response [::Faraday::Response]
|
313
340
|
#
|
314
|
-
# @return [::Gapic::
|
341
|
+
# @return [::Gapic::GenericLRO::Operation]
|
315
342
|
#
|
316
343
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
317
344
|
def detach_network_endpoints request, options = nil
|
@@ -338,7 +365,14 @@ module Google
|
|
338
365
|
metadata: @config.metadata
|
339
366
|
|
340
367
|
@global_network_endpoint_groups_stub.detach_network_endpoints request, options do |result, response|
|
341
|
-
result = ::
|
368
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
369
|
+
operation: result,
|
370
|
+
client: global_operations,
|
371
|
+
request_values: {
|
372
|
+
"project" => request.project
|
373
|
+
},
|
374
|
+
options: options
|
375
|
+
)
|
342
376
|
yield result, response if block_given?
|
343
377
|
return result
|
344
378
|
end
|
@@ -437,10 +471,10 @@ module Google
|
|
437
471
|
# @param request_id [::String]
|
438
472
|
# 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).
|
439
473
|
# @yield [result, response] Access the result along with the Faraday response object
|
440
|
-
# @yieldparam result [::Gapic::
|
474
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
441
475
|
# @yieldparam response [::Faraday::Response]
|
442
476
|
#
|
443
|
-
# @return [::Gapic::
|
477
|
+
# @return [::Gapic::GenericLRO::Operation]
|
444
478
|
#
|
445
479
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
446
480
|
def insert request, options = nil
|
@@ -467,7 +501,14 @@ module Google
|
|
467
501
|
metadata: @config.metadata
|
468
502
|
|
469
503
|
@global_network_endpoint_groups_stub.insert request, options do |result, response|
|
470
|
-
result = ::
|
504
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
505
|
+
operation: result,
|
506
|
+
client: global_operations,
|
507
|
+
request_values: {
|
508
|
+
"project" => request.project
|
509
|
+
},
|
510
|
+
options: options
|
511
|
+
)
|
471
512
|
yield result, response if block_given?
|
472
513
|
return result
|
473
514
|
end
|
@@ -497,7 +538,7 @@ module Google
|
|
497
538
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
498
539
|
#
|
499
540
|
# @param filter [::String]
|
500
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
541
|
+
# A filter expression that filters resources listed in the response. The 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) ```
|
501
542
|
# @param max_results [::Integer]
|
502
543
|
# 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`)
|
503
544
|
# @param order_by [::String]
|
@@ -569,7 +610,7 @@ module Google
|
|
569
610
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
570
611
|
#
|
571
612
|
# @param filter [::String]
|
572
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
613
|
+
# A filter expression that filters resources listed in the response. The 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) ```
|
573
614
|
# @param max_results [::Integer]
|
574
615
|
# 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`)
|
575
616
|
# @param network_endpoint_group [::String]
|
@@ -165,7 +165,7 @@ module Google
|
|
165
165
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
166
166
|
#
|
167
167
|
# @param filter [::String]
|
168
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
168
|
+
# A filter expression that filters resources listed in the response. The 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) ```
|
169
169
|
# @param include_all_scopes [::Boolean]
|
170
170
|
# 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.
|
171
171
|
# @param max_results [::Integer]
|
@@ -365,7 +365,7 @@ module Google
|
|
365
365
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
366
366
|
#
|
367
367
|
# @param filter [::String]
|
368
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
368
|
+
# A filter expression that filters resources listed in the response. The 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) ```
|
369
369
|
# @param max_results [::Integer]
|
370
370
|
# 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`)
|
371
371
|
# @param order_by [::String]
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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/operation/retry_policy"
|
20
|
+
require "gapic/generic_lro/operation"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Compute
|
25
|
+
module V1
|
26
|
+
module GlobalOperations
|
27
|
+
module Rest
|
28
|
+
# A module containing nonstandard lro helpers
|
29
|
+
module NonstandardLro
|
30
|
+
class << self
|
31
|
+
##
|
32
|
+
# Creates a Generic LRO operation object that wraps the nonstandard
|
33
|
+
# long-running operation specific to this service.
|
34
|
+
#
|
35
|
+
# @param operation [Object] The long-running operation object that is returned by the initial method call.
|
36
|
+
#
|
37
|
+
# @param client [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client] The client that handles the polling for the longrunning operation.
|
38
|
+
#
|
39
|
+
# @param request_values [Map<String, String>] The values that are to be copied from the request that
|
40
|
+
# triggered the longrunning operation, into the request that polls for the longrunning operation.
|
41
|
+
# The format is `name of the request field -> value`
|
42
|
+
#
|
43
|
+
# @param options [Gapic::CallOptions] call options for this operation
|
44
|
+
#
|
45
|
+
# @return [Gapic::GenericLRO::Operation]
|
46
|
+
#
|
47
|
+
def create_operation operation:, client:, request_values:, options:
|
48
|
+
Gapic::GenericLRO::Operation.new(operation,
|
49
|
+
client: client,
|
50
|
+
polling_method_name: "get",
|
51
|
+
request_values: request_values,
|
52
|
+
operation_status_field: "status",
|
53
|
+
operation_name_field: "name",
|
54
|
+
operation_err_code_field: "http_error_status_code",
|
55
|
+
operation_err_msg_field: "http_error_message",
|
56
|
+
operation_copy_fields: {
|
57
|
+
"name" => "operation"
|
58
|
+
},
|
59
|
+
options: options)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -22,6 +22,7 @@ require "gapic/config/method"
|
|
22
22
|
require "google/cloud/compute/v1/version"
|
23
23
|
|
24
24
|
require "google/cloud/compute/v1/global_operations/credentials"
|
25
|
+
require "google/cloud/compute/v1/global_operations/rest/nonstandard_lro"
|
25
26
|
require "google/cloud/compute/v1/global_operations/rest"
|
26
27
|
|
27
28
|
module Google
|
@@ -284,7 +284,7 @@ module Google
|
|
284
284
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
285
285
|
#
|
286
286
|
# @param filter [::String]
|
287
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
287
|
+
# A filter expression that filters resources listed in the response. The 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) ```
|
288
288
|
# @param max_results [::Integer]
|
289
289
|
# 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`)
|
290
290
|
# @param order_by [::String]
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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/operation/retry_policy"
|
20
|
+
require "gapic/generic_lro/operation"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Compute
|
25
|
+
module V1
|
26
|
+
module GlobalOrganizationOperations
|
27
|
+
module Rest
|
28
|
+
# A module containing nonstandard lro helpers
|
29
|
+
module NonstandardLro
|
30
|
+
class << self
|
31
|
+
##
|
32
|
+
# Creates a Generic LRO operation object that wraps the nonstandard
|
33
|
+
# long-running operation specific to this service.
|
34
|
+
#
|
35
|
+
# @param operation [Object] The long-running operation object that is returned by the initial method call.
|
36
|
+
#
|
37
|
+
# @param client [::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::Client] The client that handles the polling for the longrunning operation.
|
38
|
+
#
|
39
|
+
# @param request_values [Map<String, String>] The values that are to be copied from the request that
|
40
|
+
# triggered the longrunning operation, into the request that polls for the longrunning operation.
|
41
|
+
# The format is `name of the request field -> value`
|
42
|
+
#
|
43
|
+
# @param options [Gapic::CallOptions] call options for this operation
|
44
|
+
#
|
45
|
+
# @return [Gapic::GenericLRO::Operation]
|
46
|
+
#
|
47
|
+
def create_operation operation:, client:, request_values:, options:
|
48
|
+
Gapic::GenericLRO::Operation.new(operation,
|
49
|
+
client: client,
|
50
|
+
polling_method_name: "get",
|
51
|
+
request_values: request_values,
|
52
|
+
operation_status_field: "status",
|
53
|
+
operation_name_field: "name",
|
54
|
+
operation_err_code_field: "http_error_status_code",
|
55
|
+
operation_err_msg_field: "http_error_message",
|
56
|
+
operation_copy_fields: {
|
57
|
+
"name" => "operation"
|
58
|
+
},
|
59
|
+
options: options)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -22,6 +22,7 @@ require "gapic/config/method"
|
|
22
22
|
require "google/cloud/compute/v1/version"
|
23
23
|
|
24
24
|
require "google/cloud/compute/v1/global_organization_operations/credentials"
|
25
|
+
require "google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro"
|
25
26
|
require "google/cloud/compute/v1/global_organization_operations/rest"
|
26
27
|
|
27
28
|
module Google
|
@@ -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/global_public_delegated_prefixes/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -136,9 +137,21 @@ module Google
|
|
136
137
|
credentials = Credentials.new credentials, scope: @config.scope
|
137
138
|
end
|
138
139
|
|
140
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
141
|
+
config.credentials = credentials
|
142
|
+
config.endpoint = @config.endpoint
|
143
|
+
end
|
144
|
+
|
139
145
|
@global_public_delegated_prefixes_stub = ::Google::Cloud::Compute::V1::GlobalPublicDelegatedPrefixes::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
140
146
|
end
|
141
147
|
|
148
|
+
##
|
149
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
150
|
+
#
|
151
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
152
|
+
#
|
153
|
+
attr_reader :global_operations
|
154
|
+
|
142
155
|
# Service calls
|
143
156
|
|
144
157
|
##
|
@@ -166,12 +179,12 @@ module Google
|
|
166
179
|
# @param public_delegated_prefix [::String]
|
167
180
|
# Name of the PublicDelegatedPrefix resource to delete.
|
168
181
|
# @param request_id [::String]
|
169
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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).
|
182
|
+
# 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).
|
170
183
|
# @yield [result, response] Access the result along with the Faraday response object
|
171
|
-
# @yieldparam result [::Gapic::
|
184
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
172
185
|
# @yieldparam response [::Faraday::Response]
|
173
186
|
#
|
174
|
-
# @return [::Gapic::
|
187
|
+
# @return [::Gapic::GenericLRO::Operation]
|
175
188
|
#
|
176
189
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
177
190
|
def delete request, options = nil
|
@@ -198,7 +211,14 @@ module Google
|
|
198
211
|
metadata: @config.metadata
|
199
212
|
|
200
213
|
@global_public_delegated_prefixes_stub.delete request, options do |result, response|
|
201
|
-
result = ::
|
214
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
215
|
+
operation: result,
|
216
|
+
client: global_operations,
|
217
|
+
request_values: {
|
218
|
+
"project" => request.project
|
219
|
+
},
|
220
|
+
options: options
|
221
|
+
)
|
202
222
|
yield result, response if block_given?
|
203
223
|
return result
|
204
224
|
end
|
@@ -295,12 +315,12 @@ module Google
|
|
295
315
|
# @param public_delegated_prefix_resource [::Google::Cloud::Compute::V1::PublicDelegatedPrefix, ::Hash]
|
296
316
|
# The body resource for this request
|
297
317
|
# @param request_id [::String]
|
298
|
-
# 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).
|
318
|
+
# 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).
|
299
319
|
# @yield [result, response] Access the result along with the Faraday response object
|
300
|
-
# @yieldparam result [::Gapic::
|
320
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
301
321
|
# @yieldparam response [::Faraday::Response]
|
302
322
|
#
|
303
|
-
# @return [::Gapic::
|
323
|
+
# @return [::Gapic::GenericLRO::Operation]
|
304
324
|
#
|
305
325
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
306
326
|
def insert request, options = nil
|
@@ -327,7 +347,14 @@ module Google
|
|
327
347
|
metadata: @config.metadata
|
328
348
|
|
329
349
|
@global_public_delegated_prefixes_stub.insert request, options do |result, response|
|
330
|
-
result = ::
|
350
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
351
|
+
operation: result,
|
352
|
+
client: global_operations,
|
353
|
+
request_values: {
|
354
|
+
"project" => request.project
|
355
|
+
},
|
356
|
+
options: options
|
357
|
+
)
|
331
358
|
yield result, response if block_given?
|
332
359
|
return result
|
333
360
|
end
|
@@ -357,7 +384,7 @@ module Google
|
|
357
384
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
358
385
|
#
|
359
386
|
# @param filter [::String]
|
360
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
387
|
+
# A filter expression that filters resources listed in the response. The 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) ```
|
361
388
|
# @param max_results [::Integer]
|
362
389
|
# 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`)
|
363
390
|
# @param order_by [::String]
|
@@ -435,12 +462,12 @@ module Google
|
|
435
462
|
# @param public_delegated_prefix_resource [::Google::Cloud::Compute::V1::PublicDelegatedPrefix, ::Hash]
|
436
463
|
# The body resource for this request
|
437
464
|
# @param request_id [::String]
|
438
|
-
# 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).
|
465
|
+
# 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).
|
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 patch request, options = nil
|
@@ -467,7 +494,14 @@ module Google
|
|
467
494
|
metadata: @config.metadata
|
468
495
|
|
469
496
|
@global_public_delegated_prefixes_stub.patch 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
|