google-cloud-kms-v1 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/kms/v1/autokey/client.rb +31 -4
- data/lib/google/cloud/kms/v1/autokey/operations.rb +12 -15
- data/lib/google/cloud/kms/v1/autokey/rest/client.rb +31 -4
- data/lib/google/cloud/kms/v1/autokey/rest/operations.rb +43 -38
- data/lib/google/cloud/kms/v1/autokey/rest/service_stub.rb +38 -20
- data/lib/google/cloud/kms/v1/autokey_admin/client.rb +29 -4
- data/lib/google/cloud/kms/v1/autokey_admin/rest/client.rb +29 -4
- data/lib/google/cloud/kms/v1/autokey_admin/rest/service_stub.rb +38 -20
- data/lib/google/cloud/kms/v1/ekm_service/client.rb +30 -8
- data/lib/google/cloud/kms/v1/ekm_service/rest/client.rb +30 -8
- data/lib/google/cloud/kms/v1/ekm_service/rest/service_stub.rb +70 -44
- data/lib/google/cloud/kms/v1/ekm_service_pb.rb +1 -1
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +33 -29
- data/lib/google/cloud/kms/v1/key_management_service/rest/client.rb +33 -29
- data/lib/google/cloud/kms/v1/key_management_service/rest/service_stub.rb +238 -170
- data/lib/google/cloud/kms/v1/resources_pb.rb +1 -1
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/kms/v1/resources.rb +2 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the list_ekm_connections REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "list_ekm_connections",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Kms::V1::ListEkmConnectionsResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_ekm_connection",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::Kms::V1::EkmConnection.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "create_ekm_connection",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::Kms::V1::EkmConnection.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "update_ekm_connection",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Cloud::Kms::V1::EkmConnection.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "get_ekm_config",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Cloud::Kms::V1::EkmConfig.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "update_ekm_config",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Cloud::Kms::V1::EkmConfig.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "verify_connectivity",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Cloud::Kms::V1::VerifyConnectivityResponse.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -12,7 +12,7 @@ require 'google/protobuf/field_mask_pb'
|
|
12
12
|
require 'google/protobuf/timestamp_pb'
|
13
13
|
|
14
14
|
|
15
|
-
descriptor_data = "\n%google/cloud/kms/v1/ekm_service.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\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x19ListEkmConnectionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1aListEkmConnectionsResponse\x12;\n\x0f\x65km_connections\x18\x01 \x03(\x0b\x32\".google.cloud.kms.v1.EkmConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"V\n\x17GetEkmConnectionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudkms.googleapis.com/EkmConnection\"\xb8\x01\n\x1a\x43reateEkmConnectionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1e\n\x11\x65km_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0e\x65km_connection\x18\x03 \x01(\x0b\x32\".google.cloud.kms.v1.EkmConnectionB\x03\xe0\x41\x02\"\x93\x01\n\x1aUpdateEkmConnectionRequest\x12?\n\x0e\x65km_connection\x18\x01 \x01(\x0b\x32\".google.cloud.kms.v1.EkmConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x13GetEkmConfigRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/EkmConfig\"\x87\x01\n\x16UpdateEkmConfigRequest\x12\x37\n\nekm_config\x18\x01 \x01(\x0b\x32\x1e.google.cloud.kms.v1.EkmConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xbf\x02\n\x0b\x43\x65rtificate\x12\x14\n\x07raw_der\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x13\n\x06parsed\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06issuer\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07subject\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1dsubject_alternative_dns_names\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12\x38\n\x0fnot_before_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0enot_after_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rserial_number\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12sha256_fingerprint\x18\t \x01(\tB\x03\xe0\x41\x03\"\xe2\x05\n\rEkmConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x11service_resolvers\x18\x03 \x03(\x0b\x32\x32.google.cloud.kms.v1.EkmConnection.ServiceResolverB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12V\n\x13key_management_mode\x18\x06 \x01(\x0e\x32\x34.google.cloud.kms.v1.EkmConnection.KeyManagementModeB\x03\xe0\x41\x01\x12\x1e\n\x11\x63rypto_space_path\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xde\x01\n\x0fServiceResolver\x12R\n\x19service_directory_service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x1c\n\x0f\x65ndpoint_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08hostname\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x13server_certificates\x18\x04 \x03(\x0b\x32 .google.cloud.kms.v1.CertificateB\x03\xe0\x41\x02\"S\n\x11KeyManagementMode\x12#\n\x1fKEY_MANAGEMENT_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tCLOUD_KMS\x10\x02:s\xea\x41p\n%cloudkms.googleapis.com/EkmConnection\x12Gprojects/{project}/locations/{location}/ekmConnections/{ekm_connection}\"\xc8\x01\n\tEkmConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12M\n\x16\x64\x65\x66\x61ult_ekm_connection\x18\x02 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%cloudkms.googleapis.com/EkmConnection:Y\xea\x41V\n!cloudkms.googleapis.com/EkmConfig\x12\x31projects/{project}/locations/{location}/ekmConfig\"X\n\x19VerifyConnectivityRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudkms.googleapis.com/EkmConnection\"\x1c\n\x1aVerifyConnectivityResponse2\xdc\x0b\n\nEkmService\x12\xba\x01\n\x12ListEkmConnections\x12..google.cloud.kms.v1.ListEkmConnectionsRequest\x1a/.google.cloud.kms.v1.ListEkmConnectionsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/ekmConnections\x12\xa7\x01\n\x10GetEkmConnection\x12,.google.cloud.kms.v1.GetEkmConnectionRequest\x1a\".google.cloud.kms.v1.EkmConnection\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/ekmConnections/*}\x12\xe0\x01\n\x13\x43reateEkmConnection\x12/.google.cloud.kms.v1.CreateEkmConnectionRequest\x1a\".google.cloud.kms.v1.EkmConnection\"t\xda\x41\'parent,ekm_connection_id,ekm_connection\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/ekmConnections:\x0e\x65km_connection\x12\xe2\x01\n\x13UpdateEkmConnection\x12/.google.cloud.kms.v1.UpdateEkmConnectionRequest\x1a\".google.cloud.kms.v1.EkmConnection\"v\xda\x41\x1a\x65km_connection,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}:\x0e\x65km_connection\x12\x94\x01\n\x0cGetEkmConfig\x12(.google.cloud.kms.v1.GetEkmConfigRequest\x1a\x1e.google.cloud.kms.v1.EkmConfig\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/ekmConfig}\x12\xc3\x01\n\x0fUpdateEkmConfig\x12+.google.cloud.kms.v1.UpdateEkmConfigRequest\x1a\x1e.google.cloud.kms.v1.EkmConfig\"c\xda\x41\x16\x65km_config,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x36/v1/{ekm_config.name=projects/*/locations/*/ekmConfig}:\nekm_config\x12\xcb\x01\n\x12VerifyConnectivity\x12..google.cloud.kms.v1.VerifyConnectivityRequest\x1a/.google.cloud.kms.v1.VerifyConnectivityResponse\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity\x1at\xca\x41\x17\x63loudkms.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsB\
|
15
|
+
descriptor_data = "\n%google/cloud/kms/v1/ekm_service.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\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x19ListEkmConnectionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x1aListEkmConnectionsResponse\x12;\n\x0f\x65km_connections\x18\x01 \x03(\x0b\x32\".google.cloud.kms.v1.EkmConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"V\n\x17GetEkmConnectionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudkms.googleapis.com/EkmConnection\"\xb8\x01\n\x1a\x43reateEkmConnectionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1e\n\x11\x65km_connection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0e\x65km_connection\x18\x03 \x01(\x0b\x32\".google.cloud.kms.v1.EkmConnectionB\x03\xe0\x41\x02\"\x93\x01\n\x1aUpdateEkmConnectionRequest\x12?\n\x0e\x65km_connection\x18\x01 \x01(\x0b\x32\".google.cloud.kms.v1.EkmConnectionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x13GetEkmConfigRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/EkmConfig\"\x87\x01\n\x16UpdateEkmConfigRequest\x12\x37\n\nekm_config\x18\x01 \x01(\x0b\x32\x1e.google.cloud.kms.v1.EkmConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xbf\x02\n\x0b\x43\x65rtificate\x12\x14\n\x07raw_der\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x13\n\x06parsed\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06issuer\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07subject\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1dsubject_alternative_dns_names\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12\x38\n\x0fnot_before_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0enot_after_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rserial_number\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12sha256_fingerprint\x18\t \x01(\tB\x03\xe0\x41\x03\"\xe2\x05\n\rEkmConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x11service_resolvers\x18\x03 \x03(\x0b\x32\x32.google.cloud.kms.v1.EkmConnection.ServiceResolverB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12V\n\x13key_management_mode\x18\x06 \x01(\x0e\x32\x34.google.cloud.kms.v1.EkmConnection.KeyManagementModeB\x03\xe0\x41\x01\x12\x1e\n\x11\x63rypto_space_path\x18\x07 \x01(\tB\x03\xe0\x41\x01\x1a\xde\x01\n\x0fServiceResolver\x12R\n\x19service_directory_service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x1c\n\x0f\x65ndpoint_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08hostname\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x13server_certificates\x18\x04 \x03(\x0b\x32 .google.cloud.kms.v1.CertificateB\x03\xe0\x41\x02\"S\n\x11KeyManagementMode\x12#\n\x1fKEY_MANAGEMENT_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06MANUAL\x10\x01\x12\r\n\tCLOUD_KMS\x10\x02:s\xea\x41p\n%cloudkms.googleapis.com/EkmConnection\x12Gprojects/{project}/locations/{location}/ekmConnections/{ekm_connection}\"\xc8\x01\n\tEkmConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12M\n\x16\x64\x65\x66\x61ult_ekm_connection\x18\x02 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%cloudkms.googleapis.com/EkmConnection:Y\xea\x41V\n!cloudkms.googleapis.com/EkmConfig\x12\x31projects/{project}/locations/{location}/ekmConfig\"X\n\x19VerifyConnectivityRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudkms.googleapis.com/EkmConnection\"\x1c\n\x1aVerifyConnectivityResponse2\xdc\x0b\n\nEkmService\x12\xba\x01\n\x12ListEkmConnections\x12..google.cloud.kms.v1.ListEkmConnectionsRequest\x1a/.google.cloud.kms.v1.ListEkmConnectionsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/ekmConnections\x12\xa7\x01\n\x10GetEkmConnection\x12,.google.cloud.kms.v1.GetEkmConnectionRequest\x1a\".google.cloud.kms.v1.EkmConnection\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/ekmConnections/*}\x12\xe0\x01\n\x13\x43reateEkmConnection\x12/.google.cloud.kms.v1.CreateEkmConnectionRequest\x1a\".google.cloud.kms.v1.EkmConnection\"t\xda\x41\'parent,ekm_connection_id,ekm_connection\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/ekmConnections:\x0e\x65km_connection\x12\xe2\x01\n\x13UpdateEkmConnection\x12/.google.cloud.kms.v1.UpdateEkmConnectionRequest\x1a\".google.cloud.kms.v1.EkmConnection\"v\xda\x41\x1a\x65km_connection,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}:\x0e\x65km_connection\x12\x94\x01\n\x0cGetEkmConfig\x12(.google.cloud.kms.v1.GetEkmConfigRequest\x1a\x1e.google.cloud.kms.v1.EkmConfig\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/ekmConfig}\x12\xc3\x01\n\x0fUpdateEkmConfig\x12+.google.cloud.kms.v1.UpdateEkmConfigRequest\x1a\x1e.google.cloud.kms.v1.EkmConfig\"c\xda\x41\x16\x65km_config,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x36/v1/{ekm_config.name=projects/*/locations/*/ekmConfig}:\nekm_config\x12\xcb\x01\n\x12VerifyConnectivity\x12..google.cloud.kms.v1.VerifyConnectivityRequest\x1a/.google.cloud.kms.v1.VerifyConnectivityResponse\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity\x1at\xca\x41\x17\x63loudkms.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsB\x82\x02\n\x17\x63om.google.cloud.kms.v1B\x0f\x45kmServiceProtoP\x01Z)cloud.google.com/go/kms/apiv1/kmspb;kmspb\xaa\x02\x13Google.Cloud.Kms.V1\xca\x02\x13Google\\Cloud\\Kms\\V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3"
|
16
16
|
|
17
17
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
18
18
|
|
@@ -294,14 +294,26 @@ module Google
|
|
294
294
|
universe_domain: @config.universe_domain,
|
295
295
|
channel_args: @config.channel_args,
|
296
296
|
interceptors: @config.interceptors,
|
297
|
-
channel_pool_config: @config.channel_pool
|
297
|
+
channel_pool_config: @config.channel_pool,
|
298
|
+
logger: @config.logger
|
298
299
|
)
|
299
300
|
|
301
|
+
@key_management_service_stub.stub_logger&.info do |entry|
|
302
|
+
entry.set_system_name
|
303
|
+
entry.set_service
|
304
|
+
entry.message = "Created client for #{entry.service}"
|
305
|
+
entry.set_credentials_fields credentials
|
306
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
307
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
308
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
309
|
+
end
|
310
|
+
|
300
311
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
301
312
|
config.credentials = credentials
|
302
313
|
config.quota_project = @quota_project_id
|
303
314
|
config.endpoint = @key_management_service_stub.endpoint
|
304
315
|
config.universe_domain = @key_management_service_stub.universe_domain
|
316
|
+
config.logger = @key_management_service_stub.logger if config.respond_to? :logger=
|
305
317
|
end
|
306
318
|
|
307
319
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -309,6 +321,7 @@ module Google
|
|
309
321
|
config.quota_project = @quota_project_id
|
310
322
|
config.endpoint = @key_management_service_stub.endpoint
|
311
323
|
config.universe_domain = @key_management_service_stub.universe_domain
|
324
|
+
config.logger = @key_management_service_stub.logger if config.respond_to? :logger=
|
312
325
|
end
|
313
326
|
end
|
314
327
|
|
@@ -326,6 +339,15 @@ module Google
|
|
326
339
|
#
|
327
340
|
attr_reader :iam_policy_client
|
328
341
|
|
342
|
+
##
|
343
|
+
# The logger used for request/response debug logging.
|
344
|
+
#
|
345
|
+
# @return [Logger]
|
346
|
+
#
|
347
|
+
def logger
|
348
|
+
@key_management_service_stub.logger
|
349
|
+
end
|
350
|
+
|
329
351
|
# Service calls
|
330
352
|
|
331
353
|
##
|
@@ -436,7 +458,7 @@ module Google
|
|
436
458
|
@key_management_service_stub.call_rpc :list_key_rings, request, options: options do |response, operation|
|
437
459
|
response = ::Gapic::PagedEnumerable.new @key_management_service_stub, :list_key_rings, request, response, operation, options
|
438
460
|
yield response, operation if block_given?
|
439
|
-
|
461
|
+
throw :response, response
|
440
462
|
end
|
441
463
|
rescue ::GRPC::BadStatus => e
|
442
464
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -551,7 +573,7 @@ module Google
|
|
551
573
|
@key_management_service_stub.call_rpc :list_crypto_keys, request, options: options do |response, operation|
|
552
574
|
response = ::Gapic::PagedEnumerable.new @key_management_service_stub, :list_crypto_keys, request, response, operation, options
|
553
575
|
yield response, operation if block_given?
|
554
|
-
|
576
|
+
throw :response, response
|
555
577
|
end
|
556
578
|
rescue ::GRPC::BadStatus => e
|
557
579
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -667,7 +689,7 @@ module Google
|
|
667
689
|
@key_management_service_stub.call_rpc :list_crypto_key_versions, request, options: options do |response, operation|
|
668
690
|
response = ::Gapic::PagedEnumerable.new @key_management_service_stub, :list_crypto_key_versions, request, response, operation, options
|
669
691
|
yield response, operation if block_given?
|
670
|
-
|
692
|
+
throw :response, response
|
671
693
|
end
|
672
694
|
rescue ::GRPC::BadStatus => e
|
673
695
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -780,7 +802,7 @@ module Google
|
|
780
802
|
@key_management_service_stub.call_rpc :list_import_jobs, request, options: options do |response, operation|
|
781
803
|
response = ::Gapic::PagedEnumerable.new @key_management_service_stub, :list_import_jobs, request, response, operation, options
|
782
804
|
yield response, operation if block_given?
|
783
|
-
|
805
|
+
throw :response, response
|
784
806
|
end
|
785
807
|
rescue ::GRPC::BadStatus => e
|
786
808
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -867,7 +889,6 @@ module Google
|
|
867
889
|
|
868
890
|
@key_management_service_stub.call_rpc :get_key_ring, request, options: options do |response, operation|
|
869
891
|
yield response, operation if block_given?
|
870
|
-
return response
|
871
892
|
end
|
872
893
|
rescue ::GRPC::BadStatus => e
|
873
894
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -956,7 +977,6 @@ module Google
|
|
956
977
|
|
957
978
|
@key_management_service_stub.call_rpc :get_crypto_key, request, options: options do |response, operation|
|
958
979
|
yield response, operation if block_given?
|
959
|
-
return response
|
960
980
|
end
|
961
981
|
rescue ::GRPC::BadStatus => e
|
962
982
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1044,7 +1064,6 @@ module Google
|
|
1044
1064
|
|
1045
1065
|
@key_management_service_stub.call_rpc :get_crypto_key_version, request, options: options do |response, operation|
|
1046
1066
|
yield response, operation if block_given?
|
1047
|
-
return response
|
1048
1067
|
end
|
1049
1068
|
rescue ::GRPC::BadStatus => e
|
1050
1069
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1136,7 +1155,6 @@ module Google
|
|
1136
1155
|
|
1137
1156
|
@key_management_service_stub.call_rpc :get_public_key, request, options: options do |response, operation|
|
1138
1157
|
yield response, operation if block_given?
|
1139
|
-
return response
|
1140
1158
|
end
|
1141
1159
|
rescue ::GRPC::BadStatus => e
|
1142
1160
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1223,7 +1241,6 @@ module Google
|
|
1223
1241
|
|
1224
1242
|
@key_management_service_stub.call_rpc :get_import_job, request, options: options do |response, operation|
|
1225
1243
|
yield response, operation if block_given?
|
1226
|
-
return response
|
1227
1244
|
end
|
1228
1245
|
rescue ::GRPC::BadStatus => e
|
1229
1246
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1318,7 +1335,6 @@ module Google
|
|
1318
1335
|
|
1319
1336
|
@key_management_service_stub.call_rpc :create_key_ring, request, options: options do |response, operation|
|
1320
1337
|
yield response, operation if block_given?
|
1321
|
-
return response
|
1322
1338
|
end
|
1323
1339
|
rescue ::GRPC::BadStatus => e
|
1324
1340
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1425,7 +1441,6 @@ module Google
|
|
1425
1441
|
|
1426
1442
|
@key_management_service_stub.call_rpc :create_crypto_key, request, options: options do |response, operation|
|
1427
1443
|
yield response, operation if block_given?
|
1428
|
-
return response
|
1429
1444
|
end
|
1430
1445
|
rescue ::GRPC::BadStatus => e
|
1431
1446
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1521,7 +1536,6 @@ module Google
|
|
1521
1536
|
|
1522
1537
|
@key_management_service_stub.call_rpc :create_crypto_key_version, request, options: options do |response, operation|
|
1523
1538
|
yield response, operation if block_given?
|
1524
|
-
return response
|
1525
1539
|
end
|
1526
1540
|
rescue ::GRPC::BadStatus => e
|
1527
1541
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1694,7 +1708,6 @@ module Google
|
|
1694
1708
|
|
1695
1709
|
@key_management_service_stub.call_rpc :import_crypto_key_version, request, options: options do |response, operation|
|
1696
1710
|
yield response, operation if block_given?
|
1697
|
-
return response
|
1698
1711
|
end
|
1699
1712
|
rescue ::GRPC::BadStatus => e
|
1700
1713
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1792,7 +1805,6 @@ module Google
|
|
1792
1805
|
|
1793
1806
|
@key_management_service_stub.call_rpc :create_import_job, request, options: options do |response, operation|
|
1794
1807
|
yield response, operation if block_given?
|
1795
|
-
return response
|
1796
1808
|
end
|
1797
1809
|
rescue ::GRPC::BadStatus => e
|
1798
1810
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1880,7 +1892,6 @@ module Google
|
|
1880
1892
|
|
1881
1893
|
@key_management_service_stub.call_rpc :update_crypto_key, request, options: options do |response, operation|
|
1882
1894
|
yield response, operation if block_given?
|
1883
|
-
return response
|
1884
1895
|
end
|
1885
1896
|
rescue ::GRPC::BadStatus => e
|
1886
1897
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1980,7 +1991,6 @@ module Google
|
|
1980
1991
|
|
1981
1992
|
@key_management_service_stub.call_rpc :update_crypto_key_version, request, options: options do |response, operation|
|
1982
1993
|
yield response, operation if block_given?
|
1983
|
-
return response
|
1984
1994
|
end
|
1985
1995
|
rescue ::GRPC::BadStatus => e
|
1986
1996
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2075,7 +2085,6 @@ module Google
|
|
2075
2085
|
|
2076
2086
|
@key_management_service_stub.call_rpc :update_crypto_key_primary_version, request, options: options do |response, operation|
|
2077
2087
|
yield response, operation if block_given?
|
2078
|
-
return response
|
2079
2088
|
end
|
2080
2089
|
rescue ::GRPC::BadStatus => e
|
2081
2090
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2182,7 +2191,6 @@ module Google
|
|
2182
2191
|
|
2183
2192
|
@key_management_service_stub.call_rpc :destroy_crypto_key_version, request, options: options do |response, operation|
|
2184
2193
|
yield response, operation if block_given?
|
2185
|
-
return response
|
2186
2194
|
end
|
2187
2195
|
rescue ::GRPC::BadStatus => e
|
2188
2196
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2277,7 +2285,6 @@ module Google
|
|
2277
2285
|
|
2278
2286
|
@key_management_service_stub.call_rpc :restore_crypto_key_version, request, options: options do |response, operation|
|
2279
2287
|
yield response, operation if block_given?
|
2280
|
-
return response
|
2281
2288
|
end
|
2282
2289
|
rescue ::GRPC::BadStatus => e
|
2283
2290
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2438,7 +2445,6 @@ module Google
|
|
2438
2445
|
|
2439
2446
|
@key_management_service_stub.call_rpc :encrypt, request, options: options do |response, operation|
|
2440
2447
|
yield response, operation if block_given?
|
2441
|
-
return response
|
2442
2448
|
end
|
2443
2449
|
rescue ::GRPC::BadStatus => e
|
2444
2450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2575,7 +2581,6 @@ module Google
|
|
2575
2581
|
|
2576
2582
|
@key_management_service_stub.call_rpc :decrypt, request, options: options do |response, operation|
|
2577
2583
|
yield response, operation if block_given?
|
2578
|
-
return response
|
2579
2584
|
end
|
2580
2585
|
rescue ::GRPC::BadStatus => e
|
2581
2586
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2749,7 +2754,6 @@ module Google
|
|
2749
2754
|
|
2750
2755
|
@key_management_service_stub.call_rpc :raw_encrypt, request, options: options do |response, operation|
|
2751
2756
|
yield response, operation if block_given?
|
2752
|
-
return response
|
2753
2757
|
end
|
2754
2758
|
rescue ::GRPC::BadStatus => e
|
2755
2759
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2903,7 +2907,6 @@ module Google
|
|
2903
2907
|
|
2904
2908
|
@key_management_service_stub.call_rpc :raw_decrypt, request, options: options do |response, operation|
|
2905
2909
|
yield response, operation if block_given?
|
2906
|
-
return response
|
2907
2910
|
end
|
2908
2911
|
rescue ::GRPC::BadStatus => e
|
2909
2912
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3048,7 +3051,6 @@ module Google
|
|
3048
3051
|
|
3049
3052
|
@key_management_service_stub.call_rpc :asymmetric_sign, request, options: options do |response, operation|
|
3050
3053
|
yield response, operation if block_given?
|
3051
|
-
return response
|
3052
3054
|
end
|
3053
3055
|
rescue ::GRPC::BadStatus => e
|
3054
3056
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3164,7 +3166,6 @@ module Google
|
|
3164
3166
|
|
3165
3167
|
@key_management_service_stub.call_rpc :asymmetric_decrypt, request, options: options do |response, operation|
|
3166
3168
|
yield response, operation if block_given?
|
3167
|
-
return response
|
3168
3169
|
end
|
3169
3170
|
rescue ::GRPC::BadStatus => e
|
3170
3171
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3275,7 +3276,6 @@ module Google
|
|
3275
3276
|
|
3276
3277
|
@key_management_service_stub.call_rpc :mac_sign, request, options: options do |response, operation|
|
3277
3278
|
yield response, operation if block_given?
|
3278
|
-
return response
|
3279
3279
|
end
|
3280
3280
|
rescue ::GRPC::BadStatus => e
|
3281
3281
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3408,7 +3408,6 @@ module Google
|
|
3408
3408
|
|
3409
3409
|
@key_management_service_stub.call_rpc :mac_verify, request, options: options do |response, operation|
|
3410
3410
|
yield response, operation if block_given?
|
3411
|
-
return response
|
3412
3411
|
end
|
3413
3412
|
rescue ::GRPC::BadStatus => e
|
3414
3413
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3504,7 +3503,6 @@ module Google
|
|
3504
3503
|
|
3505
3504
|
@key_management_service_stub.call_rpc :generate_random_bytes, request, options: options do |response, operation|
|
3506
3505
|
yield response, operation if block_given?
|
3507
|
-
return response
|
3508
3506
|
end
|
3509
3507
|
rescue ::GRPC::BadStatus => e
|
3510
3508
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3593,6 +3591,11 @@ module Google
|
|
3593
3591
|
# default endpoint URL. The default value of nil uses the environment
|
3594
3592
|
# universe (usually the default "googleapis.com" universe).
|
3595
3593
|
# @return [::String,nil]
|
3594
|
+
# @!attribute [rw] logger
|
3595
|
+
# A custom logger to use for request/response debug logging, or the value
|
3596
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
3597
|
+
# explicitly disable logging.
|
3598
|
+
# @return [::Logger,:default,nil]
|
3596
3599
|
#
|
3597
3600
|
class Configuration
|
3598
3601
|
extend ::Gapic::Config
|
@@ -3617,6 +3620,7 @@ module Google
|
|
3617
3620
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3618
3621
|
config_attr :quota_project, nil, ::String, nil
|
3619
3622
|
config_attr :universe_domain, nil, ::String, nil
|
3623
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3620
3624
|
|
3621
3625
|
# @private
|
3622
3626
|
def initialize parent_config = nil
|