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
@@ -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/firewall_policies/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_organization_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -174,9 +175,21 @@ module Google
|
|
174
175
|
credentials = Credentials.new credentials, scope: @config.scope
|
175
176
|
end
|
176
177
|
|
178
|
+
@global_organization_operations = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::Client.new do |config|
|
179
|
+
config.credentials = credentials
|
180
|
+
config.endpoint = @config.endpoint
|
181
|
+
end
|
182
|
+
|
177
183
|
@firewall_policies_stub = ::Google::Cloud::Compute::V1::FirewallPolicies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
178
184
|
end
|
179
185
|
|
186
|
+
##
|
187
|
+
# Get the associated client for long-running operations via GlobalOrganizationOperations.
|
188
|
+
#
|
189
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::Client]
|
190
|
+
#
|
191
|
+
attr_reader :global_organization_operations
|
192
|
+
|
180
193
|
# Service calls
|
181
194
|
|
182
195
|
##
|
@@ -208,10 +221,10 @@ module Google
|
|
208
221
|
# @param request_id [::String]
|
209
222
|
# 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).
|
210
223
|
# @yield [result, response] Access the result along with the Faraday response object
|
211
|
-
# @yieldparam result [::Gapic::
|
224
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
212
225
|
# @yieldparam response [::Faraday::Response]
|
213
226
|
#
|
214
|
-
# @return [::Gapic::
|
227
|
+
# @return [::Gapic::GenericLRO::Operation]
|
215
228
|
#
|
216
229
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
217
230
|
def add_association request, options = nil
|
@@ -238,7 +251,12 @@ module Google
|
|
238
251
|
metadata: @config.metadata
|
239
252
|
|
240
253
|
@firewall_policies_stub.add_association request, options do |result, response|
|
241
|
-
result = ::
|
254
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
255
|
+
operation: result,
|
256
|
+
client: global_organization_operations,
|
257
|
+
request_values: {},
|
258
|
+
options: options
|
259
|
+
)
|
242
260
|
yield result, response if block_given?
|
243
261
|
return result
|
244
262
|
end
|
@@ -274,10 +292,10 @@ module Google
|
|
274
292
|
# @param request_id [::String]
|
275
293
|
# 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).
|
276
294
|
# @yield [result, response] Access the result along with the Faraday response object
|
277
|
-
# @yieldparam result [::Gapic::
|
295
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
278
296
|
# @yieldparam response [::Faraday::Response]
|
279
297
|
#
|
280
|
-
# @return [::Gapic::
|
298
|
+
# @return [::Gapic::GenericLRO::Operation]
|
281
299
|
#
|
282
300
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
283
301
|
def add_rule request, options = nil
|
@@ -304,7 +322,12 @@ module Google
|
|
304
322
|
metadata: @config.metadata
|
305
323
|
|
306
324
|
@firewall_policies_stub.add_rule request, options do |result, response|
|
307
|
-
result = ::
|
325
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
326
|
+
operation: result,
|
327
|
+
client: global_organization_operations,
|
328
|
+
request_values: {},
|
329
|
+
options: options
|
330
|
+
)
|
308
331
|
yield result, response if block_given?
|
309
332
|
return result
|
310
333
|
end
|
@@ -340,10 +363,10 @@ module Google
|
|
340
363
|
# @param source_firewall_policy [::String]
|
341
364
|
# The firewall policy from which to copy rules.
|
342
365
|
# @yield [result, response] Access the result along with the Faraday response object
|
343
|
-
# @yieldparam result [::Gapic::
|
366
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
344
367
|
# @yieldparam response [::Faraday::Response]
|
345
368
|
#
|
346
|
-
# @return [::Gapic::
|
369
|
+
# @return [::Gapic::GenericLRO::Operation]
|
347
370
|
#
|
348
371
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
349
372
|
def clone_rules request, options = nil
|
@@ -370,7 +393,12 @@ module Google
|
|
370
393
|
metadata: @config.metadata
|
371
394
|
|
372
395
|
@firewall_policies_stub.clone_rules request, options do |result, response|
|
373
|
-
result = ::
|
396
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
397
|
+
operation: result,
|
398
|
+
client: global_organization_operations,
|
399
|
+
request_values: {},
|
400
|
+
options: options
|
401
|
+
)
|
374
402
|
yield result, response if block_given?
|
375
403
|
return result
|
376
404
|
end
|
@@ -404,10 +432,10 @@ module Google
|
|
404
432
|
# @param request_id [::String]
|
405
433
|
# 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).
|
406
434
|
# @yield [result, response] Access the result along with the Faraday response object
|
407
|
-
# @yieldparam result [::Gapic::
|
435
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
408
436
|
# @yieldparam response [::Faraday::Response]
|
409
437
|
#
|
410
|
-
# @return [::Gapic::
|
438
|
+
# @return [::Gapic::GenericLRO::Operation]
|
411
439
|
#
|
412
440
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
413
441
|
def delete request, options = nil
|
@@ -434,7 +462,12 @@ module Google
|
|
434
462
|
metadata: @config.metadata
|
435
463
|
|
436
464
|
@firewall_policies_stub.delete request, options do |result, response|
|
437
|
-
result = ::
|
465
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
466
|
+
operation: result,
|
467
|
+
client: global_organization_operations,
|
468
|
+
request_values: {},
|
469
|
+
options: options
|
470
|
+
)
|
438
471
|
yield result, response if block_given?
|
439
472
|
return result
|
440
473
|
end
|
@@ -720,10 +753,10 @@ module Google
|
|
720
753
|
# @param request_id [::String]
|
721
754
|
# 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).
|
722
755
|
# @yield [result, response] Access the result along with the Faraday response object
|
723
|
-
# @yieldparam result [::Gapic::
|
756
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
724
757
|
# @yieldparam response [::Faraday::Response]
|
725
758
|
#
|
726
|
-
# @return [::Gapic::
|
759
|
+
# @return [::Gapic::GenericLRO::Operation]
|
727
760
|
#
|
728
761
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
729
762
|
def insert request, options = nil
|
@@ -750,7 +783,14 @@ module Google
|
|
750
783
|
metadata: @config.metadata
|
751
784
|
|
752
785
|
@firewall_policies_stub.insert request, options do |result, response|
|
753
|
-
result = ::
|
786
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
787
|
+
operation: result,
|
788
|
+
client: global_organization_operations,
|
789
|
+
request_values: {
|
790
|
+
"parent_id" => request.parent_id
|
791
|
+
},
|
792
|
+
options: options
|
793
|
+
)
|
754
794
|
yield result, response if block_given?
|
755
795
|
return result
|
756
796
|
end
|
@@ -780,7 +820,7 @@ module Google
|
|
780
820
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
781
821
|
#
|
782
822
|
# @param filter [::String]
|
783
|
-
# A filter expression that filters resources listed in the response.
|
823
|
+
# 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`.
|
784
824
|
# @param max_results [::Integer]
|
785
825
|
# 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`)
|
786
826
|
# @param order_by [::String]
|
@@ -919,10 +959,10 @@ module Google
|
|
919
959
|
# @param request_id [::String]
|
920
960
|
# 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).
|
921
961
|
# @yield [result, response] Access the result along with the Faraday response object
|
922
|
-
# @yieldparam result [::Gapic::
|
962
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
923
963
|
# @yieldparam response [::Faraday::Response]
|
924
964
|
#
|
925
|
-
# @return [::Gapic::
|
965
|
+
# @return [::Gapic::GenericLRO::Operation]
|
926
966
|
#
|
927
967
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
928
968
|
def move request, options = nil
|
@@ -949,7 +989,14 @@ module Google
|
|
949
989
|
metadata: @config.metadata
|
950
990
|
|
951
991
|
@firewall_policies_stub.move request, options do |result, response|
|
952
|
-
result = ::
|
992
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
993
|
+
operation: result,
|
994
|
+
client: global_organization_operations,
|
995
|
+
request_values: {
|
996
|
+
"parent_id" => request.parent_id
|
997
|
+
},
|
998
|
+
options: options
|
999
|
+
)
|
953
1000
|
yield result, response if block_given?
|
954
1001
|
return result
|
955
1002
|
end
|
@@ -985,10 +1032,10 @@ module Google
|
|
985
1032
|
# @param request_id [::String]
|
986
1033
|
# 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).
|
987
1034
|
# @yield [result, response] Access the result along with the Faraday response object
|
988
|
-
# @yieldparam result [::Gapic::
|
1035
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
989
1036
|
# @yieldparam response [::Faraday::Response]
|
990
1037
|
#
|
991
|
-
# @return [::Gapic::
|
1038
|
+
# @return [::Gapic::GenericLRO::Operation]
|
992
1039
|
#
|
993
1040
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
994
1041
|
def patch request, options = nil
|
@@ -1015,7 +1062,12 @@ module Google
|
|
1015
1062
|
metadata: @config.metadata
|
1016
1063
|
|
1017
1064
|
@firewall_policies_stub.patch request, options do |result, response|
|
1018
|
-
result = ::
|
1065
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
1066
|
+
operation: result,
|
1067
|
+
client: global_organization_operations,
|
1068
|
+
request_values: {},
|
1069
|
+
options: options
|
1070
|
+
)
|
1019
1071
|
yield result, response if block_given?
|
1020
1072
|
return result
|
1021
1073
|
end
|
@@ -1053,10 +1105,10 @@ module Google
|
|
1053
1105
|
# @param request_id [::String]
|
1054
1106
|
# 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).
|
1055
1107
|
# @yield [result, response] Access the result along with the Faraday response object
|
1056
|
-
# @yieldparam result [::Gapic::
|
1108
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1057
1109
|
# @yieldparam response [::Faraday::Response]
|
1058
1110
|
#
|
1059
|
-
# @return [::Gapic::
|
1111
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1060
1112
|
#
|
1061
1113
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1062
1114
|
def patch_rule request, options = nil
|
@@ -1083,7 +1135,12 @@ module Google
|
|
1083
1135
|
metadata: @config.metadata
|
1084
1136
|
|
1085
1137
|
@firewall_policies_stub.patch_rule request, options do |result, response|
|
1086
|
-
result = ::
|
1138
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
1139
|
+
operation: result,
|
1140
|
+
client: global_organization_operations,
|
1141
|
+
request_values: {},
|
1142
|
+
options: options
|
1143
|
+
)
|
1087
1144
|
yield result, response if block_given?
|
1088
1145
|
return result
|
1089
1146
|
end
|
@@ -1119,10 +1176,10 @@ module Google
|
|
1119
1176
|
# @param request_id [::String]
|
1120
1177
|
# 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).
|
1121
1178
|
# @yield [result, response] Access the result along with the Faraday response object
|
1122
|
-
# @yieldparam result [::Gapic::
|
1179
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1123
1180
|
# @yieldparam response [::Faraday::Response]
|
1124
1181
|
#
|
1125
|
-
# @return [::Gapic::
|
1182
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1126
1183
|
#
|
1127
1184
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1128
1185
|
def remove_association request, options = nil
|
@@ -1149,7 +1206,12 @@ module Google
|
|
1149
1206
|
metadata: @config.metadata
|
1150
1207
|
|
1151
1208
|
@firewall_policies_stub.remove_association request, options do |result, response|
|
1152
|
-
result = ::
|
1209
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
1210
|
+
operation: result,
|
1211
|
+
client: global_organization_operations,
|
1212
|
+
request_values: {},
|
1213
|
+
options: options
|
1214
|
+
)
|
1153
1215
|
yield result, response if block_given?
|
1154
1216
|
return result
|
1155
1217
|
end
|
@@ -1185,10 +1247,10 @@ module Google
|
|
1185
1247
|
# @param request_id [::String]
|
1186
1248
|
# 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).
|
1187
1249
|
# @yield [result, response] Access the result along with the Faraday response object
|
1188
|
-
# @yieldparam result [::Gapic::
|
1250
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1189
1251
|
# @yieldparam response [::Faraday::Response]
|
1190
1252
|
#
|
1191
|
-
# @return [::Gapic::
|
1253
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1192
1254
|
#
|
1193
1255
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1194
1256
|
def remove_rule request, options = nil
|
@@ -1215,7 +1277,12 @@ module Google
|
|
1215
1277
|
metadata: @config.metadata
|
1216
1278
|
|
1217
1279
|
@firewall_policies_stub.remove_rule request, options do |result, response|
|
1218
|
-
result = ::
|
1280
|
+
result = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::NonstandardLro.create_operation(
|
1281
|
+
operation: result,
|
1282
|
+
client: global_organization_operations,
|
1283
|
+
request_values: {},
|
1284
|
+
options: options
|
1285
|
+
)
|
1219
1286
|
yield result, response if block_given?
|
1220
1287
|
return result
|
1221
1288
|
end
|
@@ -441,7 +441,7 @@ module Google
|
|
441
441
|
uri = "/compute/v1/locations/global/firewallPolicies"
|
442
442
|
body = request_pb.firewall_policy_resource.to_json
|
443
443
|
query_string_params = {}
|
444
|
-
query_string_params["parentId"] = request_pb.parent_id.to_s
|
444
|
+
query_string_params["parentId"] = request_pb.parent_id.to_s
|
445
445
|
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
446
446
|
|
447
447
|
[uri, body, query_string_params]
|
@@ -582,7 +582,7 @@ module Google
|
|
582
582
|
uri = "/compute/v1/locations/global/firewallPolicies/#{request_pb.firewall_policy}/move"
|
583
583
|
body = nil
|
584
584
|
query_string_params = {}
|
585
|
-
query_string_params["parentId"] = request_pb.parent_id.to_s
|
585
|
+
query_string_params["parentId"] = request_pb.parent_id.to_s
|
586
586
|
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
587
587
|
|
588
588
|
[uri, body, query_string_params]
|
@@ -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/firewalls/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
|
@firewalls_stub = ::Google::Cloud::Compute::V1::Firewalls::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
|
@firewalls_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
|
@firewalls_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]
|
@@ -439,10 +466,10 @@ module Google
|
|
439
466
|
# @param request_id [::String]
|
440
467
|
# 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).
|
441
468
|
# @yield [result, response] Access the result along with the Faraday response object
|
442
|
-
# @yieldparam result [::Gapic::
|
469
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
443
470
|
# @yieldparam response [::Faraday::Response]
|
444
471
|
#
|
445
|
-
# @return [::Gapic::
|
472
|
+
# @return [::Gapic::GenericLRO::Operation]
|
446
473
|
#
|
447
474
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
448
475
|
def patch request, options = nil
|
@@ -469,7 +496,14 @@ module Google
|
|
469
496
|
metadata: @config.metadata
|
470
497
|
|
471
498
|
@firewalls_stub.patch request, options do |result, response|
|
472
|
-
result = ::
|
499
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
500
|
+
operation: result,
|
501
|
+
client: global_operations,
|
502
|
+
request_values: {
|
503
|
+
"project" => request.project
|
504
|
+
},
|
505
|
+
options: options
|
506
|
+
)
|
473
507
|
yield result, response if block_given?
|
474
508
|
return result
|
475
509
|
end
|
@@ -507,10 +541,10 @@ module Google
|
|
507
541
|
# @param request_id [::String]
|
508
542
|
# 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).
|
509
543
|
# @yield [result, response] Access the result along with the Faraday response object
|
510
|
-
# @yieldparam result [::Gapic::
|
544
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
511
545
|
# @yieldparam response [::Faraday::Response]
|
512
546
|
#
|
513
|
-
# @return [::Gapic::
|
547
|
+
# @return [::Gapic::GenericLRO::Operation]
|
514
548
|
#
|
515
549
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
516
550
|
def update request, options = nil
|
@@ -537,7 +571,14 @@ module Google
|
|
537
571
|
metadata: @config.metadata
|
538
572
|
|
539
573
|
@firewalls_stub.update request, options do |result, response|
|
540
|
-
result = ::
|
574
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
575
|
+
operation: result,
|
576
|
+
client: global_operations,
|
577
|
+
request_values: {
|
578
|
+
"project" => request.project
|
579
|
+
},
|
580
|
+
options: options
|
581
|
+
)
|
541
582
|
yield result, response if block_given?
|
542
583
|
return result
|
543
584
|
end
|