google-cloud-compute-v1 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +421 -1
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +420 -3
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +292 -3
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +289 -1
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +114 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +49 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +16 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +177 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +327 -6
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +149 -4
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +845 -4
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +206 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +32 -0
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +236 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +83 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +149 -4
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +257 -1
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +178 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +229 -4
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +210 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +282 -4
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +304 -3
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +445 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +273 -1
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +308 -4
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +66 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +16 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +378 -4
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +273 -1
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +497 -5
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +98 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +164 -3
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +261 -4
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +203 -6
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +129 -1
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +117 -4
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +197 -4
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +180 -3
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +188 -3
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +284 -3
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +145 -1
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +100 -3
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +100 -3
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +11 -5
@@ -70,6 +70,8 @@ module Google
|
|
70
70
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
71
71
|
}
|
72
72
|
|
73
|
+
default_config.rpcs.announce.timeout = 600.0
|
74
|
+
|
73
75
|
default_config.rpcs.delete.timeout = 600.0
|
74
76
|
|
75
77
|
default_config.rpcs.get.timeout = 600.0
|
@@ -86,6 +88,8 @@ module Google
|
|
86
88
|
|
87
89
|
default_config.rpcs.patch.timeout = 600.0
|
88
90
|
|
91
|
+
default_config.rpcs.withdraw.timeout = 600.0
|
92
|
+
|
89
93
|
default_config
|
90
94
|
end
|
91
95
|
yield @configure if block_given?
|
@@ -181,13 +185,13 @@ module Google
|
|
181
185
|
# @param options [::Gapic::CallOptions, ::Hash]
|
182
186
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
183
187
|
#
|
184
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
188
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
|
185
189
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
186
190
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
187
191
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
188
192
|
#
|
189
193
|
# @param filter [::String]
|
190
|
-
# 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
|
194
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
191
195
|
# @param include_all_scopes [::Boolean]
|
192
196
|
# 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.
|
193
197
|
# @param max_results [::Integer]
|
@@ -200,6 +204,7 @@ module Google
|
|
200
204
|
# Name of the project scoping this request.
|
201
205
|
# @param return_partial_success [::Boolean]
|
202
206
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
207
|
+
# @param service_project_number [::Integer]
|
203
208
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
204
209
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::PublicDelegatedPrefixesScopedList>]
|
205
210
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -207,6 +212,22 @@ module Google
|
|
207
212
|
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::PublicDelegatedPrefixesScopedList>]
|
208
213
|
#
|
209
214
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
215
|
+
#
|
216
|
+
# @example Basic example
|
217
|
+
# require "google/cloud/compute/v1"
|
218
|
+
#
|
219
|
+
# # Create a client object. The client can be reused for multiple calls.
|
220
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
221
|
+
#
|
222
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
223
|
+
# request = Google::Cloud::Compute::V1::AggregatedListPublicDelegatedPrefixesRequest.new
|
224
|
+
#
|
225
|
+
# # Call the aggregated_list method.
|
226
|
+
# result = client.aggregated_list request
|
227
|
+
#
|
228
|
+
# # The returned object is of type Google::Cloud::Compute::V1::PublicDelegatedPrefixAggregatedList.
|
229
|
+
# p result
|
230
|
+
#
|
210
231
|
def aggregated_list request, options = nil
|
211
232
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
212
233
|
|
@@ -243,6 +264,99 @@ module Google
|
|
243
264
|
raise ::Google::Cloud::Error.from_error(e)
|
244
265
|
end
|
245
266
|
|
267
|
+
##
|
268
|
+
# Announces the specified PublicDelegatedPrefix in the given region.
|
269
|
+
#
|
270
|
+
# @overload announce(request, options = nil)
|
271
|
+
# Pass arguments to `announce` via a request object, either of type
|
272
|
+
# {::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest} or an equivalent Hash.
|
273
|
+
#
|
274
|
+
# @param request [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest, ::Hash]
|
275
|
+
# A request object representing the call parameters. Required. To specify no
|
276
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
277
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
278
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
279
|
+
#
|
280
|
+
# @overload announce(project: nil, public_delegated_prefix: nil, region: nil, request_id: nil)
|
281
|
+
# Pass arguments to `announce` via keyword arguments. Note that at
|
282
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
283
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
284
|
+
#
|
285
|
+
# @param project [::String]
|
286
|
+
# Project ID for this request.
|
287
|
+
# @param public_delegated_prefix [::String]
|
288
|
+
# The name of the public delegated prefix. It should comply with RFC1035.
|
289
|
+
# @param region [::String]
|
290
|
+
# The name of the region where the public delegated prefix is located. It should comply with RFC1035.
|
291
|
+
# @param request_id [::String]
|
292
|
+
# 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).
|
293
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
294
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
295
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
296
|
+
#
|
297
|
+
# @return [::Gapic::GenericLRO::Operation]
|
298
|
+
#
|
299
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
300
|
+
#
|
301
|
+
# @example Basic example
|
302
|
+
# require "google/cloud/compute/v1"
|
303
|
+
#
|
304
|
+
# # Create a client object. The client can be reused for multiple calls.
|
305
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
306
|
+
#
|
307
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
308
|
+
# request = Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest.new
|
309
|
+
#
|
310
|
+
# # Call the announce method.
|
311
|
+
# result = client.announce request
|
312
|
+
#
|
313
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
314
|
+
# p result
|
315
|
+
#
|
316
|
+
def announce request, options = nil
|
317
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
318
|
+
|
319
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest
|
320
|
+
|
321
|
+
# Converts hash and nil to an options object
|
322
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
323
|
+
|
324
|
+
# Customize the options with defaults
|
325
|
+
call_metadata = @config.rpcs.announce.metadata.to_h
|
326
|
+
|
327
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
328
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
329
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
330
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
331
|
+
transports_version_send: [:rest]
|
332
|
+
|
333
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
334
|
+
|
335
|
+
options.apply_defaults timeout: @config.rpcs.announce.timeout,
|
336
|
+
metadata: call_metadata,
|
337
|
+
retry_policy: @config.rpcs.announce.retry_policy
|
338
|
+
|
339
|
+
options.apply_defaults timeout: @config.timeout,
|
340
|
+
metadata: @config.metadata,
|
341
|
+
retry_policy: @config.retry_policy
|
342
|
+
|
343
|
+
@public_delegated_prefixes_stub.announce request, options do |result, response|
|
344
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
345
|
+
operation: result,
|
346
|
+
client: region_operations,
|
347
|
+
request_values: {
|
348
|
+
"project" => request.project,
|
349
|
+
"region" => request.region
|
350
|
+
},
|
351
|
+
options: options
|
352
|
+
)
|
353
|
+
yield result, response if block_given?
|
354
|
+
return result
|
355
|
+
end
|
356
|
+
rescue ::Gapic::Rest::Error => e
|
357
|
+
raise ::Google::Cloud::Error.from_error(e)
|
358
|
+
end
|
359
|
+
|
246
360
|
##
|
247
361
|
# Deletes the specified PublicDelegatedPrefix in the given region.
|
248
362
|
#
|
@@ -276,6 +390,22 @@ module Google
|
|
276
390
|
# @return [::Gapic::GenericLRO::Operation]
|
277
391
|
#
|
278
392
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
393
|
+
#
|
394
|
+
# @example Basic example
|
395
|
+
# require "google/cloud/compute/v1"
|
396
|
+
#
|
397
|
+
# # Create a client object. The client can be reused for multiple calls.
|
398
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
399
|
+
#
|
400
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
401
|
+
# request = Google::Cloud::Compute::V1::DeletePublicDelegatedPrefixeRequest.new
|
402
|
+
#
|
403
|
+
# # Call the delete method.
|
404
|
+
# result = client.delete request
|
405
|
+
#
|
406
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
407
|
+
# p result
|
408
|
+
#
|
279
409
|
def delete request, options = nil
|
280
410
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
281
411
|
|
@@ -351,6 +481,22 @@ module Google
|
|
351
481
|
# @return [::Google::Cloud::Compute::V1::PublicDelegatedPrefix]
|
352
482
|
#
|
353
483
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
484
|
+
#
|
485
|
+
# @example Basic example
|
486
|
+
# require "google/cloud/compute/v1"
|
487
|
+
#
|
488
|
+
# # Create a client object. The client can be reused for multiple calls.
|
489
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
490
|
+
#
|
491
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
492
|
+
# request = Google::Cloud::Compute::V1::GetPublicDelegatedPrefixeRequest.new
|
493
|
+
#
|
494
|
+
# # Call the get method.
|
495
|
+
# result = client.get request
|
496
|
+
#
|
497
|
+
# # The returned object is of type Google::Cloud::Compute::V1::PublicDelegatedPrefix.
|
498
|
+
# p result
|
499
|
+
#
|
354
500
|
def get request, options = nil
|
355
501
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
356
502
|
|
@@ -419,6 +565,22 @@ module Google
|
|
419
565
|
# @return [::Gapic::GenericLRO::Operation]
|
420
566
|
#
|
421
567
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
568
|
+
#
|
569
|
+
# @example Basic example
|
570
|
+
# require "google/cloud/compute/v1"
|
571
|
+
#
|
572
|
+
# # Create a client object. The client can be reused for multiple calls.
|
573
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
574
|
+
#
|
575
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
576
|
+
# request = Google::Cloud::Compute::V1::InsertPublicDelegatedPrefixeRequest.new
|
577
|
+
#
|
578
|
+
# # Call the insert method.
|
579
|
+
# result = client.insert request
|
580
|
+
#
|
581
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
582
|
+
# p result
|
583
|
+
#
|
422
584
|
def insert request, options = nil
|
423
585
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
424
586
|
|
@@ -482,7 +644,7 @@ module Google
|
|
482
644
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
483
645
|
#
|
484
646
|
# @param filter [::String]
|
485
|
-
# 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
|
647
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
486
648
|
# @param max_results [::Integer]
|
487
649
|
# 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`)
|
488
650
|
# @param order_by [::String]
|
@@ -502,6 +664,22 @@ module Google
|
|
502
664
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PublicDelegatedPrefix>]
|
503
665
|
#
|
504
666
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
667
|
+
#
|
668
|
+
# @example Basic example
|
669
|
+
# require "google/cloud/compute/v1"
|
670
|
+
#
|
671
|
+
# # Create a client object. The client can be reused for multiple calls.
|
672
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
673
|
+
#
|
674
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
675
|
+
# request = Google::Cloud::Compute::V1::ListPublicDelegatedPrefixesRequest.new
|
676
|
+
#
|
677
|
+
# # Call the list method.
|
678
|
+
# result = client.list request
|
679
|
+
#
|
680
|
+
# # The returned object is of type Google::Cloud::Compute::V1::PublicDelegatedPrefixList.
|
681
|
+
# p result
|
682
|
+
#
|
505
683
|
def list request, options = nil
|
506
684
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
507
685
|
|
@@ -573,6 +751,22 @@ module Google
|
|
573
751
|
# @return [::Gapic::GenericLRO::Operation]
|
574
752
|
#
|
575
753
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
754
|
+
#
|
755
|
+
# @example Basic example
|
756
|
+
# require "google/cloud/compute/v1"
|
757
|
+
#
|
758
|
+
# # Create a client object. The client can be reused for multiple calls.
|
759
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
760
|
+
#
|
761
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
762
|
+
# request = Google::Cloud::Compute::V1::PatchPublicDelegatedPrefixeRequest.new
|
763
|
+
#
|
764
|
+
# # Call the patch method.
|
765
|
+
# result = client.patch request
|
766
|
+
#
|
767
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
768
|
+
# p result
|
769
|
+
#
|
576
770
|
def patch request, options = nil
|
577
771
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
578
772
|
|
@@ -617,6 +811,99 @@ module Google
|
|
617
811
|
raise ::Google::Cloud::Error.from_error(e)
|
618
812
|
end
|
619
813
|
|
814
|
+
##
|
815
|
+
# Withdraws the specified PublicDelegatedPrefix in the given region.
|
816
|
+
#
|
817
|
+
# @overload withdraw(request, options = nil)
|
818
|
+
# Pass arguments to `withdraw` via a request object, either of type
|
819
|
+
# {::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest} or an equivalent Hash.
|
820
|
+
#
|
821
|
+
# @param request [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest, ::Hash]
|
822
|
+
# A request object representing the call parameters. Required. To specify no
|
823
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
824
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
825
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
826
|
+
#
|
827
|
+
# @overload withdraw(project: nil, public_delegated_prefix: nil, region: nil, request_id: nil)
|
828
|
+
# Pass arguments to `withdraw` via keyword arguments. Note that at
|
829
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
830
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
831
|
+
#
|
832
|
+
# @param project [::String]
|
833
|
+
# Project ID for this request.
|
834
|
+
# @param public_delegated_prefix [::String]
|
835
|
+
# The name of the public delegated prefix. It should comply with RFC1035.
|
836
|
+
# @param region [::String]
|
837
|
+
# The name of the region where the public delegated prefix is located. It should comply with RFC1035.
|
838
|
+
# @param request_id [::String]
|
839
|
+
# 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).
|
840
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
841
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
842
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
843
|
+
#
|
844
|
+
# @return [::Gapic::GenericLRO::Operation]
|
845
|
+
#
|
846
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
847
|
+
#
|
848
|
+
# @example Basic example
|
849
|
+
# require "google/cloud/compute/v1"
|
850
|
+
#
|
851
|
+
# # Create a client object. The client can be reused for multiple calls.
|
852
|
+
# client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
|
853
|
+
#
|
854
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
855
|
+
# request = Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest.new
|
856
|
+
#
|
857
|
+
# # Call the withdraw method.
|
858
|
+
# result = client.withdraw request
|
859
|
+
#
|
860
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
861
|
+
# p result
|
862
|
+
#
|
863
|
+
def withdraw request, options = nil
|
864
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
865
|
+
|
866
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest
|
867
|
+
|
868
|
+
# Converts hash and nil to an options object
|
869
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
870
|
+
|
871
|
+
# Customize the options with defaults
|
872
|
+
call_metadata = @config.rpcs.withdraw.metadata.to_h
|
873
|
+
|
874
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
875
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
876
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
877
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
878
|
+
transports_version_send: [:rest]
|
879
|
+
|
880
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
881
|
+
|
882
|
+
options.apply_defaults timeout: @config.rpcs.withdraw.timeout,
|
883
|
+
metadata: call_metadata,
|
884
|
+
retry_policy: @config.rpcs.withdraw.retry_policy
|
885
|
+
|
886
|
+
options.apply_defaults timeout: @config.timeout,
|
887
|
+
metadata: @config.metadata,
|
888
|
+
retry_policy: @config.retry_policy
|
889
|
+
|
890
|
+
@public_delegated_prefixes_stub.withdraw request, options do |result, response|
|
891
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
892
|
+
operation: result,
|
893
|
+
client: region_operations,
|
894
|
+
request_values: {
|
895
|
+
"project" => request.project,
|
896
|
+
"region" => request.region
|
897
|
+
},
|
898
|
+
options: options
|
899
|
+
)
|
900
|
+
yield result, response if block_given?
|
901
|
+
return result
|
902
|
+
end
|
903
|
+
rescue ::Gapic::Rest::Error => e
|
904
|
+
raise ::Google::Cloud::Error.from_error(e)
|
905
|
+
end
|
906
|
+
|
620
907
|
##
|
621
908
|
# Configuration class for the PublicDelegatedPrefixes REST API.
|
622
909
|
#
|
@@ -748,6 +1035,11 @@ module Google
|
|
748
1035
|
#
|
749
1036
|
attr_reader :aggregated_list
|
750
1037
|
##
|
1038
|
+
# RPC-specific configuration for `announce`
|
1039
|
+
# @return [::Gapic::Config::Method]
|
1040
|
+
#
|
1041
|
+
attr_reader :announce
|
1042
|
+
##
|
751
1043
|
# RPC-specific configuration for `delete`
|
752
1044
|
# @return [::Gapic::Config::Method]
|
753
1045
|
#
|
@@ -772,11 +1064,18 @@ module Google
|
|
772
1064
|
# @return [::Gapic::Config::Method]
|
773
1065
|
#
|
774
1066
|
attr_reader :patch
|
1067
|
+
##
|
1068
|
+
# RPC-specific configuration for `withdraw`
|
1069
|
+
# @return [::Gapic::Config::Method]
|
1070
|
+
#
|
1071
|
+
attr_reader :withdraw
|
775
1072
|
|
776
1073
|
# @private
|
777
1074
|
def initialize parent_rpcs = nil
|
778
1075
|
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
779
1076
|
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1077
|
+
announce_config = parent_rpcs.announce if parent_rpcs.respond_to? :announce
|
1078
|
+
@announce = ::Gapic::Config::Method.new announce_config
|
780
1079
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
781
1080
|
@delete = ::Gapic::Config::Method.new delete_config
|
782
1081
|
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
@@ -787,6 +1086,8 @@ module Google
|
|
787
1086
|
@list = ::Gapic::Config::Method.new list_config
|
788
1087
|
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
789
1088
|
@patch = ::Gapic::Config::Method.new patch_config
|
1089
|
+
withdraw_config = parent_rpcs.withdraw if parent_rpcs.respond_to? :withdraw
|
1090
|
+
@withdraw = ::Gapic::Config::Method.new withdraw_config
|
790
1091
|
|
791
1092
|
yield self if block_given?
|
792
1093
|
end
|
@@ -78,6 +78,44 @@ module Google
|
|
78
78
|
result
|
79
79
|
end
|
80
80
|
|
81
|
+
##
|
82
|
+
# Baseline implementation for the announce REST call
|
83
|
+
#
|
84
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest]
|
85
|
+
# A request object representing the call parameters. Required.
|
86
|
+
# @param options [::Gapic::CallOptions]
|
87
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
88
|
+
#
|
89
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
90
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
91
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
92
|
+
#
|
93
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
94
|
+
# A result object deserialized from the server's reply
|
95
|
+
def announce request_pb, options = nil
|
96
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
97
|
+
|
98
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_announce_request request_pb
|
99
|
+
query_string_params = if query_string_params.any?
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
|
+
else
|
102
|
+
{}
|
103
|
+
end
|
104
|
+
|
105
|
+
response = @client_stub.make_http_request(
|
106
|
+
verb,
|
107
|
+
uri: uri,
|
108
|
+
body: body || "",
|
109
|
+
params: query_string_params,
|
110
|
+
options: options
|
111
|
+
)
|
112
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
113
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
114
|
+
|
115
|
+
yield result, operation if block_given?
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
81
119
|
##
|
82
120
|
# Baseline implementation for the delete REST call
|
83
121
|
#
|
@@ -268,6 +306,44 @@ module Google
|
|
268
306
|
result
|
269
307
|
end
|
270
308
|
|
309
|
+
##
|
310
|
+
# Baseline implementation for the withdraw REST call
|
311
|
+
#
|
312
|
+
# @param request_pb [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest]
|
313
|
+
# A request object representing the call parameters. Required.
|
314
|
+
# @param options [::Gapic::CallOptions]
|
315
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
316
|
+
#
|
317
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
318
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
319
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
320
|
+
#
|
321
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
322
|
+
# A result object deserialized from the server's reply
|
323
|
+
def withdraw request_pb, options = nil
|
324
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
325
|
+
|
326
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_withdraw_request request_pb
|
327
|
+
query_string_params = if query_string_params.any?
|
328
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
329
|
+
else
|
330
|
+
{}
|
331
|
+
end
|
332
|
+
|
333
|
+
response = @client_stub.make_http_request(
|
334
|
+
verb,
|
335
|
+
uri: uri,
|
336
|
+
body: body || "",
|
337
|
+
params: query_string_params,
|
338
|
+
options: options
|
339
|
+
)
|
340
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
341
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
342
|
+
|
343
|
+
yield result, operation if block_given?
|
344
|
+
result
|
345
|
+
end
|
346
|
+
|
271
347
|
##
|
272
348
|
# @private
|
273
349
|
#
|
@@ -289,6 +365,29 @@ module Google
|
|
289
365
|
transcoder.transcode request_pb
|
290
366
|
end
|
291
367
|
|
368
|
+
##
|
369
|
+
# @private
|
370
|
+
#
|
371
|
+
# GRPC transcoding helper method for the announce REST call
|
372
|
+
#
|
373
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest]
|
374
|
+
# A request object representing the call parameters. Required.
|
375
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
376
|
+
# Uri, Body, Query string parameters
|
377
|
+
def self.transcode_announce_request request_pb
|
378
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
379
|
+
.with_bindings(
|
380
|
+
uri_method: :post,
|
381
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/announce",
|
382
|
+
matches: [
|
383
|
+
["project", %r{^[^/]+/?$}, false],
|
384
|
+
["region", %r{^[^/]+/?$}, false],
|
385
|
+
["public_delegated_prefix", %r{^[^/]+/?$}, false]
|
386
|
+
]
|
387
|
+
)
|
388
|
+
transcoder.transcode request_pb
|
389
|
+
end
|
390
|
+
|
292
391
|
##
|
293
392
|
# @private
|
294
393
|
#
|
@@ -403,6 +502,29 @@ module Google
|
|
403
502
|
)
|
404
503
|
transcoder.transcode request_pb
|
405
504
|
end
|
505
|
+
|
506
|
+
##
|
507
|
+
# @private
|
508
|
+
#
|
509
|
+
# GRPC transcoding helper method for the withdraw REST call
|
510
|
+
#
|
511
|
+
# @param request_pb [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest]
|
512
|
+
# A request object representing the call parameters. Required.
|
513
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
514
|
+
# Uri, Body, Query string parameters
|
515
|
+
def self.transcode_withdraw_request request_pb
|
516
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
517
|
+
.with_bindings(
|
518
|
+
uri_method: :post,
|
519
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/withdraw",
|
520
|
+
matches: [
|
521
|
+
["project", %r{^[^/]+/?$}, false],
|
522
|
+
["region", %r{^[^/]+/?$}, false],
|
523
|
+
["public_delegated_prefix", %r{^[^/]+/?$}, false]
|
524
|
+
]
|
525
|
+
)
|
526
|
+
transcoder.transcode request_pb
|
527
|
+
end
|
406
528
|
end
|
407
529
|
end
|
408
530
|
end
|