google-cloud-kms-v1 0.25.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +3 -3
  4. data/lib/google/cloud/kms/v1/autokey/client.rb +713 -0
  5. data/lib/google/cloud/kms/v1/autokey/credentials.rb +52 -0
  6. data/lib/google/cloud/kms/v1/autokey/operations.rb +809 -0
  7. data/lib/google/cloud/kms/v1/autokey/paths.rb +90 -0
  8. data/lib/google/cloud/kms/v1/autokey/rest/client.rb +675 -0
  9. data/lib/google/cloud/kms/v1/autokey/rest/operations.rb +902 -0
  10. data/lib/google/cloud/kms/v1/autokey/rest/service_stub.rb +247 -0
  11. data/lib/google/cloud/kms/v1/autokey/rest.rb +70 -0
  12. data/lib/google/cloud/kms/v1/autokey.rb +72 -0
  13. data/lib/google/cloud/kms/v1/autokey_admin/client.rb +677 -0
  14. data/lib/google/cloud/kms/v1/autokey_admin/credentials.rb +52 -0
  15. data/lib/google/cloud/kms/v1/autokey_admin/paths.rb +61 -0
  16. data/lib/google/cloud/kms/v1/autokey_admin/rest/client.rb +639 -0
  17. data/lib/google/cloud/kms/v1/autokey_admin/rest/service_stub.rb +247 -0
  18. data/lib/google/cloud/kms/v1/autokey_admin/rest.rb +59 -0
  19. data/lib/google/cloud/kms/v1/autokey_admin.rb +61 -0
  20. data/lib/google/cloud/kms/v1/autokey_admin_pb.rb +53 -0
  21. data/lib/google/cloud/kms/v1/autokey_admin_services_pb.rb +62 -0
  22. data/lib/google/cloud/kms/v1/autokey_pb.rb +53 -0
  23. data/lib/google/cloud/kms/v1/autokey_services_pb.rb +71 -0
  24. data/lib/google/cloud/kms/v1/bindings_override.rb +1 -1
  25. data/lib/google/cloud/kms/v1/ekm_service/client.rb +17 -7
  26. data/lib/google/cloud/kms/v1/ekm_service/rest/client.rb +17 -7
  27. data/lib/google/cloud/kms/v1/key_management_service/client.rb +59 -28
  28. data/lib/google/cloud/kms/v1/key_management_service/rest/client.rb +59 -28
  29. data/lib/google/cloud/kms/v1/resources_pb.rb +1 -1
  30. data/lib/google/cloud/kms/v1/rest.rb +3 -1
  31. data/lib/google/cloud/kms/v1/version.rb +1 -1
  32. data/lib/google/cloud/kms/v1.rb +4 -2
  33. data/proto_docs/google/api/client.rb +4 -0
  34. data/proto_docs/google/cloud/kms/v1/autokey.rb +123 -0
  35. data/proto_docs/google/cloud/kms/v1/autokey_admin.rb +99 -0
  36. data/proto_docs/google/cloud/kms/v1/resources.rb +9 -10
  37. data/proto_docs/google/longrunning/operations.rb +164 -0
  38. data/proto_docs/google/protobuf/empty.rb +34 -0
  39. data/proto_docs/google/rpc/status.rb +48 -0
  40. metadata +27 -2
