google-cloud-compute-v1 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +4 -1
- data/lib/google/cloud/compute/v1/compute_pb.rb +34 -1
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +3 -1
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +3 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +16 -4
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +16 -4
- data/lib/google/cloud/compute/v1/rollouts/rest/client.rb +349 -3
- data/lib/google/cloud/compute/v1/rollouts/rest/service_stub.rb +186 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +634 -0
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +317 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +1023 -75
- metadata +1 -1
|
@@ -515,7 +515,7 @@ module Google
|
|
|
515
515
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
516
516
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
517
517
|
#
|
|
518
|
-
# @overload get(forwarding_rule: nil, project: nil, region: nil)
|
|
518
|
+
# @overload get(forwarding_rule: nil, project: nil, region: nil, view: nil)
|
|
519
519
|
# Pass arguments to `get` via keyword arguments. Note that at
|
|
520
520
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
521
521
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -526,6 +526,8 @@ module Google
|
|
|
526
526
|
# Project ID for this request.
|
|
527
527
|
# @param region [::String]
|
|
528
528
|
# Name of the region scoping this request.
|
|
529
|
+
# @param view [::String]
|
|
530
|
+
# Check the View enum for the list of possible values.
|
|
529
531
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
530
532
|
# @yieldparam result [::Google::Cloud::Compute::V1::ForwardingRule]
|
|
531
533
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -326,7 +326,7 @@ module Google
|
|
|
326
326
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
327
327
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
328
328
|
#
|
|
329
|
-
# @overload get(forwarding_rule: nil, project: nil)
|
|
329
|
+
# @overload get(forwarding_rule: nil, project: nil, view: nil)
|
|
330
330
|
# Pass arguments to `get` via keyword arguments. Note that at
|
|
331
331
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
332
332
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -335,6 +335,8 @@ module Google
|
|
|
335
335
|
# Name of the ForwardingRule resource to return.
|
|
336
336
|
# @param project [::String]
|
|
337
337
|
# Project ID for this request.
|
|
338
|
+
# @param view [::String]
|
|
339
|
+
# Check the View enum for the list of possible values.
|
|
338
340
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
339
341
|
# @yieldparam result [::Google::Cloud::Compute::V1::ForwardingRule]
|
|
340
342
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -779,13 +779,16 @@ module Google
|
|
|
779
779
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
780
780
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
781
781
|
#
|
|
782
|
-
# @overload delete(instance_group_manager: nil, project: nil, request_id: nil, zone: nil)
|
|
782
|
+
# @overload delete(instance_group_manager: nil, no_graceful_shutdown: nil, project: nil, request_id: nil, zone: nil)
|
|
783
783
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
|
784
784
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
785
785
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
786
786
|
#
|
|
787
787
|
# @param instance_group_manager [::String]
|
|
788
788
|
# The name of the managed instance group to delete.
|
|
789
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
790
|
+
# When set, graceful shutdown is skipped for instance deletion even if it's
|
|
791
|
+
# configured for the instances.
|
|
789
792
|
# @param project [::String]
|
|
790
793
|
# Project ID for this request.
|
|
791
794
|
# @param request_id [::String]
|
|
@@ -900,7 +903,7 @@ module Google
|
|
|
900
903
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
901
904
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
902
905
|
#
|
|
903
|
-
# @overload delete_instances(instance_group_manager: nil, instance_group_managers_delete_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
|
|
906
|
+
# @overload delete_instances(instance_group_manager: nil, instance_group_managers_delete_instances_request_resource: nil, no_graceful_shutdown: nil, project: nil, request_id: nil, zone: nil)
|
|
904
907
|
# Pass arguments to `delete_instances` via keyword arguments. Note that at
|
|
905
908
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
906
909
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -909,6 +912,9 @@ module Google
|
|
|
909
912
|
# The name of the managed instance group.
|
|
910
913
|
# @param instance_group_managers_delete_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersDeleteInstancesRequest, ::Hash]
|
|
911
914
|
# The body resource for this request
|
|
915
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
916
|
+
# When set, graceful shutdown is skipped for instance deletion even if it's
|
|
917
|
+
# configured for the instances.
|
|
912
918
|
# @param project [::String]
|
|
913
919
|
# Project ID for this request.
|
|
914
920
|
# @param request_id [::String]
|
|
@@ -2263,7 +2269,7 @@ module Google
|
|
|
2263
2269
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2264
2270
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
2265
2271
|
#
|
|
2266
|
-
# @overload recreate_instances(instance_group_manager: nil, instance_group_managers_recreate_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
|
|
2272
|
+
# @overload recreate_instances(instance_group_manager: nil, instance_group_managers_recreate_instances_request_resource: nil, no_graceful_shutdown: nil, project: nil, request_id: nil, zone: nil)
|
|
2267
2273
|
# Pass arguments to `recreate_instances` via keyword arguments. Note that at
|
|
2268
2274
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2269
2275
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -2272,6 +2278,9 @@ module Google
|
|
|
2272
2278
|
# The name of the managed instance group.
|
|
2273
2279
|
# @param instance_group_managers_recreate_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersRecreateInstancesRequest, ::Hash]
|
|
2274
2280
|
# The body resource for this request
|
|
2281
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
2282
|
+
# When set, graceful shutdown is skipped for instance recreation even if it's
|
|
2283
|
+
# configured for the instances.
|
|
2275
2284
|
# @param project [::String]
|
|
2276
2285
|
# Project ID for this request.
|
|
2277
2286
|
# @param request_id [::String]
|
|
@@ -3002,7 +3011,7 @@ module Google
|
|
|
3002
3011
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
3003
3012
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
3004
3013
|
#
|
|
3005
|
-
# @overload stop_instances(instance_group_manager: nil, instance_group_managers_stop_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
|
|
3014
|
+
# @overload stop_instances(instance_group_manager: nil, instance_group_managers_stop_instances_request_resource: nil, no_graceful_shutdown: nil, project: nil, request_id: nil, zone: nil)
|
|
3006
3015
|
# Pass arguments to `stop_instances` via keyword arguments. Note that at
|
|
3007
3016
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
3008
3017
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -3011,6 +3020,9 @@ module Google
|
|
|
3011
3020
|
# The name of the managed instance group.
|
|
3012
3021
|
# @param instance_group_managers_stop_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersStopInstancesRequest, ::Hash]
|
|
3013
3022
|
# The body resource for this request
|
|
3023
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
3024
|
+
# When set, graceful shutdown is skipped for instance stopping even if it's
|
|
3025
|
+
# configured for the instances.
|
|
3014
3026
|
# @param project [::String]
|
|
3015
3027
|
# Project ID for this request.
|
|
3016
3028
|
# @param request_id [::String]
|
|
@@ -862,8 +862,10 @@ module Google
|
|
|
862
862
|
end
|
|
863
863
|
|
|
864
864
|
##
|
|
865
|
-
# Retrieves a list of all usable backend services
|
|
866
|
-
# the
|
|
865
|
+
# Retrieves a list of all usable backend services for Application Load
|
|
866
|
+
# Balancers and Proxy Network Load Balancers in the specified project in the
|
|
867
|
+
# given region. Backend services for external and internal passthrough
|
|
868
|
+
# Network Load Balancers are not included in the response.
|
|
867
869
|
#
|
|
868
870
|
# @overload list_usable(request, options = nil)
|
|
869
871
|
# Pass arguments to `list_usable` via a request object, either of type
|
|
@@ -589,13 +589,16 @@ module Google
|
|
|
589
589
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
590
590
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
591
591
|
#
|
|
592
|
-
# @overload delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil)
|
|
592
|
+
# @overload delete(instance_group_manager: nil, no_graceful_shutdown: nil, project: nil, region: nil, request_id: nil)
|
|
593
593
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
|
594
594
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
595
595
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
596
596
|
#
|
|
597
597
|
# @param instance_group_manager [::String]
|
|
598
598
|
# Name of the managed instance group to delete.
|
|
599
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
600
|
+
# When set, graceful shutdown is skipped for instance deletion even if it's
|
|
601
|
+
# configured for the instances.
|
|
599
602
|
# @param project [::String]
|
|
600
603
|
# Project ID for this request.
|
|
601
604
|
# @param region [::String]
|
|
@@ -709,13 +712,16 @@ module Google
|
|
|
709
712
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
710
713
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
711
714
|
#
|
|
712
|
-
# @overload delete_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil)
|
|
715
|
+
# @overload delete_instances(instance_group_manager: nil, no_graceful_shutdown: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil)
|
|
713
716
|
# Pass arguments to `delete_instances` via keyword arguments. Note that at
|
|
714
717
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
715
718
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
716
719
|
#
|
|
717
720
|
# @param instance_group_manager [::String]
|
|
718
721
|
# Name of the managed instance group.
|
|
722
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
723
|
+
# When set, graceful shutdown is skipped for instance deletion even if it's
|
|
724
|
+
# configured for the instances.
|
|
719
725
|
# @param project [::String]
|
|
720
726
|
# Project ID for this request.
|
|
721
727
|
# @param region [::String]
|
|
@@ -2051,13 +2057,16 @@ module Google
|
|
|
2051
2057
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2052
2058
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
2053
2059
|
#
|
|
2054
|
-
# @overload recreate_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil)
|
|
2060
|
+
# @overload recreate_instances(instance_group_manager: nil, no_graceful_shutdown: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil)
|
|
2055
2061
|
# Pass arguments to `recreate_instances` via keyword arguments. Note that at
|
|
2056
2062
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2057
2063
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2058
2064
|
#
|
|
2059
2065
|
# @param instance_group_manager [::String]
|
|
2060
2066
|
# Name of the managed instance group.
|
|
2067
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
2068
|
+
# When set, graceful shutdown is skipped for instance recreation even if it's
|
|
2069
|
+
# configured for the instances.
|
|
2061
2070
|
# @param project [::String]
|
|
2062
2071
|
# Project ID for this request.
|
|
2063
2072
|
# @param region [::String]
|
|
@@ -2768,13 +2777,16 @@ module Google
|
|
|
2768
2777
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2769
2778
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
2770
2779
|
#
|
|
2771
|
-
# @overload stop_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_stop_instances_request_resource: nil, request_id: nil)
|
|
2780
|
+
# @overload stop_instances(instance_group_manager: nil, no_graceful_shutdown: nil, project: nil, region: nil, region_instance_group_managers_stop_instances_request_resource: nil, request_id: nil)
|
|
2772
2781
|
# Pass arguments to `stop_instances` via keyword arguments. Note that at
|
|
2773
2782
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2774
2783
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2775
2784
|
#
|
|
2776
2785
|
# @param instance_group_manager [::String]
|
|
2777
2786
|
# The name of the managed instance group.
|
|
2787
|
+
# @param no_graceful_shutdown [::Boolean]
|
|
2788
|
+
# When set, graceful shutdown is skipped for instance stopping even if it's
|
|
2789
|
+
# configured for the instances.
|
|
2778
2790
|
# @param project [::String]
|
|
2779
2791
|
# Project ID for this request.
|
|
2780
2792
|
# @param region [::String]
|
|
@@ -71,6 +71,8 @@ module Google
|
|
|
71
71
|
end
|
|
72
72
|
default_config = Client::Configuration.new parent_config
|
|
73
73
|
|
|
74
|
+
default_config.rpcs.advance.timeout = 600.0
|
|
75
|
+
|
|
74
76
|
default_config.rpcs.cancel.timeout = 600.0
|
|
75
77
|
|
|
76
78
|
default_config.rpcs.delete.timeout = 600.0
|
|
@@ -85,6 +87,10 @@ module Google
|
|
|
85
87
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
default_config.rpcs.pause.timeout = 600.0
|
|
91
|
+
|
|
92
|
+
default_config.rpcs.resume.timeout = 600.0
|
|
93
|
+
|
|
88
94
|
default_config
|
|
89
95
|
end
|
|
90
96
|
yield @configure if block_given?
|
|
@@ -203,6 +209,111 @@ module Google
|
|
|
203
209
|
|
|
204
210
|
# Service calls
|
|
205
211
|
|
|
212
|
+
##
|
|
213
|
+
# Advances a Rollout to the next wave, or completes it if no waves remain.
|
|
214
|
+
#
|
|
215
|
+
# @overload advance(request, options = nil)
|
|
216
|
+
# Pass arguments to `advance` via a request object, either of type
|
|
217
|
+
# {::Google::Cloud::Compute::V1::AdvanceRolloutRequest} or an equivalent Hash.
|
|
218
|
+
#
|
|
219
|
+
# @param request [::Google::Cloud::Compute::V1::AdvanceRolloutRequest, ::Hash]
|
|
220
|
+
# A request object representing the call parameters. Required. To specify no
|
|
221
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
222
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
223
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
224
|
+
#
|
|
225
|
+
# @overload advance(current_wave_number: nil, project: nil, request_id: nil, rollout: nil)
|
|
226
|
+
# Pass arguments to `advance` via keyword arguments. Note that at
|
|
227
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
228
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
229
|
+
#
|
|
230
|
+
# @param current_wave_number [::Integer]
|
|
231
|
+
# Required. Wave number of the current wave.
|
|
232
|
+
# @param project [::String]
|
|
233
|
+
# Required. Project ID for this request.
|
|
234
|
+
# @param request_id [::String]
|
|
235
|
+
# An optional request ID to identify requests. Specify a unique request ID so
|
|
236
|
+
# that if you must retry your request, the server will know to ignore the
|
|
237
|
+
# request if it has already been completed.
|
|
238
|
+
#
|
|
239
|
+
# For example, consider a situation where you make an initial request and
|
|
240
|
+
# the request times out. If you make the request again with the same
|
|
241
|
+
# request ID, the server can check if original operation with the same
|
|
242
|
+
# request ID was received, and if so, will ignore the second request. This
|
|
243
|
+
# prevents clients from accidentally creating duplicate commitments.
|
|
244
|
+
#
|
|
245
|
+
# The request ID must be
|
|
246
|
+
# a valid UUID with the exception that zero UUID is not supported
|
|
247
|
+
# (00000000-0000-0000-0000-000000000000).
|
|
248
|
+
# @param rollout [::String]
|
|
249
|
+
# Required. Name of the Rollout resource to advance.
|
|
250
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
251
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
|
252
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
253
|
+
#
|
|
254
|
+
# @return [::Gapic::GenericLRO::Operation]
|
|
255
|
+
#
|
|
256
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
257
|
+
#
|
|
258
|
+
# @example Basic example
|
|
259
|
+
# require "google/cloud/compute/v1"
|
|
260
|
+
#
|
|
261
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
262
|
+
# client = Google::Cloud::Compute::V1::Rollouts::Rest::Client.new
|
|
263
|
+
#
|
|
264
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
265
|
+
# request = Google::Cloud::Compute::V1::AdvanceRolloutRequest.new
|
|
266
|
+
#
|
|
267
|
+
# # Call the advance method.
|
|
268
|
+
# result = client.advance request
|
|
269
|
+
#
|
|
270
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
|
271
|
+
# p result
|
|
272
|
+
#
|
|
273
|
+
def advance request, options = nil
|
|
274
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
275
|
+
|
|
276
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AdvanceRolloutRequest
|
|
277
|
+
|
|
278
|
+
# Converts hash and nil to an options object
|
|
279
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
280
|
+
|
|
281
|
+
# Customize the options with defaults
|
|
282
|
+
call_metadata = @config.rpcs.advance.metadata.to_h
|
|
283
|
+
|
|
284
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
285
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
286
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
287
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
|
288
|
+
transports_version_send: [:rest]
|
|
289
|
+
|
|
290
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
291
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
292
|
+
|
|
293
|
+
options.apply_defaults timeout: @config.rpcs.advance.timeout,
|
|
294
|
+
metadata: call_metadata,
|
|
295
|
+
retry_policy: @config.rpcs.advance.retry_policy
|
|
296
|
+
|
|
297
|
+
options.apply_defaults timeout: @config.timeout,
|
|
298
|
+
metadata: @config.metadata,
|
|
299
|
+
retry_policy: @config.retry_policy
|
|
300
|
+
|
|
301
|
+
@rollouts_stub.advance request, options do |result, response|
|
|
302
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
|
303
|
+
operation: result,
|
|
304
|
+
client: global_operations,
|
|
305
|
+
request_values: {
|
|
306
|
+
"project" => request.project
|
|
307
|
+
},
|
|
308
|
+
options: options
|
|
309
|
+
)
|
|
310
|
+
yield result, response if block_given?
|
|
311
|
+
throw :response, result
|
|
312
|
+
end
|
|
313
|
+
rescue ::Gapic::Rest::Error => e
|
|
314
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
315
|
+
end
|
|
316
|
+
|
|
206
317
|
##
|
|
207
318
|
# Cancels a Rollout.
|
|
208
319
|
#
|
|
@@ -662,6 +773,220 @@ module Google
|
|
|
662
773
|
raise ::Google::Cloud::Error.from_error(e)
|
|
663
774
|
end
|
|
664
775
|
|
|
776
|
+
##
|
|
777
|
+
# Pauses a Rollout.
|
|
778
|
+
#
|
|
779
|
+
# @overload pause(request, options = nil)
|
|
780
|
+
# Pass arguments to `pause` via a request object, either of type
|
|
781
|
+
# {::Google::Cloud::Compute::V1::PauseRolloutRequest} or an equivalent Hash.
|
|
782
|
+
#
|
|
783
|
+
# @param request [::Google::Cloud::Compute::V1::PauseRolloutRequest, ::Hash]
|
|
784
|
+
# A request object representing the call parameters. Required. To specify no
|
|
785
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
786
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
787
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
788
|
+
#
|
|
789
|
+
# @overload pause(etag: nil, project: nil, request_id: nil, rollout: nil)
|
|
790
|
+
# Pass arguments to `pause` via keyword arguments. Note that at
|
|
791
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
792
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
793
|
+
#
|
|
794
|
+
# @param etag [::String]
|
|
795
|
+
# The etag of the Rollout.
|
|
796
|
+
# If this is provided, the request will only succeed if the etag matches
|
|
797
|
+
# the current etag of the Rollout.
|
|
798
|
+
# @param project [::String]
|
|
799
|
+
# Required. Project ID for this request.
|
|
800
|
+
# @param request_id [::String]
|
|
801
|
+
# An optional request ID to identify requests. Specify a unique request ID so
|
|
802
|
+
# that if you must retry your request, the server will know to ignore the
|
|
803
|
+
# request if it has already been completed.
|
|
804
|
+
#
|
|
805
|
+
# For example, consider a situation where you make an initial request and
|
|
806
|
+
# the request times out. If you make the request again with the same
|
|
807
|
+
# request ID, the server can check if original operation with the same
|
|
808
|
+
# request ID was received, and if so, will ignore the second request. This
|
|
809
|
+
# prevents clients from accidentally creating duplicate commitments.
|
|
810
|
+
#
|
|
811
|
+
# The request ID must be
|
|
812
|
+
# a valid UUID with the exception that zero UUID is not supported
|
|
813
|
+
# (00000000-0000-0000-0000-000000000000).
|
|
814
|
+
# @param rollout [::String]
|
|
815
|
+
# Required. Name of the Rollout resource to pause.
|
|
816
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
817
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
|
818
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
819
|
+
#
|
|
820
|
+
# @return [::Gapic::GenericLRO::Operation]
|
|
821
|
+
#
|
|
822
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
823
|
+
#
|
|
824
|
+
# @example Basic example
|
|
825
|
+
# require "google/cloud/compute/v1"
|
|
826
|
+
#
|
|
827
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
828
|
+
# client = Google::Cloud::Compute::V1::Rollouts::Rest::Client.new
|
|
829
|
+
#
|
|
830
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
831
|
+
# request = Google::Cloud::Compute::V1::PauseRolloutRequest.new
|
|
832
|
+
#
|
|
833
|
+
# # Call the pause method.
|
|
834
|
+
# result = client.pause request
|
|
835
|
+
#
|
|
836
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
|
837
|
+
# p result
|
|
838
|
+
#
|
|
839
|
+
def pause request, options = nil
|
|
840
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
841
|
+
|
|
842
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PauseRolloutRequest
|
|
843
|
+
|
|
844
|
+
# Converts hash and nil to an options object
|
|
845
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
846
|
+
|
|
847
|
+
# Customize the options with defaults
|
|
848
|
+
call_metadata = @config.rpcs.pause.metadata.to_h
|
|
849
|
+
|
|
850
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
851
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
852
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
853
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
|
854
|
+
transports_version_send: [:rest]
|
|
855
|
+
|
|
856
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
857
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
858
|
+
|
|
859
|
+
options.apply_defaults timeout: @config.rpcs.pause.timeout,
|
|
860
|
+
metadata: call_metadata,
|
|
861
|
+
retry_policy: @config.rpcs.pause.retry_policy
|
|
862
|
+
|
|
863
|
+
options.apply_defaults timeout: @config.timeout,
|
|
864
|
+
metadata: @config.metadata,
|
|
865
|
+
retry_policy: @config.retry_policy
|
|
866
|
+
|
|
867
|
+
@rollouts_stub.pause request, options do |result, response|
|
|
868
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
|
869
|
+
operation: result,
|
|
870
|
+
client: global_operations,
|
|
871
|
+
request_values: {
|
|
872
|
+
"project" => request.project
|
|
873
|
+
},
|
|
874
|
+
options: options
|
|
875
|
+
)
|
|
876
|
+
yield result, response if block_given?
|
|
877
|
+
throw :response, result
|
|
878
|
+
end
|
|
879
|
+
rescue ::Gapic::Rest::Error => e
|
|
880
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
881
|
+
end
|
|
882
|
+
|
|
883
|
+
##
|
|
884
|
+
# Resumes a Rollout.
|
|
885
|
+
#
|
|
886
|
+
# @overload resume(request, options = nil)
|
|
887
|
+
# Pass arguments to `resume` via a request object, either of type
|
|
888
|
+
# {::Google::Cloud::Compute::V1::ResumeRolloutRequest} or an equivalent Hash.
|
|
889
|
+
#
|
|
890
|
+
# @param request [::Google::Cloud::Compute::V1::ResumeRolloutRequest, ::Hash]
|
|
891
|
+
# A request object representing the call parameters. Required. To specify no
|
|
892
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
893
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
894
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
895
|
+
#
|
|
896
|
+
# @overload resume(etag: nil, project: nil, request_id: nil, rollout: nil)
|
|
897
|
+
# Pass arguments to `resume` via keyword arguments. Note that at
|
|
898
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
899
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
900
|
+
#
|
|
901
|
+
# @param etag [::String]
|
|
902
|
+
# The etag of the Rollout.
|
|
903
|
+
# If this is provided, the request will only succeed if the etag matches
|
|
904
|
+
# the current etag of the Rollout.
|
|
905
|
+
# @param project [::String]
|
|
906
|
+
# Required. Project ID for this request.
|
|
907
|
+
# @param request_id [::String]
|
|
908
|
+
# An optional request ID to identify requests. Specify a unique request ID so
|
|
909
|
+
# that if you must retry your request, the server will know to ignore the
|
|
910
|
+
# request if it has already been completed.
|
|
911
|
+
#
|
|
912
|
+
# For example, consider a situation where you make an initial request and
|
|
913
|
+
# the request times out. If you make the request again with the same
|
|
914
|
+
# request ID, the server can check if original operation with the same
|
|
915
|
+
# request ID was received, and if so, will ignore the second request. This
|
|
916
|
+
# prevents clients from accidentally creating duplicate commitments.
|
|
917
|
+
#
|
|
918
|
+
# The request ID must be
|
|
919
|
+
# a valid UUID with the exception that zero UUID is not supported
|
|
920
|
+
# (00000000-0000-0000-0000-000000000000).
|
|
921
|
+
# @param rollout [::String]
|
|
922
|
+
# Required. Name of the Rollout resource to resume.
|
|
923
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
924
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
|
925
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
926
|
+
#
|
|
927
|
+
# @return [::Gapic::GenericLRO::Operation]
|
|
928
|
+
#
|
|
929
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
930
|
+
#
|
|
931
|
+
# @example Basic example
|
|
932
|
+
# require "google/cloud/compute/v1"
|
|
933
|
+
#
|
|
934
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
935
|
+
# client = Google::Cloud::Compute::V1::Rollouts::Rest::Client.new
|
|
936
|
+
#
|
|
937
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
938
|
+
# request = Google::Cloud::Compute::V1::ResumeRolloutRequest.new
|
|
939
|
+
#
|
|
940
|
+
# # Call the resume method.
|
|
941
|
+
# result = client.resume request
|
|
942
|
+
#
|
|
943
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
|
944
|
+
# p result
|
|
945
|
+
#
|
|
946
|
+
def resume request, options = nil
|
|
947
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
948
|
+
|
|
949
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ResumeRolloutRequest
|
|
950
|
+
|
|
951
|
+
# Converts hash and nil to an options object
|
|
952
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
953
|
+
|
|
954
|
+
# Customize the options with defaults
|
|
955
|
+
call_metadata = @config.rpcs.resume.metadata.to_h
|
|
956
|
+
|
|
957
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
958
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
959
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
960
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
|
961
|
+
transports_version_send: [:rest]
|
|
962
|
+
|
|
963
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
964
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
965
|
+
|
|
966
|
+
options.apply_defaults timeout: @config.rpcs.resume.timeout,
|
|
967
|
+
metadata: call_metadata,
|
|
968
|
+
retry_policy: @config.rpcs.resume.retry_policy
|
|
969
|
+
|
|
970
|
+
options.apply_defaults timeout: @config.timeout,
|
|
971
|
+
metadata: @config.metadata,
|
|
972
|
+
retry_policy: @config.retry_policy
|
|
973
|
+
|
|
974
|
+
@rollouts_stub.resume request, options do |result, response|
|
|
975
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
|
976
|
+
operation: result,
|
|
977
|
+
client: global_operations,
|
|
978
|
+
request_values: {
|
|
979
|
+
"project" => request.project
|
|
980
|
+
},
|
|
981
|
+
options: options
|
|
982
|
+
)
|
|
983
|
+
yield result, response if block_given?
|
|
984
|
+
throw :response, result
|
|
985
|
+
end
|
|
986
|
+
rescue ::Gapic::Rest::Error => e
|
|
987
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
988
|
+
end
|
|
989
|
+
|
|
665
990
|
##
|
|
666
991
|
# Configuration class for the Rollouts REST API.
|
|
667
992
|
#
|
|
@@ -678,17 +1003,17 @@ module Google
|
|
|
678
1003
|
# @example
|
|
679
1004
|
#
|
|
680
1005
|
# # Modify the global config, setting the timeout for
|
|
681
|
-
# #
|
|
1006
|
+
# # advance to 20 seconds,
|
|
682
1007
|
# # and all remaining timeouts to 10 seconds.
|
|
683
1008
|
# ::Google::Cloud::Compute::V1::Rollouts::Rest::Client.configure do |config|
|
|
684
1009
|
# config.timeout = 10.0
|
|
685
|
-
# config.rpcs.
|
|
1010
|
+
# config.rpcs.advance.timeout = 20.0
|
|
686
1011
|
# end
|
|
687
1012
|
#
|
|
688
1013
|
# # Apply the above configuration only to a new client.
|
|
689
1014
|
# client = ::Google::Cloud::Compute::V1::Rollouts::Rest::Client.new do |config|
|
|
690
1015
|
# config.timeout = 10.0
|
|
691
|
-
# config.rpcs.
|
|
1016
|
+
# config.rpcs.advance.timeout = 20.0
|
|
692
1017
|
# end
|
|
693
1018
|
#
|
|
694
1019
|
# @!attribute [rw] endpoint
|
|
@@ -810,6 +1135,11 @@ module Google
|
|
|
810
1135
|
# trigger a retry.
|
|
811
1136
|
#
|
|
812
1137
|
class Rpcs
|
|
1138
|
+
##
|
|
1139
|
+
# RPC-specific configuration for `advance`
|
|
1140
|
+
# @return [::Gapic::Config::Method]
|
|
1141
|
+
#
|
|
1142
|
+
attr_reader :advance
|
|
813
1143
|
##
|
|
814
1144
|
# RPC-specific configuration for `cancel`
|
|
815
1145
|
# @return [::Gapic::Config::Method]
|
|
@@ -830,9 +1160,21 @@ module Google
|
|
|
830
1160
|
# @return [::Gapic::Config::Method]
|
|
831
1161
|
#
|
|
832
1162
|
attr_reader :list
|
|
1163
|
+
##
|
|
1164
|
+
# RPC-specific configuration for `pause`
|
|
1165
|
+
# @return [::Gapic::Config::Method]
|
|
1166
|
+
#
|
|
1167
|
+
attr_reader :pause
|
|
1168
|
+
##
|
|
1169
|
+
# RPC-specific configuration for `resume`
|
|
1170
|
+
# @return [::Gapic::Config::Method]
|
|
1171
|
+
#
|
|
1172
|
+
attr_reader :resume
|
|
833
1173
|
|
|
834
1174
|
# @private
|
|
835
1175
|
def initialize parent_rpcs = nil
|
|
1176
|
+
advance_config = parent_rpcs.advance if parent_rpcs.respond_to? :advance
|
|
1177
|
+
@advance = ::Gapic::Config::Method.new advance_config
|
|
836
1178
|
cancel_config = parent_rpcs.cancel if parent_rpcs.respond_to? :cancel
|
|
837
1179
|
@cancel = ::Gapic::Config::Method.new cancel_config
|
|
838
1180
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
|
@@ -841,6 +1183,10 @@ module Google
|
|
|
841
1183
|
@get = ::Gapic::Config::Method.new get_config
|
|
842
1184
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
|
843
1185
|
@list = ::Gapic::Config::Method.new list_config
|
|
1186
|
+
pause_config = parent_rpcs.pause if parent_rpcs.respond_to? :pause
|
|
1187
|
+
@pause = ::Gapic::Config::Method.new pause_config
|
|
1188
|
+
resume_config = parent_rpcs.resume if parent_rpcs.respond_to? :resume
|
|
1189
|
+
@resume = ::Gapic::Config::Method.new resume_config
|
|
844
1190
|
|
|
845
1191
|
yield self if block_given?
|
|
846
1192
|
end
|