google-cloud-compute-v1 2.1.0 → 2.3.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 +4 -2
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +92 -2
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +68 -6
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/compute_pb.rb +68 -10873
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +350 -2
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +259 -14
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +89 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +66 -5
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/images/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +20 -20
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +7 -3
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +46 -46
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +2 -2
- 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/interconnects/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +5 -3
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +350 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +258 -13
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +19 -19
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +7 -3
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +58 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +1025 -102
- metadata +9 -4
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -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
|
@@ -153,7 +161,7 @@ module Google
|
|
153
161
|
credentials = @config.credentials
|
154
162
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
155
163
|
# but only if the default endpoint does not have a region prefix.
|
156
|
-
enable_self_signed_jwt = @config.endpoint ==
|
164
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
157
165
|
!@config.endpoint.split(".").first.include?("-")
|
158
166
|
credentials ||= Credentials.default scope: @config.scope,
|
159
167
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -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
|
#
|
@@ -1233,7 +1551,9 @@ module Google
|
|
1233
1551
|
class Configuration
|
1234
1552
|
extend ::Gapic::Config
|
1235
1553
|
|
1236
|
-
|
1554
|
+
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
1555
|
+
|
1556
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1237
1557
|
config_attr :credentials, nil do |value|
|
1238
1558
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1239
1559
|
allowed.any? { |klass| klass === value }
|
@@ -1289,6 +1609,11 @@ module Google
|
|
1289
1609
|
#
|
1290
1610
|
attr_reader :add_resource_policies
|
1291
1611
|
##
|
1612
|
+
# RPC-specific configuration for `bulk_insert`
|
1613
|
+
# @return [::Gapic::Config::Method]
|
1614
|
+
#
|
1615
|
+
attr_reader :bulk_insert
|
1616
|
+
##
|
1292
1617
|
# RPC-specific configuration for `create_snapshot`
|
1293
1618
|
# @return [::Gapic::Config::Method]
|
1294
1619
|
#
|
@@ -1339,6 +1664,21 @@ module Google
|
|
1339
1664
|
#
|
1340
1665
|
attr_reader :set_labels
|
1341
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
|
+
##
|
1342
1682
|
# RPC-specific configuration for `test_iam_permissions`
|
1343
1683
|
# @return [::Gapic::Config::Method]
|
1344
1684
|
#
|
@@ -1353,6 +1693,8 @@ module Google
|
|
1353
1693
|
def initialize parent_rpcs = nil
|
1354
1694
|
add_resource_policies_config = parent_rpcs.add_resource_policies if parent_rpcs.respond_to? :add_resource_policies
|
1355
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
|
1356
1698
|
create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
|
1357
1699
|
@create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
|
1358
1700
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
@@ -1373,6 +1715,12 @@ module Google
|
|
1373
1715
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1374
1716
|
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
1375
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
|
1376
1724
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1377
1725
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1378
1726
|
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|