google-cloud-compute-v1 2.2.0 → 2.4.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/addresses/rest/client.rb +88 -0
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +47 -1
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +346 -0
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +245 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +85 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +3 -1
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/credentials.rb +53 -0
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +436 -0
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +167 -0
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/interconnect_remote_locations.rb +47 -0
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +346 -0
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +245 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +90 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +3 -1
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1098 -123
- metadata +7 -2
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/config"
|
20
|
+
require "gapic/config/method"
|
21
|
+
|
22
|
+
require "google/cloud/compute/v1/version"
|
23
|
+
|
24
|
+
require "google/cloud/compute/v1/interconnect_remote_locations/credentials"
|
25
|
+
require "google/cloud/compute/v1/interconnect_remote_locations/rest"
|
26
|
+
|
27
|
+
module Google
|
28
|
+
module Cloud
|
29
|
+
module Compute
|
30
|
+
module V1
|
31
|
+
##
|
32
|
+
# The InterconnectRemoteLocations API.
|
33
|
+
#
|
34
|
+
# @example Load this service and instantiate a REST client
|
35
|
+
#
|
36
|
+
# require "google/cloud/compute/v1/interconnect_remote_locations/rest"
|
37
|
+
# client = ::Google::Cloud::Compute::V1::InterconnectRemoteLocations::Rest::Client.new
|
38
|
+
#
|
39
|
+
module InterconnectRemoteLocations
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
helper_path = ::File.join __dir__, "interconnect_remote_locations", "helpers.rb"
|
47
|
+
require "google/cloud/compute/v1/interconnect_remote_locations/helpers" if ::File.file? helper_path
|
@@ -821,7 +821,7 @@ module Google
|
|
821
821
|
end
|
822
822
|
|
823
823
|
##
|
824
|
-
# Moves an instance and its attached persistent disks from one zone to another. *Note*: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the [known issue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
|
824
|
+
# Moves an instance and its attached persistent disks from one zone to another. *Note*: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the [known issue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior). [Deprecated] This method is deprecated. See [moving instance across zones](/compute/docs/instances/moving-instance-across-zones) instead.
|
825
825
|
#
|
826
826
|
# @overload move_instance(request, options = nil)
|
827
827
|
# Pass arguments to `move_instance` via a request object, either of type
|
@@ -67,6 +67,8 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.rpcs.add_resource_policies.timeout = 600.0
|
69
69
|
|
70
|
+
default_config.rpcs.bulk_insert.timeout = 600.0
|
71
|
+
|
70
72
|
default_config.rpcs.create_snapshot.timeout = 600.0
|
71
73
|
|
72
74
|
default_config.rpcs.delete.timeout = 600.0
|
@@ -96,6 +98,12 @@ module Google
|
|
96
98
|
|
97
99
|
default_config.rpcs.set_labels.timeout = 600.0
|
98
100
|
|
101
|
+
default_config.rpcs.start_async_replication.timeout = 600.0
|
102
|
+
|
103
|
+
default_config.rpcs.stop_async_replication.timeout = 600.0
|
104
|
+
|
105
|
+
default_config.rpcs.stop_group_async_replication.timeout = 600.0
|
106
|
+
|
99
107
|
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
100
108
|
|
101
109
|
default_config.rpcs.update.timeout = 600.0
|
@@ -261,6 +269,83 @@ module Google
|
|
261
269
|
raise ::Google::Cloud::Error.from_error(e)
|
262
270
|
end
|
263
271
|
|
272
|
+
##
|
273
|
+
# Bulk create a set of disks.
|
274
|
+
#
|
275
|
+
# @overload bulk_insert(request, options = nil)
|
276
|
+
# Pass arguments to `bulk_insert` via a request object, either of type
|
277
|
+
# {::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest} or an equivalent Hash.
|
278
|
+
#
|
279
|
+
# @param request [::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest, ::Hash]
|
280
|
+
# A request object representing the call parameters. Required. To specify no
|
281
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
282
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
283
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
284
|
+
#
|
285
|
+
# @overload bulk_insert(bulk_insert_disk_resource_resource: nil, project: nil, region: nil, request_id: nil)
|
286
|
+
# Pass arguments to `bulk_insert` via keyword arguments. Note that at
|
287
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
288
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
289
|
+
#
|
290
|
+
# @param bulk_insert_disk_resource_resource [::Google::Cloud::Compute::V1::BulkInsertDiskResource, ::Hash]
|
291
|
+
# The body resource for this request
|
292
|
+
# @param project [::String]
|
293
|
+
# Project ID for this request.
|
294
|
+
# @param region [::String]
|
295
|
+
# The name of the region for this request.
|
296
|
+
# @param request_id [::String]
|
297
|
+
# 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).
|
298
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
299
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
300
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
301
|
+
#
|
302
|
+
# @return [::Gapic::GenericLRO::Operation]
|
303
|
+
#
|
304
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
305
|
+
def bulk_insert request, options = nil
|
306
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
307
|
+
|
308
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest
|
309
|
+
|
310
|
+
# Converts hash and nil to an options object
|
311
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
312
|
+
|
313
|
+
# Customize the options with defaults
|
314
|
+
call_metadata = @config.rpcs.bulk_insert.metadata.to_h
|
315
|
+
|
316
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
317
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
318
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
319
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
320
|
+
transports_version_send: [:rest]
|
321
|
+
|
322
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
323
|
+
|
324
|
+
options.apply_defaults timeout: @config.rpcs.bulk_insert.timeout,
|
325
|
+
metadata: call_metadata,
|
326
|
+
retry_policy: @config.rpcs.bulk_insert.retry_policy
|
327
|
+
|
328
|
+
options.apply_defaults timeout: @config.timeout,
|
329
|
+
metadata: @config.metadata,
|
330
|
+
retry_policy: @config.retry_policy
|
331
|
+
|
332
|
+
@region_disks_stub.bulk_insert request, options do |result, response|
|
333
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
334
|
+
operation: result,
|
335
|
+
client: region_operations,
|
336
|
+
request_values: {
|
337
|
+
"project" => request.project,
|
338
|
+
"region" => request.region
|
339
|
+
},
|
340
|
+
options: options
|
341
|
+
)
|
342
|
+
yield result, response if block_given?
|
343
|
+
return result
|
344
|
+
end
|
345
|
+
rescue ::Gapic::Rest::Error => e
|
346
|
+
raise ::Google::Cloud::Error.from_error(e)
|
347
|
+
end
|
348
|
+
|
264
349
|
##
|
265
350
|
# Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.
|
266
351
|
#
|
@@ -1010,6 +1095,239 @@ module Google
|
|
1010
1095
|
raise ::Google::Cloud::Error.from_error(e)
|
1011
1096
|
end
|
1012
1097
|
|
1098
|
+
##
|
1099
|
+
# Starts asynchronous replication. Must be invoked on the primary disk.
|
1100
|
+
#
|
1101
|
+
# @overload start_async_replication(request, options = nil)
|
1102
|
+
# Pass arguments to `start_async_replication` via a request object, either of type
|
1103
|
+
# {::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest} or an equivalent Hash.
|
1104
|
+
#
|
1105
|
+
# @param request [::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest, ::Hash]
|
1106
|
+
# A request object representing the call parameters. Required. To specify no
|
1107
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1108
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1109
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1110
|
+
#
|
1111
|
+
# @overload start_async_replication(disk: nil, project: nil, region: nil, region_disks_start_async_replication_request_resource: nil, request_id: nil)
|
1112
|
+
# Pass arguments to `start_async_replication` via keyword arguments. Note that at
|
1113
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1114
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1115
|
+
#
|
1116
|
+
# @param disk [::String]
|
1117
|
+
# The name of the persistent disk.
|
1118
|
+
# @param project [::String]
|
1119
|
+
# Project ID for this request.
|
1120
|
+
# @param region [::String]
|
1121
|
+
# The name of the region for this request.
|
1122
|
+
# @param region_disks_start_async_replication_request_resource [::Google::Cloud::Compute::V1::RegionDisksStartAsyncReplicationRequest, ::Hash]
|
1123
|
+
# The body resource for this request
|
1124
|
+
# @param request_id [::String]
|
1125
|
+
# 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).
|
1126
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1127
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1128
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1129
|
+
#
|
1130
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1131
|
+
#
|
1132
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1133
|
+
def start_async_replication request, options = nil
|
1134
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1135
|
+
|
1136
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest
|
1137
|
+
|
1138
|
+
# Converts hash and nil to an options object
|
1139
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1140
|
+
|
1141
|
+
# Customize the options with defaults
|
1142
|
+
call_metadata = @config.rpcs.start_async_replication.metadata.to_h
|
1143
|
+
|
1144
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1145
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1146
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1147
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1148
|
+
transports_version_send: [:rest]
|
1149
|
+
|
1150
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1151
|
+
|
1152
|
+
options.apply_defaults timeout: @config.rpcs.start_async_replication.timeout,
|
1153
|
+
metadata: call_metadata,
|
1154
|
+
retry_policy: @config.rpcs.start_async_replication.retry_policy
|
1155
|
+
|
1156
|
+
options.apply_defaults timeout: @config.timeout,
|
1157
|
+
metadata: @config.metadata,
|
1158
|
+
retry_policy: @config.retry_policy
|
1159
|
+
|
1160
|
+
@region_disks_stub.start_async_replication request, options do |result, response|
|
1161
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
1162
|
+
operation: result,
|
1163
|
+
client: region_operations,
|
1164
|
+
request_values: {
|
1165
|
+
"project" => request.project,
|
1166
|
+
"region" => request.region
|
1167
|
+
},
|
1168
|
+
options: options
|
1169
|
+
)
|
1170
|
+
yield result, response if block_given?
|
1171
|
+
return result
|
1172
|
+
end
|
1173
|
+
rescue ::Gapic::Rest::Error => e
|
1174
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
##
|
1178
|
+
# Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.
|
1179
|
+
#
|
1180
|
+
# @overload stop_async_replication(request, options = nil)
|
1181
|
+
# Pass arguments to `stop_async_replication` via a request object, either of type
|
1182
|
+
# {::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest} or an equivalent Hash.
|
1183
|
+
#
|
1184
|
+
# @param request [::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest, ::Hash]
|
1185
|
+
# A request object representing the call parameters. Required. To specify no
|
1186
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1187
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1188
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1189
|
+
#
|
1190
|
+
# @overload stop_async_replication(disk: nil, project: nil, region: nil, request_id: nil)
|
1191
|
+
# Pass arguments to `stop_async_replication` via keyword arguments. Note that at
|
1192
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1193
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1194
|
+
#
|
1195
|
+
# @param disk [::String]
|
1196
|
+
# The name of the persistent disk.
|
1197
|
+
# @param project [::String]
|
1198
|
+
# Project ID for this request.
|
1199
|
+
# @param region [::String]
|
1200
|
+
# The name of the region for this request.
|
1201
|
+
# @param request_id [::String]
|
1202
|
+
# 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).
|
1203
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1204
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1205
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1206
|
+
#
|
1207
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1208
|
+
#
|
1209
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1210
|
+
def stop_async_replication request, options = nil
|
1211
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1212
|
+
|
1213
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest
|
1214
|
+
|
1215
|
+
# Converts hash and nil to an options object
|
1216
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1217
|
+
|
1218
|
+
# Customize the options with defaults
|
1219
|
+
call_metadata = @config.rpcs.stop_async_replication.metadata.to_h
|
1220
|
+
|
1221
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1222
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1223
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1224
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1225
|
+
transports_version_send: [:rest]
|
1226
|
+
|
1227
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1228
|
+
|
1229
|
+
options.apply_defaults timeout: @config.rpcs.stop_async_replication.timeout,
|
1230
|
+
metadata: call_metadata,
|
1231
|
+
retry_policy: @config.rpcs.stop_async_replication.retry_policy
|
1232
|
+
|
1233
|
+
options.apply_defaults timeout: @config.timeout,
|
1234
|
+
metadata: @config.metadata,
|
1235
|
+
retry_policy: @config.retry_policy
|
1236
|
+
|
1237
|
+
@region_disks_stub.stop_async_replication request, options do |result, response|
|
1238
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
1239
|
+
operation: result,
|
1240
|
+
client: region_operations,
|
1241
|
+
request_values: {
|
1242
|
+
"project" => request.project,
|
1243
|
+
"region" => request.region
|
1244
|
+
},
|
1245
|
+
options: options
|
1246
|
+
)
|
1247
|
+
yield result, response if block_given?
|
1248
|
+
return result
|
1249
|
+
end
|
1250
|
+
rescue ::Gapic::Rest::Error => e
|
1251
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1252
|
+
end
|
1253
|
+
|
1254
|
+
##
|
1255
|
+
# Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.
|
1256
|
+
#
|
1257
|
+
# @overload stop_group_async_replication(request, options = nil)
|
1258
|
+
# Pass arguments to `stop_group_async_replication` via a request object, either of type
|
1259
|
+
# {::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest} or an equivalent Hash.
|
1260
|
+
#
|
1261
|
+
# @param request [::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest, ::Hash]
|
1262
|
+
# A request object representing the call parameters. Required. To specify no
|
1263
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1264
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1265
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1266
|
+
#
|
1267
|
+
# @overload stop_group_async_replication(disks_stop_group_async_replication_resource_resource: nil, project: nil, region: nil, request_id: nil)
|
1268
|
+
# Pass arguments to `stop_group_async_replication` via keyword arguments. Note that at
|
1269
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1270
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1271
|
+
#
|
1272
|
+
# @param disks_stop_group_async_replication_resource_resource [::Google::Cloud::Compute::V1::DisksStopGroupAsyncReplicationResource, ::Hash]
|
1273
|
+
# The body resource for this request
|
1274
|
+
# @param project [::String]
|
1275
|
+
# Project ID for this request.
|
1276
|
+
# @param region [::String]
|
1277
|
+
# The name of the region for this request. This must be the region of the primary or secondary disks in the consistency group.
|
1278
|
+
# @param request_id [::String]
|
1279
|
+
# 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).
|
1280
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1281
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1282
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1283
|
+
#
|
1284
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1285
|
+
#
|
1286
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1287
|
+
def stop_group_async_replication request, options = nil
|
1288
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1289
|
+
|
1290
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest
|
1291
|
+
|
1292
|
+
# Converts hash and nil to an options object
|
1293
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1294
|
+
|
1295
|
+
# Customize the options with defaults
|
1296
|
+
call_metadata = @config.rpcs.stop_group_async_replication.metadata.to_h
|
1297
|
+
|
1298
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1299
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1300
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1301
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1302
|
+
transports_version_send: [:rest]
|
1303
|
+
|
1304
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1305
|
+
|
1306
|
+
options.apply_defaults timeout: @config.rpcs.stop_group_async_replication.timeout,
|
1307
|
+
metadata: call_metadata,
|
1308
|
+
retry_policy: @config.rpcs.stop_group_async_replication.retry_policy
|
1309
|
+
|
1310
|
+
options.apply_defaults timeout: @config.timeout,
|
1311
|
+
metadata: @config.metadata,
|
1312
|
+
retry_policy: @config.retry_policy
|
1313
|
+
|
1314
|
+
@region_disks_stub.stop_group_async_replication request, options do |result, response|
|
1315
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
1316
|
+
operation: result,
|
1317
|
+
client: region_operations,
|
1318
|
+
request_values: {
|
1319
|
+
"project" => request.project,
|
1320
|
+
"region" => request.region
|
1321
|
+
},
|
1322
|
+
options: options
|
1323
|
+
)
|
1324
|
+
yield result, response if block_given?
|
1325
|
+
return result
|
1326
|
+
end
|
1327
|
+
rescue ::Gapic::Rest::Error => e
|
1328
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1329
|
+
end
|
1330
|
+
|
1013
1331
|
##
|
1014
1332
|
# Returns permissions that a caller has on the specified resource.
|
1015
1333
|
#
|
@@ -1291,6 +1609,11 @@ module Google
|
|
1291
1609
|
#
|
1292
1610
|
attr_reader :add_resource_policies
|
1293
1611
|
##
|
1612
|
+
# RPC-specific configuration for `bulk_insert`
|
1613
|
+
# @return [::Gapic::Config::Method]
|
1614
|
+
#
|
1615
|
+
attr_reader :bulk_insert
|
1616
|
+
##
|
1294
1617
|
# RPC-specific configuration for `create_snapshot`
|
1295
1618
|
# @return [::Gapic::Config::Method]
|
1296
1619
|
#
|
@@ -1341,6 +1664,21 @@ module Google
|
|
1341
1664
|
#
|
1342
1665
|
attr_reader :set_labels
|
1343
1666
|
##
|
1667
|
+
# RPC-specific configuration for `start_async_replication`
|
1668
|
+
# @return [::Gapic::Config::Method]
|
1669
|
+
#
|
1670
|
+
attr_reader :start_async_replication
|
1671
|
+
##
|
1672
|
+
# RPC-specific configuration for `stop_async_replication`
|
1673
|
+
# @return [::Gapic::Config::Method]
|
1674
|
+
#
|
1675
|
+
attr_reader :stop_async_replication
|
1676
|
+
##
|
1677
|
+
# RPC-specific configuration for `stop_group_async_replication`
|
1678
|
+
# @return [::Gapic::Config::Method]
|
1679
|
+
#
|
1680
|
+
attr_reader :stop_group_async_replication
|
1681
|
+
##
|
1344
1682
|
# RPC-specific configuration for `test_iam_permissions`
|
1345
1683
|
# @return [::Gapic::Config::Method]
|
1346
1684
|
#
|
@@ -1355,6 +1693,8 @@ module Google
|
|
1355
1693
|
def initialize parent_rpcs = nil
|
1356
1694
|
add_resource_policies_config = parent_rpcs.add_resource_policies if parent_rpcs.respond_to? :add_resource_policies
|
1357
1695
|
@add_resource_policies = ::Gapic::Config::Method.new add_resource_policies_config
|
1696
|
+
bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert
|
1697
|
+
@bulk_insert = ::Gapic::Config::Method.new bulk_insert_config
|
1358
1698
|
create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
|
1359
1699
|
@create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
|
1360
1700
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
@@ -1375,6 +1715,12 @@ module Google
|
|
1375
1715
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1376
1716
|
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
1377
1717
|
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
1718
|
+
start_async_replication_config = parent_rpcs.start_async_replication if parent_rpcs.respond_to? :start_async_replication
|
1719
|
+
@start_async_replication = ::Gapic::Config::Method.new start_async_replication_config
|
1720
|
+
stop_async_replication_config = parent_rpcs.stop_async_replication if parent_rpcs.respond_to? :stop_async_replication
|
1721
|
+
@stop_async_replication = ::Gapic::Config::Method.new stop_async_replication_config
|
1722
|
+
stop_group_async_replication_config = parent_rpcs.stop_group_async_replication if parent_rpcs.respond_to? :stop_group_async_replication
|
1723
|
+
@stop_group_async_replication = ::Gapic::Config::Method.new stop_group_async_replication_config
|
1378
1724
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1379
1725
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1380
1726
|
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|