google-cloud-compute-v1 2.22.0 → 3.0.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/compute_pb.rb +125 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +105 -0
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +63 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +1218 -0
- data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb +641 -0
- data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb +47 -0
- data/lib/google/cloud/compute/v1/interconnect_groups/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +1318 -0
- data/lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb +704 -0
- data/lib/google/cloud/compute/v1/interconnect_groups/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/interconnect_groups.rb +47 -0
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +104 -0
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +63 -0
- data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +4 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +102 -0
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +63 -0
- data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +4 -1
- data/lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +659 -0
- data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +272 -0
- data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/reservation_sub_blocks.rb +47 -0
- data/lib/google/cloud/compute/v1/rest.rb +3 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +8 -4
- data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +8 -4
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -1
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +3 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +2265 -64
- metadata +19 -4
@@ -80,6 +80,8 @@ module Google
|
|
80
80
|
|
81
81
|
default_config.rpcs.bulk_insert.timeout = 600.0
|
82
82
|
|
83
|
+
default_config.rpcs.bulk_set_labels.timeout = 600.0
|
84
|
+
|
83
85
|
default_config.rpcs.create_snapshot.timeout = 600.0
|
84
86
|
|
85
87
|
default_config.rpcs.delete.timeout = 600.0
|
@@ -521,6 +523,102 @@ module Google
|
|
521
523
|
raise ::Google::Cloud::Error.from_error(e)
|
522
524
|
end
|
523
525
|
|
526
|
+
##
|
527
|
+
# Sets the labels on many disks at once. To learn more about labels, read the Labeling Resources documentation.
|
528
|
+
#
|
529
|
+
# @overload bulk_set_labels(request, options = nil)
|
530
|
+
# Pass arguments to `bulk_set_labels` via a request object, either of type
|
531
|
+
# {::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest} or an equivalent Hash.
|
532
|
+
#
|
533
|
+
# @param request [::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest, ::Hash]
|
534
|
+
# A request object representing the call parameters. Required. To specify no
|
535
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
536
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
537
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
538
|
+
#
|
539
|
+
# @overload bulk_set_labels(bulk_zone_set_labels_request_resource: nil, project: nil, request_id: nil, resource: nil, zone: nil)
|
540
|
+
# Pass arguments to `bulk_set_labels` via keyword arguments. Note that at
|
541
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
542
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
543
|
+
#
|
544
|
+
# @param bulk_zone_set_labels_request_resource [::Google::Cloud::Compute::V1::BulkZoneSetLabelsRequest, ::Hash]
|
545
|
+
# The body resource for this request
|
546
|
+
# @param project [::String]
|
547
|
+
# Project ID for this request.
|
548
|
+
# @param request_id [::String]
|
549
|
+
# 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).
|
550
|
+
# @param resource [::String]
|
551
|
+
# Name or id of the resource for this request.
|
552
|
+
# @param zone [::String]
|
553
|
+
# The name of the zone for this request.
|
554
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
555
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
556
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
557
|
+
#
|
558
|
+
# @return [::Gapic::GenericLRO::Operation]
|
559
|
+
#
|
560
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
561
|
+
#
|
562
|
+
# @example Basic example
|
563
|
+
# require "google/cloud/compute/v1"
|
564
|
+
#
|
565
|
+
# # Create a client object. The client can be reused for multiple calls.
|
566
|
+
# client = Google::Cloud::Compute::V1::Disks::Rest::Client.new
|
567
|
+
#
|
568
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
569
|
+
# request = Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest.new
|
570
|
+
#
|
571
|
+
# # Call the bulk_set_labels method.
|
572
|
+
# result = client.bulk_set_labels request
|
573
|
+
#
|
574
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
575
|
+
# p result
|
576
|
+
#
|
577
|
+
def bulk_set_labels request, options = nil
|
578
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
579
|
+
|
580
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest
|
581
|
+
|
582
|
+
# Converts hash and nil to an options object
|
583
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
584
|
+
|
585
|
+
# Customize the options with defaults
|
586
|
+
call_metadata = @config.rpcs.bulk_set_labels.metadata.to_h
|
587
|
+
|
588
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
589
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
590
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
591
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
592
|
+
transports_version_send: [:rest]
|
593
|
+
|
594
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
595
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
596
|
+
|
597
|
+
options.apply_defaults timeout: @config.rpcs.bulk_set_labels.timeout,
|
598
|
+
metadata: call_metadata,
|
599
|
+
retry_policy: @config.rpcs.bulk_set_labels.retry_policy
|
600
|
+
|
601
|
+
options.apply_defaults timeout: @config.timeout,
|
602
|
+
metadata: @config.metadata,
|
603
|
+
retry_policy: @config.retry_policy
|
604
|
+
|
605
|
+
@disks_stub.bulk_set_labels request, options do |result, response|
|
606
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
607
|
+
operation: result,
|
608
|
+
client: zone_operations,
|
609
|
+
request_values: {
|
610
|
+
"project" => request.project,
|
611
|
+
"zone" => request.zone
|
612
|
+
},
|
613
|
+
options: options
|
614
|
+
)
|
615
|
+
yield result, response if block_given?
|
616
|
+
throw :response, result
|
617
|
+
end
|
618
|
+
rescue ::Gapic::Rest::Error => e
|
619
|
+
raise ::Google::Cloud::Error.from_error(e)
|
620
|
+
end
|
621
|
+
|
524
622
|
##
|
525
623
|
# 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.
|
526
624
|
#
|
@@ -2068,6 +2166,11 @@ module Google
|
|
2068
2166
|
#
|
2069
2167
|
attr_reader :bulk_insert
|
2070
2168
|
##
|
2169
|
+
# RPC-specific configuration for `bulk_set_labels`
|
2170
|
+
# @return [::Gapic::Config::Method]
|
2171
|
+
#
|
2172
|
+
attr_reader :bulk_set_labels
|
2173
|
+
##
|
2071
2174
|
# RPC-specific configuration for `create_snapshot`
|
2072
2175
|
# @return [::Gapic::Config::Method]
|
2073
2176
|
#
|
@@ -2151,6 +2254,8 @@ module Google
|
|
2151
2254
|
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
2152
2255
|
bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert
|
2153
2256
|
@bulk_insert = ::Gapic::Config::Method.new bulk_insert_config
|
2257
|
+
bulk_set_labels_config = parent_rpcs.bulk_set_labels if parent_rpcs.respond_to? :bulk_set_labels
|
2258
|
+
@bulk_set_labels = ::Gapic::Config::Method.new bulk_set_labels_config
|
2154
2259
|
create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
|
2155
2260
|
@create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
|
2156
2261
|
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
@@ -193,6 +193,46 @@ module Google
|
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
196
|
+
##
|
197
|
+
# Baseline implementation for the bulk_set_labels REST call
|
198
|
+
#
|
199
|
+
# @param request_pb [::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest]
|
200
|
+
# A request object representing the call parameters. Required.
|
201
|
+
# @param options [::Gapic::CallOptions]
|
202
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
203
|
+
#
|
204
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
205
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
206
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
207
|
+
#
|
208
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
209
|
+
# A result object deserialized from the server's reply
|
210
|
+
def bulk_set_labels request_pb, options = nil
|
211
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
212
|
+
|
213
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_bulk_set_labels_request request_pb
|
214
|
+
query_string_params = if query_string_params.any?
|
215
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
216
|
+
else
|
217
|
+
{}
|
218
|
+
end
|
219
|
+
|
220
|
+
response = @client_stub.make_http_request(
|
221
|
+
verb,
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "bulk_set_labels",
|
226
|
+
options: options
|
227
|
+
)
|
228
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
229
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
196
236
|
##
|
197
237
|
# Baseline implementation for the create_snapshot REST call
|
198
238
|
#
|
@@ -861,6 +901,29 @@ module Google
|
|
861
901
|
transcoder.transcode request_pb
|
862
902
|
end
|
863
903
|
|
904
|
+
##
|
905
|
+
# @private
|
906
|
+
#
|
907
|
+
# GRPC transcoding helper method for the bulk_set_labels REST call
|
908
|
+
#
|
909
|
+
# @param request_pb [::Google::Cloud::Compute::V1::BulkSetLabelsDiskRequest]
|
910
|
+
# A request object representing the call parameters. Required.
|
911
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
912
|
+
# Uri, Body, Query string parameters
|
913
|
+
def self.transcode_bulk_set_labels_request request_pb
|
914
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
915
|
+
.with_bindings(
|
916
|
+
uri_method: :post,
|
917
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/disks/bulkSetLabels",
|
918
|
+
body: "bulk_zone_set_labels_request_resource",
|
919
|
+
matches: [
|
920
|
+
["project", %r{^[^/]+/?$}, false],
|
921
|
+
["zone", %r{^[^/]+/?$}, false]
|
922
|
+
]
|
923
|
+
)
|
924
|
+
transcoder.transcode request_pb
|
925
|
+
end
|
926
|
+
|
864
927
|
##
|
865
928
|
# @private
|
866
929
|
#
|
@@ -285,9 +285,9 @@ module Google
|
|
285
285
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
286
286
|
#
|
287
287
|
# @param operation [::String]
|
288
|
-
# Name of the Operations resource to return
|
288
|
+
# Name of the Operations resource to return. Parent is derived from this field.
|
289
289
|
# @param parent_id [::String]
|
290
|
-
# Parent ID for this request.
|
290
|
+
# Parent ID for this request. Not used. Parent is derived from resource_id.
|
291
291
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
292
292
|
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
293
293
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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 "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module InterconnectAttachmentGroups
|
26
|
+
# Credentials for the InterconnectAttachmentGroups API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/compute",
|
30
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"COMPUTE_CREDENTIALS",
|
34
|
+
"COMPUTE_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"COMPUTE_CREDENTIALS_JSON",
|
39
|
+
"COMPUTE_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|