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
@@ -65,8 +65,12 @@ module Google
|
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
67
67
|
|
68
|
+
default_config.rpcs.attach_network_endpoints.timeout = 600.0
|
69
|
+
|
68
70
|
default_config.rpcs.delete.timeout = 600.0
|
69
71
|
|
72
|
+
default_config.rpcs.detach_network_endpoints.timeout = 600.0
|
73
|
+
|
70
74
|
default_config.rpcs.get.timeout = 600.0
|
71
75
|
default_config.rpcs.get.retry_policy = {
|
72
76
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -79,6 +83,8 @@ module Google
|
|
79
83
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
80
84
|
}
|
81
85
|
|
86
|
+
default_config.rpcs.list_network_endpoints.timeout = 600.0
|
87
|
+
|
82
88
|
default_config
|
83
89
|
end
|
84
90
|
yield @configure if block_given?
|
@@ -161,6 +167,101 @@ module Google
|
|
161
167
|
|
162
168
|
# Service calls
|
163
169
|
|
170
|
+
##
|
171
|
+
# Attach a list of network endpoints to the specified network endpoint group.
|
172
|
+
#
|
173
|
+
# @overload attach_network_endpoints(request, options = nil)
|
174
|
+
# Pass arguments to `attach_network_endpoints` via a request object, either of type
|
175
|
+
# {::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest} or an equivalent Hash.
|
176
|
+
#
|
177
|
+
# @param request [::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest, ::Hash]
|
178
|
+
# A request object representing the call parameters. Required. To specify no
|
179
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
180
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
181
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
182
|
+
#
|
183
|
+
# @overload attach_network_endpoints(network_endpoint_group: nil, project: nil, region: nil, region_network_endpoint_groups_attach_endpoints_request_resource: nil, request_id: nil)
|
184
|
+
# Pass arguments to `attach_network_endpoints` via keyword arguments. Note that at
|
185
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
186
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
187
|
+
#
|
188
|
+
# @param network_endpoint_group [::String]
|
189
|
+
# The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
|
190
|
+
# @param project [::String]
|
191
|
+
# Project ID for this request.
|
192
|
+
# @param region [::String]
|
193
|
+
# The name of the region where you want to create the network endpoint group. It should comply with RFC1035.
|
194
|
+
# @param region_network_endpoint_groups_attach_endpoints_request_resource [::Google::Cloud::Compute::V1::RegionNetworkEndpointGroupsAttachEndpointsRequest, ::Hash]
|
195
|
+
# The body resource for this request
|
196
|
+
# @param request_id [::String]
|
197
|
+
# 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).
|
198
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
199
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
200
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
201
|
+
#
|
202
|
+
# @return [::Gapic::GenericLRO::Operation]
|
203
|
+
#
|
204
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
205
|
+
#
|
206
|
+
# @example Basic example
|
207
|
+
# require "google/cloud/compute/v1"
|
208
|
+
#
|
209
|
+
# # Create a client object. The client can be reused for multiple calls.
|
210
|
+
# client = Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new
|
211
|
+
#
|
212
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
213
|
+
# request = Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest.new
|
214
|
+
#
|
215
|
+
# # Call the attach_network_endpoints method.
|
216
|
+
# result = client.attach_network_endpoints request
|
217
|
+
#
|
218
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
219
|
+
# p result
|
220
|
+
#
|
221
|
+
def attach_network_endpoints request, options = nil
|
222
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
223
|
+
|
224
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest
|
225
|
+
|
226
|
+
# Converts hash and nil to an options object
|
227
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
228
|
+
|
229
|
+
# Customize the options with defaults
|
230
|
+
call_metadata = @config.rpcs.attach_network_endpoints.metadata.to_h
|
231
|
+
|
232
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
233
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
234
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
235
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
236
|
+
transports_version_send: [:rest]
|
237
|
+
|
238
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
239
|
+
|
240
|
+
options.apply_defaults timeout: @config.rpcs.attach_network_endpoints.timeout,
|
241
|
+
metadata: call_metadata,
|
242
|
+
retry_policy: @config.rpcs.attach_network_endpoints.retry_policy
|
243
|
+
|
244
|
+
options.apply_defaults timeout: @config.timeout,
|
245
|
+
metadata: @config.metadata,
|
246
|
+
retry_policy: @config.retry_policy
|
247
|
+
|
248
|
+
@region_network_endpoint_groups_stub.attach_network_endpoints request, options do |result, response|
|
249
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
250
|
+
operation: result,
|
251
|
+
client: region_operations,
|
252
|
+
request_values: {
|
253
|
+
"project" => request.project,
|
254
|
+
"region" => request.region
|
255
|
+
},
|
256
|
+
options: options
|
257
|
+
)
|
258
|
+
yield result, response if block_given?
|
259
|
+
return result
|
260
|
+
end
|
261
|
+
rescue ::Gapic::Rest::Error => e
|
262
|
+
raise ::Google::Cloud::Error.from_error(e)
|
263
|
+
end
|
264
|
+
|
164
265
|
##
|
165
266
|
# Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
|
166
267
|
#
|
@@ -194,6 +295,22 @@ module Google
|
|
194
295
|
# @return [::Gapic::GenericLRO::Operation]
|
195
296
|
#
|
196
297
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
298
|
+
#
|
299
|
+
# @example Basic example
|
300
|
+
# require "google/cloud/compute/v1"
|
301
|
+
#
|
302
|
+
# # Create a client object. The client can be reused for multiple calls.
|
303
|
+
# client = Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new
|
304
|
+
#
|
305
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
306
|
+
# request = Google::Cloud::Compute::V1::DeleteRegionNetworkEndpointGroupRequest.new
|
307
|
+
#
|
308
|
+
# # Call the delete method.
|
309
|
+
# result = client.delete request
|
310
|
+
#
|
311
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
312
|
+
# p result
|
313
|
+
#
|
197
314
|
def delete request, options = nil
|
198
315
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
199
316
|
|
@@ -238,6 +355,101 @@ module Google
|
|
238
355
|
raise ::Google::Cloud::Error.from_error(e)
|
239
356
|
end
|
240
357
|
|
358
|
+
##
|
359
|
+
# Detach the network endpoint from the specified network endpoint group.
|
360
|
+
#
|
361
|
+
# @overload detach_network_endpoints(request, options = nil)
|
362
|
+
# Pass arguments to `detach_network_endpoints` via a request object, either of type
|
363
|
+
# {::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest} or an equivalent Hash.
|
364
|
+
#
|
365
|
+
# @param request [::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest, ::Hash]
|
366
|
+
# A request object representing the call parameters. Required. To specify no
|
367
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
368
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
369
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
370
|
+
#
|
371
|
+
# @overload detach_network_endpoints(network_endpoint_group: nil, project: nil, region: nil, region_network_endpoint_groups_detach_endpoints_request_resource: nil, request_id: nil)
|
372
|
+
# Pass arguments to `detach_network_endpoints` via keyword arguments. Note that at
|
373
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
374
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
375
|
+
#
|
376
|
+
# @param network_endpoint_group [::String]
|
377
|
+
# The name of the network endpoint group you are detaching network endpoints from. It should comply with RFC1035.
|
378
|
+
# @param project [::String]
|
379
|
+
# Project ID for this request.
|
380
|
+
# @param region [::String]
|
381
|
+
# The name of the region where the network endpoint group is located. It should comply with RFC1035.
|
382
|
+
# @param region_network_endpoint_groups_detach_endpoints_request_resource [::Google::Cloud::Compute::V1::RegionNetworkEndpointGroupsDetachEndpointsRequest, ::Hash]
|
383
|
+
# The body resource for this request
|
384
|
+
# @param request_id [::String]
|
385
|
+
# 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). end_interface: MixerMutationRequestBuilder
|
386
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
387
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
388
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
389
|
+
#
|
390
|
+
# @return [::Gapic::GenericLRO::Operation]
|
391
|
+
#
|
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::RegionNetworkEndpointGroups::Rest::Client.new
|
399
|
+
#
|
400
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
401
|
+
# request = Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest.new
|
402
|
+
#
|
403
|
+
# # Call the detach_network_endpoints method.
|
404
|
+
# result = client.detach_network_endpoints request
|
405
|
+
#
|
406
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
407
|
+
# p result
|
408
|
+
#
|
409
|
+
def detach_network_endpoints request, options = nil
|
410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
411
|
+
|
412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest
|
413
|
+
|
414
|
+
# Converts hash and nil to an options object
|
415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
416
|
+
|
417
|
+
# Customize the options with defaults
|
418
|
+
call_metadata = @config.rpcs.detach_network_endpoints.metadata.to_h
|
419
|
+
|
420
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
421
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
423
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
424
|
+
transports_version_send: [:rest]
|
425
|
+
|
426
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
427
|
+
|
428
|
+
options.apply_defaults timeout: @config.rpcs.detach_network_endpoints.timeout,
|
429
|
+
metadata: call_metadata,
|
430
|
+
retry_policy: @config.rpcs.detach_network_endpoints.retry_policy
|
431
|
+
|
432
|
+
options.apply_defaults timeout: @config.timeout,
|
433
|
+
metadata: @config.metadata,
|
434
|
+
retry_policy: @config.retry_policy
|
435
|
+
|
436
|
+
@region_network_endpoint_groups_stub.detach_network_endpoints request, options do |result, response|
|
437
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
438
|
+
operation: result,
|
439
|
+
client: region_operations,
|
440
|
+
request_values: {
|
441
|
+
"project" => request.project,
|
442
|
+
"region" => request.region
|
443
|
+
},
|
444
|
+
options: options
|
445
|
+
)
|
446
|
+
yield result, response if block_given?
|
447
|
+
return result
|
448
|
+
end
|
449
|
+
rescue ::Gapic::Rest::Error => e
|
450
|
+
raise ::Google::Cloud::Error.from_error(e)
|
451
|
+
end
|
452
|
+
|
241
453
|
##
|
242
454
|
# Returns the specified network endpoint group.
|
243
455
|
#
|
@@ -269,6 +481,22 @@ module Google
|
|
269
481
|
# @return [::Google::Cloud::Compute::V1::NetworkEndpointGroup]
|
270
482
|
#
|
271
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::RegionNetworkEndpointGroups::Rest::Client.new
|
490
|
+
#
|
491
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
492
|
+
# request = Google::Cloud::Compute::V1::GetRegionNetworkEndpointGroupRequest.new
|
493
|
+
#
|
494
|
+
# # Call the get method.
|
495
|
+
# result = client.get request
|
496
|
+
#
|
497
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NetworkEndpointGroup.
|
498
|
+
# p result
|
499
|
+
#
|
272
500
|
def get request, options = nil
|
273
501
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
274
502
|
|
@@ -337,6 +565,22 @@ module Google
|
|
337
565
|
# @return [::Gapic::GenericLRO::Operation]
|
338
566
|
#
|
339
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::RegionNetworkEndpointGroups::Rest::Client.new
|
574
|
+
#
|
575
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
576
|
+
# request = Google::Cloud::Compute::V1::InsertRegionNetworkEndpointGroupRequest.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
|
+
#
|
340
584
|
def insert request, options = nil
|
341
585
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
342
586
|
|
@@ -400,7 +644,7 @@ module Google
|
|
400
644
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
401
645
|
#
|
402
646
|
# @param filter [::String]
|
403
|
-
# 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.
|
404
648
|
# @param max_results [::Integer]
|
405
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`)
|
406
650
|
# @param order_by [::String]
|
@@ -420,6 +664,22 @@ module Google
|
|
420
664
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkEndpointGroup>]
|
421
665
|
#
|
422
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::RegionNetworkEndpointGroups::Rest::Client.new
|
673
|
+
#
|
674
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
675
|
+
# request = Google::Cloud::Compute::V1::ListRegionNetworkEndpointGroupsRequest.new
|
676
|
+
#
|
677
|
+
# # Call the list method.
|
678
|
+
# result = client.list request
|
679
|
+
#
|
680
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NetworkEndpointGroupList.
|
681
|
+
# p result
|
682
|
+
#
|
423
683
|
def list request, options = nil
|
424
684
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
425
685
|
|
@@ -456,6 +716,99 @@ module Google
|
|
456
716
|
raise ::Google::Cloud::Error.from_error(e)
|
457
717
|
end
|
458
718
|
|
719
|
+
##
|
720
|
+
# Lists the network endpoints in the specified network endpoint group.
|
721
|
+
#
|
722
|
+
# @overload list_network_endpoints(request, options = nil)
|
723
|
+
# Pass arguments to `list_network_endpoints` via a request object, either of type
|
724
|
+
# {::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest} or an equivalent Hash.
|
725
|
+
#
|
726
|
+
# @param request [::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest, ::Hash]
|
727
|
+
# A request object representing the call parameters. Required. To specify no
|
728
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
729
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
730
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
731
|
+
#
|
732
|
+
# @overload list_network_endpoints(filter: nil, max_results: nil, network_endpoint_group: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
|
733
|
+
# Pass arguments to `list_network_endpoints` via keyword arguments. Note that at
|
734
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
735
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
736
|
+
#
|
737
|
+
# @param filter [::String]
|
738
|
+
# 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.
|
739
|
+
# @param max_results [::Integer]
|
740
|
+
# 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`)
|
741
|
+
# @param network_endpoint_group [::String]
|
742
|
+
# The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
|
743
|
+
# @param order_by [::String]
|
744
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
745
|
+
# @param page_token [::String]
|
746
|
+
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
747
|
+
# @param project [::String]
|
748
|
+
# Project ID for this request.
|
749
|
+
# @param region [::String]
|
750
|
+
# The name of the region where the network endpoint group is located. It should comply with RFC1035.
|
751
|
+
# @param return_partial_success [::Boolean]
|
752
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
753
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
754
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkEndpointWithHealthStatus>]
|
755
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
756
|
+
#
|
757
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkEndpointWithHealthStatus>]
|
758
|
+
#
|
759
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
760
|
+
#
|
761
|
+
# @example Basic example
|
762
|
+
# require "google/cloud/compute/v1"
|
763
|
+
#
|
764
|
+
# # Create a client object. The client can be reused for multiple calls.
|
765
|
+
# client = Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new
|
766
|
+
#
|
767
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
768
|
+
# request = Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest.new
|
769
|
+
#
|
770
|
+
# # Call the list_network_endpoints method.
|
771
|
+
# result = client.list_network_endpoints request
|
772
|
+
#
|
773
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints.
|
774
|
+
# p result
|
775
|
+
#
|
776
|
+
def list_network_endpoints request, options = nil
|
777
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
778
|
+
|
779
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest
|
780
|
+
|
781
|
+
# Converts hash and nil to an options object
|
782
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
783
|
+
|
784
|
+
# Customize the options with defaults
|
785
|
+
call_metadata = @config.rpcs.list_network_endpoints.metadata.to_h
|
786
|
+
|
787
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
788
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
789
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
790
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
791
|
+
transports_version_send: [:rest]
|
792
|
+
|
793
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
794
|
+
|
795
|
+
options.apply_defaults timeout: @config.rpcs.list_network_endpoints.timeout,
|
796
|
+
metadata: call_metadata,
|
797
|
+
retry_policy: @config.rpcs.list_network_endpoints.retry_policy
|
798
|
+
|
799
|
+
options.apply_defaults timeout: @config.timeout,
|
800
|
+
metadata: @config.metadata,
|
801
|
+
retry_policy: @config.retry_policy
|
802
|
+
|
803
|
+
@region_network_endpoint_groups_stub.list_network_endpoints request, options do |result, operation|
|
804
|
+
result = ::Gapic::Rest::PagedEnumerable.new @region_network_endpoint_groups_stub, :list_network_endpoints, "items", request, result, options
|
805
|
+
yield result, operation if block_given?
|
806
|
+
return result
|
807
|
+
end
|
808
|
+
rescue ::Gapic::Rest::Error => e
|
809
|
+
raise ::Google::Cloud::Error.from_error(e)
|
810
|
+
end
|
811
|
+
|
459
812
|
##
|
460
813
|
# Configuration class for the RegionNetworkEndpointGroups REST API.
|
461
814
|
#
|
@@ -472,17 +825,17 @@ module Google
|
|
472
825
|
# @example
|
473
826
|
#
|
474
827
|
# # Modify the global config, setting the timeout for
|
475
|
-
# #
|
828
|
+
# # attach_network_endpoints to 20 seconds,
|
476
829
|
# # and all remaining timeouts to 10 seconds.
|
477
830
|
# ::Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.configure do |config|
|
478
831
|
# config.timeout = 10.0
|
479
|
-
# config.rpcs.
|
832
|
+
# config.rpcs.attach_network_endpoints.timeout = 20.0
|
480
833
|
# end
|
481
834
|
#
|
482
835
|
# # Apply the above configuration only to a new client.
|
483
836
|
# client = ::Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new do |config|
|
484
837
|
# config.timeout = 10.0
|
485
|
-
# config.rpcs.
|
838
|
+
# config.rpcs.attach_network_endpoints.timeout = 20.0
|
486
839
|
# end
|
487
840
|
#
|
488
841
|
# @!attribute [rw] endpoint
|
@@ -581,12 +934,22 @@ module Google
|
|
581
934
|
# trigger a retry.
|
582
935
|
#
|
583
936
|
class Rpcs
|
937
|
+
##
|
938
|
+
# RPC-specific configuration for `attach_network_endpoints`
|
939
|
+
# @return [::Gapic::Config::Method]
|
940
|
+
#
|
941
|
+
attr_reader :attach_network_endpoints
|
584
942
|
##
|
585
943
|
# RPC-specific configuration for `delete`
|
586
944
|
# @return [::Gapic::Config::Method]
|
587
945
|
#
|
588
946
|
attr_reader :delete
|
589
947
|
##
|
948
|
+
# RPC-specific configuration for `detach_network_endpoints`
|
949
|
+
# @return [::Gapic::Config::Method]
|
950
|
+
#
|
951
|
+
attr_reader :detach_network_endpoints
|
952
|
+
##
|
590
953
|
# RPC-specific configuration for `get`
|
591
954
|
# @return [::Gapic::Config::Method]
|
592
955
|
#
|
@@ -601,17 +964,28 @@ module Google
|
|
601
964
|
# @return [::Gapic::Config::Method]
|
602
965
|
#
|
603
966
|
attr_reader :list
|
967
|
+
##
|
968
|
+
# RPC-specific configuration for `list_network_endpoints`
|
969
|
+
# @return [::Gapic::Config::Method]
|
970
|
+
#
|
971
|
+
attr_reader :list_network_endpoints
|
604
972
|
|
605
973
|
# @private
|
606
974
|
def initialize parent_rpcs = nil
|
975
|
+
attach_network_endpoints_config = parent_rpcs.attach_network_endpoints if parent_rpcs.respond_to? :attach_network_endpoints
|
976
|
+
@attach_network_endpoints = ::Gapic::Config::Method.new attach_network_endpoints_config
|
607
977
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
608
978
|
@delete = ::Gapic::Config::Method.new delete_config
|
979
|
+
detach_network_endpoints_config = parent_rpcs.detach_network_endpoints if parent_rpcs.respond_to? :detach_network_endpoints
|
980
|
+
@detach_network_endpoints = ::Gapic::Config::Method.new detach_network_endpoints_config
|
609
981
|
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
610
982
|
@get = ::Gapic::Config::Method.new get_config
|
611
983
|
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
612
984
|
@insert = ::Gapic::Config::Method.new insert_config
|
613
985
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
614
986
|
@list = ::Gapic::Config::Method.new list_config
|
987
|
+
list_network_endpoints_config = parent_rpcs.list_network_endpoints if parent_rpcs.respond_to? :list_network_endpoints
|
988
|
+
@list_network_endpoints = ::Gapic::Config::Method.new list_network_endpoints_config
|
615
989
|
|
616
990
|
yield self if block_given?
|
617
991
|
end
|