google-cloud-compute-v1 2.3.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/compute_pb.rb +3 -1
- 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/security_policies/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +56 -4
- metadata +2 -2
@@ -461,7 +461,7 @@ module Google
|
|
461
461
|
end
|
462
462
|
|
463
463
|
##
|
464
|
-
# Patches the specified policy with the data included in the request. To clear fields in the
|
464
|
+
# Patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
|
465
465
|
#
|
466
466
|
# @overload patch(request, options = nil)
|
467
467
|
# Pass arguments to `patch` via a request object, either of type
|
@@ -89,6 +89,8 @@ module Google
|
|
89
89
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
90
90
|
}
|
91
91
|
|
92
|
+
default_config.rpcs.patch.timeout = 600.0
|
93
|
+
|
92
94
|
default_config.rpcs.set_iam_policy.timeout = 600.0
|
93
95
|
|
94
96
|
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
@@ -613,6 +615,87 @@ module Google
|
|
613
615
|
raise ::Google::Cloud::Error.from_error(e)
|
614
616
|
end
|
615
617
|
|
618
|
+
##
|
619
|
+
# Modify the specified resource policy.
|
620
|
+
#
|
621
|
+
# @overload patch(request, options = nil)
|
622
|
+
# Pass arguments to `patch` via a request object, either of type
|
623
|
+
# {::Google::Cloud::Compute::V1::PatchResourcePolicyRequest} or an equivalent Hash.
|
624
|
+
#
|
625
|
+
# @param request [::Google::Cloud::Compute::V1::PatchResourcePolicyRequest, ::Hash]
|
626
|
+
# A request object representing the call parameters. Required. To specify no
|
627
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
628
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
629
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
630
|
+
#
|
631
|
+
# @overload patch(project: nil, region: nil, request_id: nil, resource_policy: nil, resource_policy_resource: nil, update_mask: nil)
|
632
|
+
# Pass arguments to `patch` via keyword arguments. Note that at
|
633
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
634
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
635
|
+
#
|
636
|
+
# @param project [::String]
|
637
|
+
# Project ID for this request.
|
638
|
+
# @param region [::String]
|
639
|
+
# Name of the region for this request.
|
640
|
+
# @param request_id [::String]
|
641
|
+
# 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).
|
642
|
+
# @param resource_policy [::String]
|
643
|
+
# Id of the resource policy to patch.
|
644
|
+
# @param resource_policy_resource [::Google::Cloud::Compute::V1::ResourcePolicy, ::Hash]
|
645
|
+
# The body resource for this request
|
646
|
+
# @param update_mask [::String]
|
647
|
+
# update_mask indicates fields to be updated as part of this request.
|
648
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
649
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
650
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
651
|
+
#
|
652
|
+
# @return [::Gapic::GenericLRO::Operation]
|
653
|
+
#
|
654
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
655
|
+
def patch request, options = nil
|
656
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
657
|
+
|
658
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchResourcePolicyRequest
|
659
|
+
|
660
|
+
# Converts hash and nil to an options object
|
661
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
662
|
+
|
663
|
+
# Customize the options with defaults
|
664
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
665
|
+
|
666
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
667
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
668
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
669
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
670
|
+
transports_version_send: [:rest]
|
671
|
+
|
672
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
673
|
+
|
674
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
675
|
+
metadata: call_metadata,
|
676
|
+
retry_policy: @config.rpcs.patch.retry_policy
|
677
|
+
|
678
|
+
options.apply_defaults timeout: @config.timeout,
|
679
|
+
metadata: @config.metadata,
|
680
|
+
retry_policy: @config.retry_policy
|
681
|
+
|
682
|
+
@resource_policies_stub.patch request, options do |result, response|
|
683
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
684
|
+
operation: result,
|
685
|
+
client: region_operations,
|
686
|
+
request_values: {
|
687
|
+
"project" => request.project,
|
688
|
+
"region" => request.region
|
689
|
+
},
|
690
|
+
options: options
|
691
|
+
)
|
692
|
+
yield result, response if block_given?
|
693
|
+
return result
|
694
|
+
end
|
695
|
+
rescue ::Gapic::Rest::Error => e
|
696
|
+
raise ::Google::Cloud::Error.from_error(e)
|
697
|
+
end
|
698
|
+
|
616
699
|
##
|
617
700
|
# Sets the access control policy on the specified resource. Replaces any existing policy.
|
618
701
|
#
|
@@ -905,6 +988,11 @@ module Google
|
|
905
988
|
#
|
906
989
|
attr_reader :list
|
907
990
|
##
|
991
|
+
# RPC-specific configuration for `patch`
|
992
|
+
# @return [::Gapic::Config::Method]
|
993
|
+
#
|
994
|
+
attr_reader :patch
|
995
|
+
##
|
908
996
|
# RPC-specific configuration for `set_iam_policy`
|
909
997
|
# @return [::Gapic::Config::Method]
|
910
998
|
#
|
@@ -929,6 +1017,8 @@ module Google
|
|
929
1017
|
@insert = ::Gapic::Config::Method.new insert_config
|
930
1018
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
931
1019
|
@list = ::Gapic::Config::Method.new list_config
|
1020
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1021
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
932
1022
|
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
933
1023
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
934
1024
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
@@ -268,6 +268,44 @@ module Google
|
|
268
268
|
result
|
269
269
|
end
|
270
270
|
|
271
|
+
##
|
272
|
+
# Baseline implementation for the patch REST call
|
273
|
+
#
|
274
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchResourcePolicyRequest]
|
275
|
+
# A request object representing the call parameters. Required.
|
276
|
+
# @param options [::Gapic::CallOptions]
|
277
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
278
|
+
#
|
279
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
280
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
281
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
282
|
+
#
|
283
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
284
|
+
# A result object deserialized from the server's reply
|
285
|
+
def patch request_pb, options = nil
|
286
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
287
|
+
|
288
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_patch_request request_pb
|
289
|
+
query_string_params = if query_string_params.any?
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
|
+
else
|
292
|
+
{}
|
293
|
+
end
|
294
|
+
|
295
|
+
response = @client_stub.make_http_request(
|
296
|
+
verb,
|
297
|
+
uri: uri,
|
298
|
+
body: body || "",
|
299
|
+
params: query_string_params,
|
300
|
+
options: options
|
301
|
+
)
|
302
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
303
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
304
|
+
|
305
|
+
yield result, operation if block_given?
|
306
|
+
result
|
307
|
+
end
|
308
|
+
|
271
309
|
##
|
272
310
|
# Baseline implementation for the set_iam_policy REST call
|
273
311
|
#
|
@@ -479,6 +517,30 @@ module Google
|
|
479
517
|
transcoder.transcode request_pb
|
480
518
|
end
|
481
519
|
|
520
|
+
##
|
521
|
+
# @private
|
522
|
+
#
|
523
|
+
# GRPC transcoding helper method for the patch REST call
|
524
|
+
#
|
525
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchResourcePolicyRequest]
|
526
|
+
# A request object representing the call parameters. Required.
|
527
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
528
|
+
# Uri, Body, Query string parameters
|
529
|
+
def self.transcode_patch_request request_pb
|
530
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
531
|
+
.with_bindings(
|
532
|
+
uri_method: :patch,
|
533
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resource_policy}",
|
534
|
+
body: "resource_policy_resource",
|
535
|
+
matches: [
|
536
|
+
["project", %r{^[^/]+/?$}, false],
|
537
|
+
["region", %r{^[^/]+/?$}, false],
|
538
|
+
["resource_policy", %r{^[^/]+/?$}, false]
|
539
|
+
]
|
540
|
+
)
|
541
|
+
transcoder.transcode request_pb
|
542
|
+
end
|
543
|
+
|
482
544
|
##
|
483
545
|
# @private
|
484
546
|
#
|
@@ -763,7 +763,7 @@ module Google
|
|
763
763
|
end
|
764
764
|
|
765
765
|
##
|
766
|
-
# Patches the specified policy with the data included in the request. To clear fields in the
|
766
|
+
# Patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
|
767
767
|
#
|
768
768
|
# @overload patch(request, options = nil)
|
769
769
|
# Pass arguments to `patch` via a request object, either of type
|
@@ -839,7 +839,7 @@ module Google
|
|
839
839
|
end
|
840
840
|
|
841
841
|
##
|
842
|
-
# Patches a rule at the specified priority.
|
842
|
+
# Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
|
843
843
|
#
|
844
844
|
# @overload patch_rule(request, options = nil)
|
845
845
|
# Pass arguments to `patch_rule` via a request object, either of type
|
@@ -2982,7 +2982,7 @@ module Google
|
|
2982
2982
|
# [Output Only] Creation timestamp in RFC3339 text format.
|
2983
2983
|
# @!attribute [rw] custom_response_headers
|
2984
2984
|
# @return [::Array<::String>]
|
2985
|
-
# Headers that the
|
2985
|
+
# Headers that the Application Load Balancer should add to proxied responses.
|
2986
2986
|
# @!attribute [rw] description
|
2987
2987
|
# @return [::String]
|
2988
2988
|
# An optional textual description of the resource; provided by the client when the resource is created.
|
@@ -6899,6 +6899,9 @@ module Google
|
|
6899
6899
|
# The group picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability.
|
6900
6900
|
ANY = 64_972
|
6901
6901
|
|
6902
|
+
# The group creates all VM instances within a single zone. The zone is selected based on the present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads with heavy interprocess communication.
|
6903
|
+
ANY_SINGLE_ZONE = 61_100_880
|
6904
|
+
|
6902
6905
|
# The group prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across selected zones to minimize the impact of zonal failure. Recommended for highly available serving workloads.
|
6903
6906
|
BALANCED = 468_409_608
|
6904
6907
|
|
@@ -12983,7 +12986,7 @@ module Google
|
|
12983
12986
|
# Check the ReplacementMethod enum for the list of possible values.
|
12984
12987
|
# @!attribute [rw] type
|
12985
12988
|
# @return [::String]
|
12986
|
-
# The type of update process. You can specify either PROACTIVE so that the
|
12989
|
+
# The type of update process. You can specify either PROACTIVE so that the MIG automatically updates VMs to the latest configurations or OPPORTUNISTIC so that you can select the VMs that you want to update.
|
12987
12990
|
# Check the Type enum for the list of possible values.
|
12988
12991
|
class InstanceGroupManagerUpdatePolicy
|
12989
12992
|
include ::Google::Protobuf::MessageExts
|
@@ -13032,14 +13035,14 @@ module Google
|
|
13032
13035
|
SUBSTITUTE = 280_924_314
|
13033
13036
|
end
|
13034
13037
|
|
13035
|
-
# The type of update process. You can specify either PROACTIVE so that the
|
13038
|
+
# The type of update process. You can specify either PROACTIVE so that the MIG automatically updates VMs to the latest configurations or OPPORTUNISTIC so that you can select the VMs that you want to update.
|
13036
13039
|
# Additional supported values which may be not listed in the enum directly due to technical reasons:
|
13037
13040
|
# PROACTIVE
|
13038
13041
|
module Type
|
13039
13042
|
# A value indicating that the enum field is not set.
|
13040
13043
|
UNDEFINED_TYPE = 0
|
13041
13044
|
|
13042
|
-
#
|
13045
|
+
# MIG will apply new configurations to existing VMs only when you selectively target specific or all VMs to be updated.
|
13043
13046
|
OPPORTUNISTIC = 429_530_089
|
13044
13047
|
end
|
13045
13048
|
end
|
@@ -21514,6 +21517,30 @@ module Google
|
|
21514
21517
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
21515
21518
|
end
|
21516
21519
|
|
21520
|
+
# A request message for ResourcePolicies.Patch. See the method description for details.
|
21521
|
+
# @!attribute [rw] project
|
21522
|
+
# @return [::String]
|
21523
|
+
# Project ID for this request.
|
21524
|
+
# @!attribute [rw] region
|
21525
|
+
# @return [::String]
|
21526
|
+
# Name of the region for this request.
|
21527
|
+
# @!attribute [rw] request_id
|
21528
|
+
# @return [::String]
|
21529
|
+
# 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).
|
21530
|
+
# @!attribute [rw] resource_policy
|
21531
|
+
# @return [::String]
|
21532
|
+
# Id of the resource policy to patch.
|
21533
|
+
# @!attribute [rw] resource_policy_resource
|
21534
|
+
# @return [::Google::Cloud::Compute::V1::ResourcePolicy]
|
21535
|
+
# The body resource for this request
|
21536
|
+
# @!attribute [rw] update_mask
|
21537
|
+
# @return [::String]
|
21538
|
+
# update_mask indicates fields to be updated as part of this request.
|
21539
|
+
class PatchResourcePolicyRequest
|
21540
|
+
include ::Google::Protobuf::MessageExts
|
21541
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
21542
|
+
end
|
21543
|
+
|
21517
21544
|
# A request message for Routers.Patch. See the method description for details.
|
21518
21545
|
# @!attribute [rw] project
|
21519
21546
|
# @return [::String]
|
@@ -22751,6 +22778,9 @@ module Google
|
|
22751
22778
|
# @!attribute [rw] dimensions
|
22752
22779
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
22753
22780
|
# The map holding related quota dimensions.
|
22781
|
+
# @!attribute [rw] future_limit
|
22782
|
+
# @return [::Float]
|
22783
|
+
# Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
|
22754
22784
|
# @!attribute [rw] limit
|
22755
22785
|
# @return [::Float]
|
22756
22786
|
# Current effective quota limit. The limit's unit depends on the quota type or metric.
|
@@ -22760,6 +22790,10 @@ module Google
|
|
22760
22790
|
# @!attribute [rw] metric_name
|
22761
22791
|
# @return [::String]
|
22762
22792
|
# The Compute Engine quota metric name.
|
22793
|
+
# @!attribute [rw] rollout_status
|
22794
|
+
# @return [::String]
|
22795
|
+
# Rollout status of the future quota limit.
|
22796
|
+
# Check the RolloutStatus enum for the list of possible values.
|
22763
22797
|
class QuotaExceededInfo
|
22764
22798
|
include ::Google::Protobuf::MessageExts
|
22765
22799
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -22772,6 +22806,18 @@ module Google
|
|
22772
22806
|
include ::Google::Protobuf::MessageExts
|
22773
22807
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
22774
22808
|
end
|
22809
|
+
|
22810
|
+
# Rollout status of the future quota limit.
|
22811
|
+
module RolloutStatus
|
22812
|
+
# A value indicating that the enum field is not set.
|
22813
|
+
UNDEFINED_ROLLOUT_STATUS = 0
|
22814
|
+
|
22815
|
+
# IN_PROGRESS - A rollout is in process which will change the limit value to future limit.
|
22816
|
+
IN_PROGRESS = 469_193_735
|
22817
|
+
|
22818
|
+
# ROLLOUT_STATUS_UNSPECIFIED - Rollout status is not specified. The default value.
|
22819
|
+
ROLLOUT_STATUS_UNSPECIFIED = 26_864_568
|
22820
|
+
end
|
22775
22821
|
end
|
22776
22822
|
|
22777
22823
|
# The parameters of the raw disk image.
|
@@ -25608,6 +25654,9 @@ module Google
|
|
25608
25654
|
# @return [::String]
|
25609
25655
|
# Specifies the termination action for the instance.
|
25610
25656
|
# Check the InstanceTerminationAction enum for the list of possible values.
|
25657
|
+
# @!attribute [rw] local_ssd_recovery_timeout
|
25658
|
+
# @return [::Google::Cloud::Compute::V1::Duration]
|
25659
|
+
# Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour.
|
25611
25660
|
# @!attribute [rw] location_hint
|
25612
25661
|
# @return [::String]
|
25613
25662
|
# An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
|
@@ -26457,6 +26506,9 @@ module Google
|
|
26457
26506
|
end
|
26458
26507
|
|
26459
26508
|
# [Output Only] A connection connected to this service attachment.
|
26509
|
+
# @!attribute [rw] consumer_network
|
26510
|
+
# @return [::String]
|
26511
|
+
# The url of the consumer network.
|
26460
26512
|
# @!attribute [rw] endpoint
|
26461
26513
|
# @return [::String]
|
26462
26514
|
# The url of a connected endpoint.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-compute-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|