@@ -0,0 +1,247 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 "google/cloud/kms/v1/autokey_admin_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Kms
24
+ module V1
25
+ module AutokeyAdmin
26
+ module Rest
27
+ ##
28
+ # REST service stub for the AutokeyAdmin service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
42
+ numeric_enums: true,
43
+ raise_faraday_errors: false
44
+ end
45
+
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
64
+ ##
65
+ # Baseline implementation for the update_autokey_config REST call
66
+ #
67
+ # @param request_pb [::Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest]
68
+ # A request object representing the call parameters. Required.
69
+ # @param options [::Gapic::CallOptions]
70
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
71
+ #
72
+ # @yield [result, operation] Access the result along with the TransportOperation object
73
+ # @yieldparam result [::Google::Cloud::Kms::V1::AutokeyConfig]
74
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
75
+ #
76
+ # @return [::Google::Cloud::Kms::V1::AutokeyConfig]
77
+ # A result object deserialized from the server's reply
78
+ def update_autokey_config request_pb, options = nil
79
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
80
+
81
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_autokey_config_request request_pb
82
+ query_string_params = if query_string_params.any?
83
+ query_string_params.to_h { |p| p.split "=", 2 }
84
+ else
85
+ {}
86
+ end
87
+
88
+ response = @client_stub.make_http_request(
89
+ verb,
90
+ uri: uri,
91
+ body: body || "",
92
+ params: query_string_params,
93
+ options: options
94
+ )
95
+ operation = ::Gapic::Rest::TransportOperation.new response
96
+ result = ::Google::Cloud::Kms::V1::AutokeyConfig.decode_json response.body, ignore_unknown_fields: true
97
+
98
+ yield result, operation if block_given?
99
+ result
100
+ end
101
+
102
+ ##
103
+ # Baseline implementation for the get_autokey_config REST call
104
+ #
105
+ # @param request_pb [::Google::Cloud::Kms::V1::GetAutokeyConfigRequest]
106
+ # A request object representing the call parameters. Required.
107
+ # @param options [::Gapic::CallOptions]
108
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
109
+ #
110
+ # @yield [result, operation] Access the result along with the TransportOperation object
111
+ # @yieldparam result [::Google::Cloud::Kms::V1::AutokeyConfig]
112
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
113
+ #
114
+ # @return [::Google::Cloud::Kms::V1::AutokeyConfig]
115
+ # A result object deserialized from the server's reply
116
+ def get_autokey_config request_pb, options = nil
117
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
118
+
119
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_autokey_config_request request_pb
120
+ query_string_params = if query_string_params.any?
121
+ query_string_params.to_h { |p| p.split "=", 2 }
122
+ else
123
+ {}
124
+ end
125
+
126
+ response = @client_stub.make_http_request(
127
+ verb,
128
+ uri: uri,
129
+ body: body || "",
130
+ params: query_string_params,
131
+ options: options
132
+ )
133
+ operation = ::Gapic::Rest::TransportOperation.new response
134
+ result = ::Google::Cloud::Kms::V1::AutokeyConfig.decode_json response.body, ignore_unknown_fields: true
135
+
136
+ yield result, operation if block_given?
137
+ result
138
+ end
139
+
140
+ ##
141
+ # Baseline implementation for the show_effective_autokey_config REST call
142
+ #
143
+ # @param request_pb [::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest]
144
+ # A request object representing the call parameters. Required.
145
+ # @param options [::Gapic::CallOptions]
146
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
147
+ #
148
+ # @yield [result, operation] Access the result along with the TransportOperation object
149
+ # @yieldparam result [::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse]
150
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
151
+ #
152
+ # @return [::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse]
153
+ # A result object deserialized from the server's reply
154
+ def show_effective_autokey_config request_pb, options = nil
155
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
156
+
157
+ verb, uri, query_string_params, body = ServiceStub.transcode_show_effective_autokey_config_request request_pb
158
+ query_string_params = if query_string_params.any?
159
+ query_string_params.to_h { |p| p.split "=", 2 }
160
+ else
161
+ {}
162
+ end
163
+
164
+ response = @client_stub.make_http_request(
165
+ verb,
166
+ uri: uri,
167
+ body: body || "",
168
+ params: query_string_params,
169
+ options: options
170
+ )
171
+ operation = ::Gapic::Rest::TransportOperation.new response
172
+ result = ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse.decode_json response.body, ignore_unknown_fields: true
173
+
174
+ yield result, operation if block_given?
175
+ result
176
+ end
177
+
178
+ ##
179
+ # @private
180
+ #
181
+ # GRPC transcoding helper method for the update_autokey_config REST call
182
+ #
183
+ # @param request_pb [::Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @return [Array(String, [String, nil], Hash{String => String})]
186
+ # Uri, Body, Query string parameters
187
+ def self.transcode_update_autokey_config_request request_pb
188
+ transcoder = Gapic::Rest::GrpcTranscoder.new
189
+ .with_bindings(
190
+ uri_method: :patch,
191
+ uri_template: "/v1/{autokey_config.name}",
192
+ body: "autokey_config",
193
+ matches: [
194
+ ["autokey_config.name", %r{^folders/[^/]+/autokeyConfig/?$}, false]
195
+ ]
196
+ )
197
+ transcoder.transcode request_pb
198
+ end
199
+
200
+ ##
201
+ # @private
202
+ #
203
+ # GRPC transcoding helper method for the get_autokey_config REST call
204
+ #
205
+ # @param request_pb [::Google::Cloud::Kms::V1::GetAutokeyConfigRequest]
206
+ # A request object representing the call parameters. Required.
207
+ # @return [Array(String, [String, nil], Hash{String => String})]
208
+ # Uri, Body, Query string parameters
209
+ def self.transcode_get_autokey_config_request request_pb
210
+ transcoder = Gapic::Rest::GrpcTranscoder.new
211
+ .with_bindings(
212
+ uri_method: :get,
213
+ uri_template: "/v1/{name}",
214
+ matches: [
215
+ ["name", %r{^folders/[^/]+/autokeyConfig/?$}, false]
216
+ ]
217
+ )
218
+ transcoder.transcode request_pb
219
+ end
220
+
221
+ ##
222
+ # @private
223
+ #
224
+ # GRPC transcoding helper method for the show_effective_autokey_config REST call
225
+ #
226
+ # @param request_pb [::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest]
227
+ # A request object representing the call parameters. Required.
228
+ # @return [Array(String, [String, nil], Hash{String => String})]
229
+ # Uri, Body, Query string parameters
230
+ def self.transcode_show_effective_autokey_config_request request_pb
231
+ transcoder = Gapic::Rest::GrpcTranscoder.new
232
+ .with_bindings(
233
+ uri_method: :get,
234
+ uri_template: "/v1/{parent}:showEffectiveAutokeyConfig",
235
+ matches: [
236
+ ["parent", %r{^projects/[^/]+/?$}, false]
237
+ ]
238
+ )
239
+ transcoder.transcode request_pb
240
+ end
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/kms/v1/version"
24
+ require "google/cloud/kms/v1/bindings_override"
25
+
26
+ require "google/cloud/kms/v1/autokey_admin/credentials"
27
+ require "google/cloud/kms/v1/autokey_admin/paths"
28
+ require "google/cloud/kms/v1/autokey_admin/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Kms
33
+ module V1
34
+ ##
35
+ # Provides interfaces for managing Cloud KMS Autokey folder-level
36
+ # configurations. A configuration is inherited by all descendent projects. A
37
+ # configuration at one folder overrides any other configurations in its
38
+ # ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
39
+ # Autokey, so that users working in a descendant project can request
40
+ # provisioned {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys}, ready for Customer
41
+ # Managed Encryption Key (CMEK) use, on-demand.
42
+ #
43
+ # To load this service and instantiate a REST client:
44
+ #
45
+ # require "google/cloud/kms/v1/autokey_admin/rest"
46
+ # client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new
47
+ #
48
+ module AutokeyAdmin
49
+ # Client for the REST transport
50
+ module Rest
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
59
+ require "google/cloud/kms/v1/autokey_admin/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/kms/v1/version"
24
+
25
+ require "google/cloud/kms/v1/autokey_admin/credentials"
26
+ require "google/cloud/kms/v1/autokey_admin/paths"
27
+ require "google/cloud/kms/v1/autokey_admin/client"
28
+ require "google/cloud/kms/v1/autokey_admin/rest"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Kms
33
+ module V1
34
+ ##
35
+ # Provides interfaces for managing Cloud KMS Autokey folder-level
36
+ # configurations. A configuration is inherited by all descendent projects. A
37
+ # configuration at one folder overrides any other configurations in its
38
+ # ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
39
+ # Autokey, so that users working in a descendant project can request
40
+ # provisioned {::Google::Cloud::Kms::V1::CryptoKey CryptoKeys}, ready for Customer
41
+ # Managed Encryption Key (CMEK) use, on-demand.
42
+ #
43
+ # @example Load this service and instantiate a gRPC client
44
+ #
45
+ # require "google/cloud/kms/v1/autokey_admin"
46
+ # client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Client.new
47
+ #
48
+ # @example Load this service and instantiate a REST client
49
+ #
50
+ # require "google/cloud/kms/v1/autokey_admin/rest"
51
+ # client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Rest::Client.new
52
+ #
53
+ module AutokeyAdmin
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+
60
+ helper_path = ::File.join __dir__, "autokey_admin", "helpers.rb"
61
+ require "google/cloud/kms/v1/autokey_admin/helpers" if ::File.file? helper_path
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/kms/v1/autokey_admin.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/protobuf/field_mask_pb'
12
+
13
+
14
+ descriptor_data = "\n\'google/cloud/kms/v1/autokey_admin.proto\x12\x13google.cloud.kms.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x93\x01\n\x1aUpdateAutokeyConfigRequest\x12?\n\x0e\x61utokey_config\x18\x01 \x01(\x0b\x32\".google.cloud.kms.v1.AutokeyConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"V\n\x17GetAutokeyConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudkms.googleapis.com/AutokeyConfig\"\xa7\x01\n\rAutokeyConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bkey_project\x18\x02 \x01(\tB\x03\xe0\x41\x01:i\xea\x41\x66\n%cloudkms.googleapis.com/AutokeyConfig\x12\x1e\x66olders/{folder}/autokeyConfig*\x0e\x61utokeyConfigs2\rautokeyConfig\"h\n!ShowEffectiveAutokeyConfigRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"9\n\"ShowEffectiveAutokeyConfigResponse\x12\x13\n\x0bkey_project\x18\x01 \x01(\t2\xc8\x05\n\x0c\x41utokeyAdmin\x12\xd2\x01\n\x13UpdateAutokeyConfig\x12/.google.cloud.kms.v1.UpdateAutokeyConfigRequest\x1a\".google.cloud.kms.v1.AutokeyConfig\"f\xda\x41\x1a\x61utokey_config,update_mask\x82\xd3\xe4\x93\x02\x43\x32\x31/v1/{autokey_config.name=folders/*/autokeyConfig}:\x0e\x61utokey_config\x12\x97\x01\n\x10GetAutokeyConfig\x12,.google.cloud.kms.v1.GetAutokeyConfigRequest\x1a\".google.cloud.kms.v1.AutokeyConfig\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=folders/*/autokeyConfig}\x12\xd2\x01\n\x1aShowEffectiveAutokeyConfig\x12\x36.google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest\x1a\x37.google.cloud.kms.v1.ShowEffectiveAutokeyConfigResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*}:showEffectiveAutokeyConfig\x1at\xca\x41\x17\x63loudkms.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsBY\n\x17\x63om.google.cloud.kms.v1B\x11\x41utokeyAdminProtoP\x01Z)cloud.google.com/go/kms/apiv1/kmspb;kmspbb\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
35
+ end
36
+ end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
39
+ end
40
+
41
+ module Google
42
+ module Cloud
43
+ module Kms
44
+ module V1
45
+ UpdateAutokeyConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.UpdateAutokeyConfigRequest").msgclass
46
+ GetAutokeyConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.GetAutokeyConfigRequest").msgclass
47
+ AutokeyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.AutokeyConfig").msgclass
48
+ ShowEffectiveAutokeyConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest").msgclass
49
+ ShowEffectiveAutokeyConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.ShowEffectiveAutokeyConfigResponse").msgclass
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,62 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/kms/v1/autokey_admin.proto for package 'google.cloud.kms.v1'
3
+ # Original file comments:
4
+ # Copyright 2024 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/kms/v1/autokey_admin_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Kms
25
+ module V1
26
+ module AutokeyAdmin
27
+ # Provides interfaces for managing Cloud KMS Autokey folder-level
28
+ # configurations. A configuration is inherited by all descendent projects. A
29
+ # configuration at one folder overrides any other configurations in its
30
+ # ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
31
+ # Autokey, so that users working in a descendant project can request
32
+ # provisioned [CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer
33
+ # Managed Encryption Key (CMEK) use, on-demand.
34
+ class Service
35
+
36
+ include ::GRPC::GenericService
37
+
38
+ self.marshal_class_method = :encode
39
+ self.unmarshal_class_method = :decode
40
+ self.service_name = 'google.cloud.kms.v1.AutokeyAdmin'
41
+
42
+ # Updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a
43
+ # folder. The caller must have both `cloudkms.autokeyConfigs.update`
44
+ # permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy`
45
+ # permission on the provided key project. A
46
+ # [KeyHandle][google.cloud.kms.v1.KeyHandle] creation in the folder's
47
+ # descendant projects will use this configuration to determine where to
48
+ # create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey].
49
+ rpc :UpdateAutokeyConfig, ::Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest, ::Google::Cloud::Kms::V1::AutokeyConfig
50
+ # Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a
51
+ # folder.
52
+ rpc :GetAutokeyConfig, ::Google::Cloud::Kms::V1::GetAutokeyConfigRequest, ::Google::Cloud::Kms::V1::AutokeyConfig
53
+ # Returns the effective Cloud KMS Autokey configuration for a given project.
54
+ rpc :ShowEffectiveAutokeyConfig, ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest, ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse
55
+ end
56
+
57
+ Stub = Service.rpc_stub_class
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/kms/v1/autokey.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/longrunning/operations_pb'
12
+
13
+
14
+ descriptor_data = "\n!google/cloud/kms/v1/autokey.proto\x12\x13google.cloud.kms.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\"\xa8\x01\n\x16\x43reateKeyHandleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rkey_handle_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x37\n\nkey_handle\x18\x03 \x01(\x0b\x32\x1e.google.cloud.kms.v1.KeyHandleB\x03\xe0\x41\x02\"N\n\x13GetKeyHandleRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/KeyHandle\"\xff\x01\n\tKeyHandle\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12:\n\x07kms_key\x18\x03 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12#\n\x16resource_type_selector\x18\x04 \x01(\tB\x03\xe0\x41\x02:~\xea\x41{\n!cloudkms.googleapis.com/KeyHandle\x12?projects/{project}/locations/{location}/keyHandles/{key_handle}*\nkeyHandles2\tkeyHandle\"\x19\n\x17\x43reateKeyHandleMetadata\"g\n\x15ListKeyHandlesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"M\n\x16ListKeyHandlesResponse\x12\x33\n\x0bkey_handles\x18\x01 \x03(\x0b\x32\x1e.google.cloud.kms.v1.KeyHandle2\xb4\x05\n\x07\x41utokey\x12\xeb\x01\n\x0f\x43reateKeyHandle\x12+.google.cloud.kms.v1.CreateKeyHandleRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41$\n\tKeyHandle\x12\x17\x43reateKeyHandleMetadata\xda\x41\x1fparent,key_handle,key_handle_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/keyHandles:\nkey_handle\x12\x97\x01\n\x0cGetKeyHandle\x12(.google.cloud.kms.v1.GetKeyHandleRequest\x1a\x1e.google.cloud.kms.v1.KeyHandle\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/keyHandles/*}\x12\xaa\x01\n\x0eListKeyHandles\x12*.google.cloud.kms.v1.ListKeyHandlesRequest\x1a+.google.cloud.kms.v1.ListKeyHandlesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/keyHandles\x1at\xca\x41\x17\x63loudkms.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsBT\n\x17\x63om.google.cloud.kms.v1B\x0c\x41utokeyProtoP\x01Z)cloud.google.com/go/kms/apiv1/kmspb;kmspbb\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
+ end
35
+ end
36
+ warn "Each proto file must use a consistent fully-qualified name."
37
+ warn "This will become an error in the next major version."
38
+ end
39
+
40
+ module Google
41
+ module Cloud
42
+ module Kms
43
+ module V1
44
+ CreateKeyHandleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CreateKeyHandleRequest").msgclass
45
+ GetKeyHandleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.GetKeyHandleRequest").msgclass
46
+ KeyHandle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.KeyHandle").msgclass
47
+ CreateKeyHandleMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CreateKeyHandleMetadata").msgclass
48
+ ListKeyHandlesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.ListKeyHandlesRequest").msgclass
49
+ ListKeyHandlesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.ListKeyHandlesResponse").msgclass
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,71 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/kms/v1/autokey.proto for package 'google.cloud.kms.v1'
3
+ # Original file comments:
4
+ # Copyright 2024 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/kms/v1/autokey_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Kms
25
+ module V1
26
+ module Autokey
27
+ # Provides interfaces for using Cloud KMS Autokey to provision new
28
+ # [CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer Managed
29
+ # Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
30
+ # feature is modeled around a [KeyHandle][google.cloud.kms.v1.KeyHandle]
31
+ # resource: creating a [KeyHandle][google.cloud.kms.v1.KeyHandle] in a resource
32
+ # project and given location triggers Cloud KMS Autokey to provision a
33
+ # [CryptoKey][google.cloud.kms.v1.CryptoKey] in the configured key project and
34
+ # the same location.
35
+ #
36
+ # Prior to use in a given resource project,
37
+ # [UpdateAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.UpdateAutokeyConfig]
38
+ # should have been called on an ancestor folder, setting the key project where
39
+ # Cloud KMS Autokey should create new
40
+ # [CryptoKeys][google.cloud.kms.v1.CryptoKey]. See documentation for additional
41
+ # prerequisites. To check what key project, if any, is currently configured on
42
+ # a resource project's ancestor folder, see
43
+ # [ShowEffectiveAutokeyConfig][google.cloud.kms.v1.AutokeyAdmin.ShowEffectiveAutokeyConfig].
44
+ class Service
45
+
46
+ include ::GRPC::GenericService
47
+
48
+ self.marshal_class_method = :encode
49
+ self.unmarshal_class_method = :decode
50
+ self.service_name = 'google.cloud.kms.v1.Autokey'
51
+
52
+ # Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the
53
+ # provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK
54
+ # use with the given resource type in the configured key project and the same
55
+ # location. [GetOperation][Operations.GetOperation] should be used to resolve
56
+ # the resulting long-running operation and get the resulting
57
+ # [KeyHandle][google.cloud.kms.v1.KeyHandle] and
58
+ # [CryptoKey][google.cloud.kms.v1.CryptoKey].
59
+ rpc :CreateKeyHandle, ::Google::Cloud::Kms::V1::CreateKeyHandleRequest, ::Google::Longrunning::Operation
60
+ # Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle].
61
+ rpc :GetKeyHandle, ::Google::Cloud::Kms::V1::GetKeyHandleRequest, ::Google::Cloud::Kms::V1::KeyHandle
62
+ # Lists [KeyHandles][google.cloud.kms.v1.KeyHandle].
63
+ rpc :ListKeyHandles, ::Google::Cloud::Kms::V1::ListKeyHandlesRequest, ::Google::Cloud::Kms::V1::ListKeyHandlesResponse
64
+ end
65
+
66
+ Stub = Service.rpc_stub_class
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -25,7 +25,7 @@ module Google
25
25
  # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
26
  #
27
27
  # require "google/cloud/kms/v1/rest"
28
- # client = ::Google::Cloud::Kms::V1::EkmService::Rest::Client.new
28
+ # client = ::Google::Cloud::Kms::V1::Autokey::Rest::Client.new
29
29
  #
30
30
  module V1
31
31
  ##