google-cloud-compute-v1 0.5.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +4 -4
- 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 +534 -2
- 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 +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 +521 -96
- 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_endpoint_groups/rest/client.rb +60 -15
- 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_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_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 +62 -17
- 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 +75 -20
- 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 +3 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/compute/v1/compute.rb +1647 -330
- metadata +14 -7
@@ -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/backend_services/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -91,6 +92,8 @@ module Google
|
|
91
92
|
|
92
93
|
default_config.rpcs.patch.timeout = 600.0
|
93
94
|
|
95
|
+
default_config.rpcs.set_edge_security_policy.timeout = 600.0
|
96
|
+
|
94
97
|
default_config.rpcs.set_security_policy.timeout = 600.0
|
95
98
|
|
96
99
|
default_config.rpcs.update.timeout = 600.0
|
@@ -151,9 +154,21 @@ module Google
|
|
151
154
|
credentials = Credentials.new credentials, scope: @config.scope
|
152
155
|
end
|
153
156
|
|
157
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
158
|
+
config.credentials = credentials
|
159
|
+
config.endpoint = @config.endpoint
|
160
|
+
end
|
161
|
+
|
154
162
|
@backend_services_stub = ::Google::Cloud::Compute::V1::BackendServices::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
155
163
|
end
|
156
164
|
|
165
|
+
##
|
166
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
167
|
+
#
|
168
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
169
|
+
#
|
170
|
+
attr_reader :global_operations
|
171
|
+
|
157
172
|
# Service calls
|
158
173
|
|
159
174
|
##
|
@@ -185,10 +200,10 @@ module Google
|
|
185
200
|
# @param signed_url_key_resource [::Google::Cloud::Compute::V1::SignedUrlKey, ::Hash]
|
186
201
|
# The body resource for this request
|
187
202
|
# @yield [result, response] Access the result along with the Faraday response object
|
188
|
-
# @yieldparam result [::Gapic::
|
203
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
189
204
|
# @yieldparam response [::Faraday::Response]
|
190
205
|
#
|
191
|
-
# @return [::Gapic::
|
206
|
+
# @return [::Gapic::GenericLRO::Operation]
|
192
207
|
#
|
193
208
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
194
209
|
def add_signed_url_key request, options = nil
|
@@ -215,7 +230,14 @@ module Google
|
|
215
230
|
metadata: @config.metadata
|
216
231
|
|
217
232
|
@backend_services_stub.add_signed_url_key request, options do |result, response|
|
218
|
-
result = ::
|
233
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
234
|
+
operation: result,
|
235
|
+
client: global_operations,
|
236
|
+
request_values: {
|
237
|
+
"project" => request.project
|
238
|
+
},
|
239
|
+
options: options
|
240
|
+
)
|
219
241
|
yield result, response if block_given?
|
220
242
|
return result
|
221
243
|
end
|
@@ -245,7 +267,7 @@ module Google
|
|
245
267
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
246
268
|
#
|
247
269
|
# @param filter [::String]
|
248
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
270
|
+
# 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) ```
|
249
271
|
# @param include_all_scopes [::Boolean]
|
250
272
|
# 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.
|
251
273
|
# @param max_results [::Integer]
|
@@ -325,10 +347,10 @@ module Google
|
|
325
347
|
# @param request_id [::String]
|
326
348
|
# 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).
|
327
349
|
# @yield [result, response] Access the result along with the Faraday response object
|
328
|
-
# @yieldparam result [::Gapic::
|
350
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
329
351
|
# @yieldparam response [::Faraday::Response]
|
330
352
|
#
|
331
|
-
# @return [::Gapic::
|
353
|
+
# @return [::Gapic::GenericLRO::Operation]
|
332
354
|
#
|
333
355
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
334
356
|
def delete request, options = nil
|
@@ -355,7 +377,14 @@ module Google
|
|
355
377
|
metadata: @config.metadata
|
356
378
|
|
357
379
|
@backend_services_stub.delete request, options do |result, response|
|
358
|
-
result = ::
|
380
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
381
|
+
operation: result,
|
382
|
+
client: global_operations,
|
383
|
+
request_values: {
|
384
|
+
"project" => request.project
|
385
|
+
},
|
386
|
+
options: options
|
387
|
+
)
|
359
388
|
yield result, response if block_given?
|
360
389
|
return result
|
361
390
|
end
|
@@ -393,10 +422,10 @@ module Google
|
|
393
422
|
# @param request_id [::String]
|
394
423
|
# 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).
|
395
424
|
# @yield [result, response] Access the result along with the Faraday response object
|
396
|
-
# @yieldparam result [::Gapic::
|
425
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
397
426
|
# @yieldparam response [::Faraday::Response]
|
398
427
|
#
|
399
|
-
# @return [::Gapic::
|
428
|
+
# @return [::Gapic::GenericLRO::Operation]
|
400
429
|
#
|
401
430
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
402
431
|
def delete_signed_url_key request, options = nil
|
@@ -423,7 +452,14 @@ module Google
|
|
423
452
|
metadata: @config.metadata
|
424
453
|
|
425
454
|
@backend_services_stub.delete_signed_url_key request, options do |result, response|
|
426
|
-
result = ::
|
455
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
456
|
+
operation: result,
|
457
|
+
client: global_operations,
|
458
|
+
request_values: {
|
459
|
+
"project" => request.project
|
460
|
+
},
|
461
|
+
options: options
|
462
|
+
)
|
427
463
|
yield result, response if block_given?
|
428
464
|
return result
|
429
465
|
end
|
@@ -586,10 +622,10 @@ module Google
|
|
586
622
|
# @param request_id [::String]
|
587
623
|
# 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).
|
588
624
|
# @yield [result, response] Access the result along with the Faraday response object
|
589
|
-
# @yieldparam result [::Gapic::
|
625
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
590
626
|
# @yieldparam response [::Faraday::Response]
|
591
627
|
#
|
592
|
-
# @return [::Gapic::
|
628
|
+
# @return [::Gapic::GenericLRO::Operation]
|
593
629
|
#
|
594
630
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
595
631
|
def insert request, options = nil
|
@@ -616,7 +652,14 @@ module Google
|
|
616
652
|
metadata: @config.metadata
|
617
653
|
|
618
654
|
@backend_services_stub.insert request, options do |result, response|
|
619
|
-
result = ::
|
655
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
656
|
+
operation: result,
|
657
|
+
client: global_operations,
|
658
|
+
request_values: {
|
659
|
+
"project" => request.project
|
660
|
+
},
|
661
|
+
options: options
|
662
|
+
)
|
620
663
|
yield result, response if block_given?
|
621
664
|
return result
|
622
665
|
end
|
@@ -646,7 +689,7 @@ module Google
|
|
646
689
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
647
690
|
#
|
648
691
|
# @param filter [::String]
|
649
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name,
|
692
|
+
# 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) ```
|
650
693
|
# @param max_results [::Integer]
|
651
694
|
# 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`)
|
652
695
|
# @param order_by [::String]
|
@@ -726,10 +769,10 @@ module Google
|
|
726
769
|
# @param request_id [::String]
|
727
770
|
# 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).
|
728
771
|
# @yield [result, response] Access the result along with the Faraday response object
|
729
|
-
# @yieldparam result [::Gapic::
|
772
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
730
773
|
# @yieldparam response [::Faraday::Response]
|
731
774
|
#
|
732
|
-
# @return [::Gapic::
|
775
|
+
# @return [::Gapic::GenericLRO::Operation]
|
733
776
|
#
|
734
777
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
735
778
|
def patch request, options = nil
|
@@ -756,7 +799,89 @@ module Google
|
|
756
799
|
metadata: @config.metadata
|
757
800
|
|
758
801
|
@backend_services_stub.patch request, options do |result, response|
|
759
|
-
result = ::
|
802
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
803
|
+
operation: result,
|
804
|
+
client: global_operations,
|
805
|
+
request_values: {
|
806
|
+
"project" => request.project
|
807
|
+
},
|
808
|
+
options: options
|
809
|
+
)
|
810
|
+
yield result, response if block_given?
|
811
|
+
return result
|
812
|
+
end
|
813
|
+
rescue ::Faraday::Error => e
|
814
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
815
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
816
|
+
end
|
817
|
+
|
818
|
+
##
|
819
|
+
# Sets the edge security policy for the specified backend service.
|
820
|
+
#
|
821
|
+
# @overload set_edge_security_policy(request, options = nil)
|
822
|
+
# Pass arguments to `set_edge_security_policy` via a request object, either of type
|
823
|
+
# {::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest} or an equivalent Hash.
|
824
|
+
#
|
825
|
+
# @param request [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest, ::Hash]
|
826
|
+
# A request object representing the call parameters. Required. To specify no
|
827
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
828
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
829
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
830
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
831
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
832
|
+
#
|
833
|
+
# @overload set_edge_security_policy(backend_service: nil, project: nil, request_id: nil, security_policy_reference_resource: nil)
|
834
|
+
# Pass arguments to `set_edge_security_policy` via keyword arguments. Note that at
|
835
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
836
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
837
|
+
#
|
838
|
+
# @param backend_service [::String]
|
839
|
+
# Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035.
|
840
|
+
# @param project [::String]
|
841
|
+
# Project ID for this request.
|
842
|
+
# @param request_id [::String]
|
843
|
+
# 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).
|
844
|
+
# @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
|
845
|
+
# The body resource for this request
|
846
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
847
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
848
|
+
# @yieldparam response [::Faraday::Response]
|
849
|
+
#
|
850
|
+
# @return [::Gapic::GenericLRO::Operation]
|
851
|
+
#
|
852
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
853
|
+
def set_edge_security_policy request, options = nil
|
854
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
855
|
+
|
856
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest
|
857
|
+
|
858
|
+
# Converts hash and nil to an options object
|
859
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
860
|
+
|
861
|
+
# Customize the options with defaults
|
862
|
+
call_metadata = @config.rpcs.set_edge_security_policy.metadata.to_h
|
863
|
+
|
864
|
+
# Set x-goog-api-client header
|
865
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
866
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
867
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
868
|
+
transports_version_send: [:rest]
|
869
|
+
|
870
|
+
options.apply_defaults timeout: @config.rpcs.set_edge_security_policy.timeout,
|
871
|
+
metadata: call_metadata
|
872
|
+
|
873
|
+
options.apply_defaults timeout: @config.timeout,
|
874
|
+
metadata: @config.metadata
|
875
|
+
|
876
|
+
@backend_services_stub.set_edge_security_policy request, options do |result, response|
|
877
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
878
|
+
operation: result,
|
879
|
+
client: global_operations,
|
880
|
+
request_values: {
|
881
|
+
"project" => request.project
|
882
|
+
},
|
883
|
+
options: options
|
884
|
+
)
|
760
885
|
yield result, response if block_given?
|
761
886
|
return result
|
762
887
|
end
|
@@ -794,10 +919,10 @@ module Google
|
|
794
919
|
# @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
|
795
920
|
# The body resource for this request
|
796
921
|
# @yield [result, response] Access the result along with the Faraday response object
|
797
|
-
# @yieldparam result [::Gapic::
|
922
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
798
923
|
# @yieldparam response [::Faraday::Response]
|
799
924
|
#
|
800
|
-
# @return [::Gapic::
|
925
|
+
# @return [::Gapic::GenericLRO::Operation]
|
801
926
|
#
|
802
927
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
803
928
|
def set_security_policy request, options = nil
|
@@ -824,7 +949,14 @@ module Google
|
|
824
949
|
metadata: @config.metadata
|
825
950
|
|
826
951
|
@backend_services_stub.set_security_policy request, options do |result, response|
|
827
|
-
result = ::
|
952
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
953
|
+
operation: result,
|
954
|
+
client: global_operations,
|
955
|
+
request_values: {
|
956
|
+
"project" => request.project
|
957
|
+
},
|
958
|
+
options: options
|
959
|
+
)
|
828
960
|
yield result, response if block_given?
|
829
961
|
return result
|
830
962
|
end
|
@@ -862,10 +994,10 @@ module Google
|
|
862
994
|
# @param request_id [::String]
|
863
995
|
# 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).
|
864
996
|
# @yield [result, response] Access the result along with the Faraday response object
|
865
|
-
# @yieldparam result [::Gapic::
|
997
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
866
998
|
# @yieldparam response [::Faraday::Response]
|
867
999
|
#
|
868
|
-
# @return [::Gapic::
|
1000
|
+
# @return [::Gapic::GenericLRO::Operation]
|
869
1001
|
#
|
870
1002
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
871
1003
|
def update request, options = nil
|
@@ -892,7 +1024,14 @@ module Google
|
|
892
1024
|
metadata: @config.metadata
|
893
1025
|
|
894
1026
|
@backend_services_stub.update request, options do |result, response|
|
895
|
-
result = ::
|
1027
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
1028
|
+
operation: result,
|
1029
|
+
client: global_operations,
|
1030
|
+
request_values: {
|
1031
|
+
"project" => request.project
|
1032
|
+
},
|
1033
|
+
options: options
|
1034
|
+
)
|
896
1035
|
yield result, response if block_given?
|
897
1036
|
return result
|
898
1037
|
end
|
@@ -1046,6 +1185,11 @@ module Google
|
|
1046
1185
|
#
|
1047
1186
|
attr_reader :patch
|
1048
1187
|
##
|
1188
|
+
# RPC-specific configuration for `set_edge_security_policy`
|
1189
|
+
# @return [::Gapic::Config::Method]
|
1190
|
+
#
|
1191
|
+
attr_reader :set_edge_security_policy
|
1192
|
+
##
|
1049
1193
|
# RPC-specific configuration for `set_security_policy`
|
1050
1194
|
# @return [::Gapic::Config::Method]
|
1051
1195
|
#
|
@@ -1076,6 +1220,8 @@ module Google
|
|
1076
1220
|
@list = ::Gapic::Config::Method.new list_config
|
1077
1221
|
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1078
1222
|
@patch = ::Gapic::Config::Method.new patch_config
|
1223
|
+
set_edge_security_policy_config = parent_rpcs.set_edge_security_policy if parent_rpcs.respond_to? :set_edge_security_policy
|
1224
|
+
@set_edge_security_policy = ::Gapic::Config::Method.new set_edge_security_policy_config
|
1079
1225
|
set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
|
1080
1226
|
@set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
|
1081
1227
|
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|
@@ -453,6 +453,52 @@ module Google
|
|
453
453
|
[uri, body, query_string_params]
|
454
454
|
end
|
455
455
|
|
456
|
+
##
|
457
|
+
# Baseline implementation for the set_edge_security_policy REST call
|
458
|
+
#
|
459
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest]
|
460
|
+
# A request object representing the call parameters. Required.
|
461
|
+
# @param options [::Gapic::CallOptions]
|
462
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
463
|
+
#
|
464
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
465
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
466
|
+
# @yieldparam response [::Faraday::Response]
|
467
|
+
#
|
468
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
469
|
+
# A result object deserialized from the server's reply
|
470
|
+
def set_edge_security_policy request_pb, options = nil
|
471
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
472
|
+
|
473
|
+
uri, body, query_string_params = transcode_set_edge_security_policy_request request_pb
|
474
|
+
response = @client_stub.make_post_request(
|
475
|
+
uri: uri,
|
476
|
+
body: body,
|
477
|
+
params: query_string_params,
|
478
|
+
options: options
|
479
|
+
)
|
480
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
481
|
+
|
482
|
+
yield result, response if block_given?
|
483
|
+
result
|
484
|
+
end
|
485
|
+
|
486
|
+
##
|
487
|
+
# GRPC transcoding helper method for the set_edge_security_policy REST call
|
488
|
+
#
|
489
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest]
|
490
|
+
# A request object representing the call parameters. Required.
|
491
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
492
|
+
# Uri, Body, Query string parameters
|
493
|
+
def transcode_set_edge_security_policy_request request_pb
|
494
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendServices/#{request_pb.backend_service}/setEdgeSecurityPolicy"
|
495
|
+
body = request_pb.security_policy_reference_resource.to_json
|
496
|
+
query_string_params = {}
|
497
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
498
|
+
|
499
|
+
[uri, body, query_string_params]
|
500
|
+
end
|
501
|
+
|
456
502
|
##
|
457
503
|
# Baseline implementation for the set_security_policy REST call
|
458
504
|
#
|