google-cloud-kms-v1 0.18.1 → 0.19.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/kms/v1/ekm_service/client.rb +97 -0
- data/lib/google/cloud/kms/v1/ekm_service/rest/client.rb +74 -0
- data/lib/google/cloud/kms/v1/ekm_service/rest/service_stub.rb +59 -0
- data/lib/google/cloud/kms/v1/ekm_service_pb.rb +7 -0
- data/lib/google/cloud/kms/v1/ekm_service_services_pb.rb +6 -0
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +10 -1
- data/proto_docs/google/cloud/kms/v1/ekm_service.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69001e1b6b9a0e268ff0e9ddaf3ef9535c8e25428334d9d58fc59fdc3b21fb8c
|
4
|
+
data.tar.gz: 11fc0213ab299c96b8636a164e9ad5ffe536d9f3fa43b6d60d892d5f91005f01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba06d5d132693b236e02f44d4d752c742e336668f19fb0b8381af3e8931278ddeb0572cb4586d0c47249768ed6e3847b14bce5c0281862ac2425f57d0f801f1
|
7
|
+
data.tar.gz: 3005fd1d7e72bad8c8877453764a8974cc27538615958eb74b12ef4aac502b1dff059b355313558658144bd43486aa2e4a3435c9f4f03672ca84d15c37c1548a
|
@@ -753,6 +753,96 @@ module Google
|
|
753
753
|
raise ::Google::Cloud::Error.from_error(e)
|
754
754
|
end
|
755
755
|
|
756
|
+
##
|
757
|
+
# Verifies that Cloud KMS can successfully connect to the external key
|
758
|
+
# manager specified by an {::Google::Cloud::Kms::V1::EkmConnection EkmConnection}.
|
759
|
+
# If there is an error connecting to the EKM, this method returns a
|
760
|
+
# FAILED_PRECONDITION status containing structured information as described
|
761
|
+
# at https://cloud.google.com/kms/docs/reference/ekm_errors.
|
762
|
+
#
|
763
|
+
# @overload verify_connectivity(request, options = nil)
|
764
|
+
# Pass arguments to `verify_connectivity` via a request object, either of type
|
765
|
+
# {::Google::Cloud::Kms::V1::VerifyConnectivityRequest} or an equivalent Hash.
|
766
|
+
#
|
767
|
+
# @param request [::Google::Cloud::Kms::V1::VerifyConnectivityRequest, ::Hash]
|
768
|
+
# A request object representing the call parameters. Required. To specify no
|
769
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
770
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
771
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
772
|
+
#
|
773
|
+
# @overload verify_connectivity(name: nil)
|
774
|
+
# Pass arguments to `verify_connectivity` via keyword arguments. Note that at
|
775
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
776
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
777
|
+
#
|
778
|
+
# @param name [::String]
|
779
|
+
# Required. The {::Google::Cloud::Kms::V1::EkmConnection#name name} of the
|
780
|
+
# {::Google::Cloud::Kms::V1::EkmConnection EkmConnection} to verify.
|
781
|
+
#
|
782
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
783
|
+
# @yieldparam response [::Google::Cloud::Kms::V1::VerifyConnectivityResponse]
|
784
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
785
|
+
#
|
786
|
+
# @return [::Google::Cloud::Kms::V1::VerifyConnectivityResponse]
|
787
|
+
#
|
788
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
789
|
+
#
|
790
|
+
# @example Basic example
|
791
|
+
# require "google/cloud/kms/v1"
|
792
|
+
#
|
793
|
+
# # Create a client object. The client can be reused for multiple calls.
|
794
|
+
# client = Google::Cloud::Kms::V1::EkmService::Client.new
|
795
|
+
#
|
796
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
797
|
+
# request = Google::Cloud::Kms::V1::VerifyConnectivityRequest.new
|
798
|
+
#
|
799
|
+
# # Call the verify_connectivity method.
|
800
|
+
# result = client.verify_connectivity request
|
801
|
+
#
|
802
|
+
# # The returned object is of type Google::Cloud::Kms::V1::VerifyConnectivityResponse.
|
803
|
+
# p result
|
804
|
+
#
|
805
|
+
def verify_connectivity request, options = nil
|
806
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
807
|
+
|
808
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::VerifyConnectivityRequest
|
809
|
+
|
810
|
+
# Converts hash and nil to an options object
|
811
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
812
|
+
|
813
|
+
# Customize the options with defaults
|
814
|
+
metadata = @config.rpcs.verify_connectivity.metadata.to_h
|
815
|
+
|
816
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
817
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
818
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
819
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
820
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
821
|
+
|
822
|
+
header_params = {}
|
823
|
+
if request.name
|
824
|
+
header_params["name"] = request.name
|
825
|
+
end
|
826
|
+
|
827
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
828
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
829
|
+
|
830
|
+
options.apply_defaults timeout: @config.rpcs.verify_connectivity.timeout,
|
831
|
+
metadata: metadata,
|
832
|
+
retry_policy: @config.rpcs.verify_connectivity.retry_policy
|
833
|
+
|
834
|
+
options.apply_defaults timeout: @config.timeout,
|
835
|
+
metadata: @config.metadata,
|
836
|
+
retry_policy: @config.retry_policy
|
837
|
+
|
838
|
+
@ekm_service_stub.call_rpc :verify_connectivity, request, options: options do |response, operation|
|
839
|
+
yield response, operation if block_given?
|
840
|
+
return response
|
841
|
+
end
|
842
|
+
rescue ::GRPC::BadStatus => e
|
843
|
+
raise ::Google::Cloud::Error.from_error(e)
|
844
|
+
end
|
845
|
+
|
756
846
|
##
|
757
847
|
# Configuration class for the EkmService API.
|
758
848
|
#
|
@@ -918,6 +1008,11 @@ module Google
|
|
918
1008
|
# @return [::Gapic::Config::Method]
|
919
1009
|
#
|
920
1010
|
attr_reader :update_ekm_config
|
1011
|
+
##
|
1012
|
+
# RPC-specific configuration for `verify_connectivity`
|
1013
|
+
# @return [::Gapic::Config::Method]
|
1014
|
+
#
|
1015
|
+
attr_reader :verify_connectivity
|
921
1016
|
|
922
1017
|
# @private
|
923
1018
|
def initialize parent_rpcs = nil
|
@@ -933,6 +1028,8 @@ module Google
|
|
933
1028
|
@get_ekm_config = ::Gapic::Config::Method.new get_ekm_config_config
|
934
1029
|
update_ekm_config_config = parent_rpcs.update_ekm_config if parent_rpcs.respond_to? :update_ekm_config
|
935
1030
|
@update_ekm_config = ::Gapic::Config::Method.new update_ekm_config_config
|
1031
|
+
verify_connectivity_config = parent_rpcs.verify_connectivity if parent_rpcs.respond_to? :verify_connectivity
|
1032
|
+
@verify_connectivity = ::Gapic::Config::Method.new verify_connectivity_config
|
936
1033
|
|
937
1034
|
yield self if block_given?
|
938
1035
|
end
|
@@ -604,6 +604,73 @@ module Google
|
|
604
604
|
raise ::Google::Cloud::Error.from_error(e)
|
605
605
|
end
|
606
606
|
|
607
|
+
##
|
608
|
+
# Verifies that Cloud KMS can successfully connect to the external key
|
609
|
+
# manager specified by an {::Google::Cloud::Kms::V1::EkmConnection EkmConnection}.
|
610
|
+
# If there is an error connecting to the EKM, this method returns a
|
611
|
+
# FAILED_PRECONDITION status containing structured information as described
|
612
|
+
# at https://cloud.google.com/kms/docs/reference/ekm_errors.
|
613
|
+
#
|
614
|
+
# @overload verify_connectivity(request, options = nil)
|
615
|
+
# Pass arguments to `verify_connectivity` via a request object, either of type
|
616
|
+
# {::Google::Cloud::Kms::V1::VerifyConnectivityRequest} or an equivalent Hash.
|
617
|
+
#
|
618
|
+
# @param request [::Google::Cloud::Kms::V1::VerifyConnectivityRequest, ::Hash]
|
619
|
+
# A request object representing the call parameters. Required. To specify no
|
620
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
621
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
622
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
623
|
+
#
|
624
|
+
# @overload verify_connectivity(name: nil)
|
625
|
+
# Pass arguments to `verify_connectivity` via keyword arguments. Note that at
|
626
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
627
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
628
|
+
#
|
629
|
+
# @param name [::String]
|
630
|
+
# Required. The {::Google::Cloud::Kms::V1::EkmConnection#name name} of the
|
631
|
+
# {::Google::Cloud::Kms::V1::EkmConnection EkmConnection} to verify.
|
632
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
633
|
+
# @yieldparam result [::Google::Cloud::Kms::V1::VerifyConnectivityResponse]
|
634
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
635
|
+
#
|
636
|
+
# @return [::Google::Cloud::Kms::V1::VerifyConnectivityResponse]
|
637
|
+
#
|
638
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
639
|
+
def verify_connectivity request, options = nil
|
640
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
641
|
+
|
642
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::VerifyConnectivityRequest
|
643
|
+
|
644
|
+
# Converts hash and nil to an options object
|
645
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
646
|
+
|
647
|
+
# Customize the options with defaults
|
648
|
+
call_metadata = @config.rpcs.verify_connectivity.metadata.to_h
|
649
|
+
|
650
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
651
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
652
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
653
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION,
|
654
|
+
transports_version_send: [:rest]
|
655
|
+
|
656
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
657
|
+
|
658
|
+
options.apply_defaults timeout: @config.rpcs.verify_connectivity.timeout,
|
659
|
+
metadata: call_metadata,
|
660
|
+
retry_policy: @config.rpcs.verify_connectivity.retry_policy
|
661
|
+
|
662
|
+
options.apply_defaults timeout: @config.timeout,
|
663
|
+
metadata: @config.metadata,
|
664
|
+
retry_policy: @config.retry_policy
|
665
|
+
|
666
|
+
@ekm_service_stub.verify_connectivity request, options do |result, operation|
|
667
|
+
yield result, operation if block_given?
|
668
|
+
return result
|
669
|
+
end
|
670
|
+
rescue ::Gapic::Rest::Error => e
|
671
|
+
raise ::Google::Cloud::Error.from_error(e)
|
672
|
+
end
|
673
|
+
|
607
674
|
##
|
608
675
|
# Configuration class for the EkmService REST API.
|
609
676
|
#
|
@@ -764,6 +831,11 @@ module Google
|
|
764
831
|
# @return [::Gapic::Config::Method]
|
765
832
|
#
|
766
833
|
attr_reader :update_ekm_config
|
834
|
+
##
|
835
|
+
# RPC-specific configuration for `verify_connectivity`
|
836
|
+
# @return [::Gapic::Config::Method]
|
837
|
+
#
|
838
|
+
attr_reader :verify_connectivity
|
767
839
|
|
768
840
|
# @private
|
769
841
|
def initialize parent_rpcs = nil
|
@@ -779,6 +851,8 @@ module Google
|
|
779
851
|
@get_ekm_config = ::Gapic::Config::Method.new get_ekm_config_config
|
780
852
|
update_ekm_config_config = parent_rpcs.update_ekm_config if parent_rpcs.respond_to? :update_ekm_config
|
781
853
|
@update_ekm_config = ::Gapic::Config::Method.new update_ekm_config_config
|
854
|
+
verify_connectivity_config = parent_rpcs.verify_connectivity if parent_rpcs.respond_to? :verify_connectivity
|
855
|
+
@verify_connectivity = ::Gapic::Config::Method.new verify_connectivity_config
|
782
856
|
|
783
857
|
yield self if block_given?
|
784
858
|
end
|
@@ -268,6 +268,44 @@ module Google
|
|
268
268
|
result
|
269
269
|
end
|
270
270
|
|
271
|
+
##
|
272
|
+
# Baseline implementation for the verify_connectivity REST call
|
273
|
+
#
|
274
|
+
# @param request_pb [::Google::Cloud::Kms::V1::VerifyConnectivityRequest]
|
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::Kms::V1::VerifyConnectivityResponse]
|
281
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
282
|
+
#
|
283
|
+
# @return [::Google::Cloud::Kms::V1::VerifyConnectivityResponse]
|
284
|
+
# A result object deserialized from the server's reply
|
285
|
+
def verify_connectivity 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_verify_connectivity_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::Kms::V1::VerifyConnectivityResponse.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
|
# @private
|
273
311
|
#
|
@@ -396,6 +434,27 @@ module Google
|
|
396
434
|
)
|
397
435
|
transcoder.transcode request_pb
|
398
436
|
end
|
437
|
+
|
438
|
+
##
|
439
|
+
# @private
|
440
|
+
#
|
441
|
+
# GRPC transcoding helper method for the verify_connectivity REST call
|
442
|
+
#
|
443
|
+
# @param request_pb [::Google::Cloud::Kms::V1::VerifyConnectivityRequest]
|
444
|
+
# A request object representing the call parameters. Required.
|
445
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
446
|
+
# Uri, Body, Query string parameters
|
447
|
+
def self.transcode_verify_connectivity_request request_pb
|
448
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
449
|
+
.with_bindings(
|
450
|
+
uri_method: :get,
|
451
|
+
uri_template: "/v1/{name}:verifyConnectivity",
|
452
|
+
matches: [
|
453
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/ekmConnections/[^/]+/?$}, false]
|
454
|
+
]
|
455
|
+
)
|
456
|
+
transcoder.transcode request_pb
|
457
|
+
end
|
399
458
|
end
|
400
459
|
end
|
401
460
|
end
|
@@ -77,6 +77,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
77
77
|
optional :name, :string, 1
|
78
78
|
optional :default_ekm_connection, :string, 2
|
79
79
|
end
|
80
|
+
add_message "google.cloud.kms.v1.VerifyConnectivityRequest" do
|
81
|
+
optional :name, :string, 1
|
82
|
+
end
|
83
|
+
add_message "google.cloud.kms.v1.VerifyConnectivityResponse" do
|
84
|
+
end
|
80
85
|
end
|
81
86
|
end
|
82
87
|
|
@@ -96,6 +101,8 @@ module Google
|
|
96
101
|
EkmConnection::ServiceResolver = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.EkmConnection.ServiceResolver").msgclass
|
97
102
|
EkmConnection::KeyManagementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.EkmConnection.KeyManagementMode").enummodule
|
98
103
|
EkmConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.EkmConfig").msgclass
|
104
|
+
VerifyConnectivityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.VerifyConnectivityRequest").msgclass
|
105
|
+
VerifyConnectivityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.VerifyConnectivityResponse").msgclass
|
99
106
|
end
|
100
107
|
end
|
101
108
|
end
|
@@ -53,6 +53,12 @@ module Google
|
|
53
53
|
# Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource
|
54
54
|
# for a given project and location.
|
55
55
|
rpc :UpdateEkmConfig, ::Google::Cloud::Kms::V1::UpdateEkmConfigRequest, ::Google::Cloud::Kms::V1::EkmConfig
|
56
|
+
# Verifies that Cloud KMS can successfully connect to the external key
|
57
|
+
# manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection].
|
58
|
+
# If there is an error connecting to the EKM, this method returns a
|
59
|
+
# FAILED_PRECONDITION status containing structured information as described
|
60
|
+
# at https://cloud.google.com/kms/docs/reference/ekm_errors.
|
61
|
+
rpc :VerifyConnectivity, ::Google::Cloud::Kms::V1::VerifyConnectivityRequest, ::Google::Cloud::Kms::V1::VerifyConnectivityResponse
|
56
62
|
end
|
57
63
|
|
58
64
|
Stub = Service.rpc_stub_class
|
@@ -83,7 +83,7 @@ module Google
|
|
83
83
|
# long-running operation pattern.
|
84
84
|
# @!attribute [rw] new_issue_uri
|
85
85
|
# @return [::String]
|
86
|
-
# Link to a
|
86
|
+
# Link to a *public* URI where users can report issues. Example:
|
87
87
|
# https://issuetracker.google.com/issues/new?component=190865&template=1161103
|
88
88
|
# @!attribute [rw] documentation_uri
|
89
89
|
# @return [::String]
|
@@ -353,6 +353,15 @@ module Google
|
|
353
353
|
|
354
354
|
# Street View Org.
|
355
355
|
STREET_VIEW = 4
|
356
|
+
|
357
|
+
# Shopping Org.
|
358
|
+
SHOPPING = 5
|
359
|
+
|
360
|
+
# Geo Org.
|
361
|
+
GEO = 6
|
362
|
+
|
363
|
+
# Generative AI - https://developers.generativeai.google
|
364
|
+
GENERATIVE_AI = 7
|
356
365
|
end
|
357
366
|
|
358
367
|
# To where should client libraries be published?
|
@@ -321,6 +321,24 @@ module Google
|
|
321
321
|
include ::Google::Protobuf::MessageExts
|
322
322
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
323
323
|
end
|
324
|
+
|
325
|
+
# Request message for
|
326
|
+
# {::Google::Cloud::Kms::V1::EkmService::Client#verify_connectivity EkmService.VerifyConnectivity}.
|
327
|
+
# @!attribute [rw] name
|
328
|
+
# @return [::String]
|
329
|
+
# Required. The {::Google::Cloud::Kms::V1::EkmConnection#name name} of the
|
330
|
+
# {::Google::Cloud::Kms::V1::EkmConnection EkmConnection} to verify.
|
331
|
+
class VerifyConnectivityRequest
|
332
|
+
include ::Google::Protobuf::MessageExts
|
333
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
334
|
+
end
|
335
|
+
|
336
|
+
# Response message for
|
337
|
+
# {::Google::Cloud::Kms::V1::EkmService::Client#verify_connectivity EkmService.VerifyConnectivity}.
|
338
|
+
class VerifyConnectivityResponse
|
339
|
+
include ::Google::Protobuf::MessageExts
|
340
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
341
|
+
end
|
324
342
|
end
|
325
343
|
end
|
326
344
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-kms-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.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-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|