google-cloud-kms-v1 0.3.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +5 -5
- data/LICENSE.md +188 -190
- data/README.md +67 -3
- data/lib/google/cloud/kms/v1/iam_policy/client.rb +14 -8
- data/lib/google/cloud/kms/v1/key_management_service/client.rb +57 -113
- data/lib/google/cloud/kms/v1/resources_pb.rb +1 -0
- data/lib/google/cloud/kms/v1/service_services_pb.rb +2 -1
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +12 -0
- data/proto_docs/google/cloud/kms/v1/resources.rb +4 -0
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +21 -14
- data/lib/google/iam/v1/iam_policy_services_pb.rb +0 -81
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
parent_config = while namespace.any?
|
83
83
|
parent_name = namespace.join "::"
|
84
84
|
parent_const = const_get parent_name
|
85
|
-
break parent_const.configure if parent_const
|
85
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
86
86
|
namespace.pop
|
87
87
|
end
|
88
88
|
default_config = Client::Configuration.new parent_config
|
@@ -148,8 +148,14 @@ module Google
|
|
148
148
|
|
149
149
|
# Create credentials
|
150
150
|
credentials = @config.credentials
|
151
|
-
|
152
|
-
if
|
151
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
152
|
+
# but only if the default endpoint does not have a region prefix.
|
153
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
154
|
+
@config.endpoint == Client.configure.endpoint &&
|
155
|
+
!@config.endpoint.split(".").first.include?("-")
|
156
|
+
credentials ||= Credentials.default scope: @config.scope,
|
157
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
158
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
153
159
|
credentials = Credentials.new credentials, scope: @config.scope
|
154
160
|
end
|
155
161
|
@quota_project_id = @config.quota_project
|
@@ -481,7 +487,7 @@ module Google
|
|
481
487
|
config_attr :scope, nil, ::String, ::Array, nil
|
482
488
|
config_attr :lib_name, nil, ::String, nil
|
483
489
|
config_attr :lib_version, nil, ::String, nil
|
484
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
490
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
485
491
|
config_attr :interceptors, nil, ::Array, nil
|
486
492
|
config_attr :timeout, nil, ::Numeric, nil
|
487
493
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -502,7 +508,7 @@ module Google
|
|
502
508
|
def rpcs
|
503
509
|
@rpcs ||= begin
|
504
510
|
parent_rpcs = nil
|
505
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
511
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
506
512
|
Rpcs.new parent_rpcs
|
507
513
|
end
|
508
514
|
end
|
@@ -543,11 +549,11 @@ module Google
|
|
543
549
|
|
544
550
|
# @private
|
545
551
|
def initialize parent_rpcs = nil
|
546
|
-
set_iam_policy_config = parent_rpcs
|
552
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
547
553
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
548
|
-
get_iam_policy_config = parent_rpcs
|
554
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
549
555
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
550
|
-
test_iam_permissions_config = parent_rpcs
|
556
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
551
557
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
552
558
|
|
553
559
|
yield self if block_given?
|
@@ -71,97 +71,64 @@ module Google
|
|
71
71
|
parent_config = while namespace.any?
|
72
72
|
parent_name = namespace.join "::"
|
73
73
|
parent_const = const_get parent_name
|
74
|
-
break parent_const.configure if parent_const
|
74
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
75
75
|
namespace.pop
|
76
76
|
end
|
77
77
|
default_config = Client::Configuration.new parent_config
|
78
78
|
|
79
79
|
default_config.rpcs.list_key_rings.timeout = 60.0
|
80
80
|
default_config.rpcs.list_key_rings.retry_policy = {
|
81
|
-
initial_delay: 0.1,
|
82
|
-
max_delay: 60.0,
|
83
|
-
multiplier: 1.3,
|
84
|
-
retry_codes: [13, 14, 4]
|
81
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
85
82
|
}
|
86
83
|
|
87
84
|
default_config.rpcs.list_crypto_keys.timeout = 60.0
|
88
85
|
default_config.rpcs.list_crypto_keys.retry_policy = {
|
89
|
-
initial_delay: 0.1,
|
90
|
-
max_delay: 60.0,
|
91
|
-
multiplier: 1.3,
|
92
|
-
retry_codes: [13, 14, 4]
|
86
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
93
87
|
}
|
94
88
|
|
95
89
|
default_config.rpcs.list_crypto_key_versions.timeout = 60.0
|
96
90
|
default_config.rpcs.list_crypto_key_versions.retry_policy = {
|
97
|
-
initial_delay: 0.1,
|
98
|
-
max_delay: 60.0,
|
99
|
-
multiplier: 1.3,
|
100
|
-
retry_codes: [13, 14, 4]
|
91
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
101
92
|
}
|
102
93
|
|
103
94
|
default_config.rpcs.list_import_jobs.timeout = 60.0
|
104
95
|
default_config.rpcs.list_import_jobs.retry_policy = {
|
105
|
-
initial_delay: 0.1,
|
106
|
-
max_delay: 60.0,
|
107
|
-
multiplier: 1.3,
|
108
|
-
retry_codes: [13, 14, 4]
|
96
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
109
97
|
}
|
110
98
|
|
111
99
|
default_config.rpcs.get_key_ring.timeout = 60.0
|
112
100
|
default_config.rpcs.get_key_ring.retry_policy = {
|
113
|
-
initial_delay: 0.1,
|
114
|
-
max_delay: 60.0,
|
115
|
-
multiplier: 1.3,
|
116
|
-
retry_codes: [13, 14, 4]
|
101
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
117
102
|
}
|
118
103
|
|
119
104
|
default_config.rpcs.get_crypto_key.timeout = 60.0
|
120
105
|
default_config.rpcs.get_crypto_key.retry_policy = {
|
121
|
-
initial_delay: 0.1,
|
122
|
-
max_delay: 60.0,
|
123
|
-
multiplier: 1.3,
|
124
|
-
retry_codes: [13, 14, 4]
|
106
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
125
107
|
}
|
126
108
|
|
127
109
|
default_config.rpcs.get_crypto_key_version.timeout = 60.0
|
128
110
|
default_config.rpcs.get_crypto_key_version.retry_policy = {
|
129
|
-
initial_delay: 0.1,
|
130
|
-
max_delay: 60.0,
|
131
|
-
multiplier: 1.3,
|
132
|
-
retry_codes: [13, 14, 4]
|
111
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
133
112
|
}
|
134
113
|
|
135
114
|
default_config.rpcs.get_public_key.timeout = 60.0
|
136
115
|
default_config.rpcs.get_public_key.retry_policy = {
|
137
|
-
initial_delay: 0.1,
|
138
|
-
max_delay: 60.0,
|
139
|
-
multiplier: 1.3,
|
140
|
-
retry_codes: [13, 14, 4]
|
116
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
141
117
|
}
|
142
118
|
|
143
119
|
default_config.rpcs.get_import_job.timeout = 60.0
|
144
120
|
default_config.rpcs.get_import_job.retry_policy = {
|
145
|
-
initial_delay: 0.1,
|
146
|
-
max_delay: 60.0,
|
147
|
-
multiplier: 1.3,
|
148
|
-
retry_codes: [13, 14, 4]
|
121
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
149
122
|
}
|
150
123
|
|
151
124
|
default_config.rpcs.create_key_ring.timeout = 60.0
|
152
125
|
default_config.rpcs.create_key_ring.retry_policy = {
|
153
|
-
initial_delay: 0.1,
|
154
|
-
max_delay: 60.0,
|
155
|
-
multiplier: 1.3,
|
156
|
-
retry_codes: [13, 14, 4]
|
126
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
157
127
|
}
|
158
128
|
|
159
129
|
default_config.rpcs.create_crypto_key.timeout = 60.0
|
160
130
|
default_config.rpcs.create_crypto_key.retry_policy = {
|
161
|
-
initial_delay: 0.1,
|
162
|
-
max_delay: 60.0,
|
163
|
-
multiplier: 1.3,
|
164
|
-
retry_codes: [13, 14, 4]
|
131
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
165
132
|
}
|
166
133
|
|
167
134
|
default_config.rpcs.create_crypto_key_version.timeout = 60.0
|
@@ -170,82 +137,52 @@ module Google
|
|
170
137
|
|
171
138
|
default_config.rpcs.create_import_job.timeout = 60.0
|
172
139
|
default_config.rpcs.create_import_job.retry_policy = {
|
173
|
-
initial_delay: 0.1,
|
174
|
-
max_delay: 60.0,
|
175
|
-
multiplier: 1.3,
|
176
|
-
retry_codes: [13, 14, 4]
|
140
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
177
141
|
}
|
178
142
|
|
179
143
|
default_config.rpcs.update_crypto_key.timeout = 60.0
|
180
144
|
default_config.rpcs.update_crypto_key.retry_policy = {
|
181
|
-
initial_delay: 0.1,
|
182
|
-
max_delay: 60.0,
|
183
|
-
multiplier: 1.3,
|
184
|
-
retry_codes: [13, 14, 4]
|
145
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
185
146
|
}
|
186
147
|
|
187
148
|
default_config.rpcs.update_crypto_key_version.timeout = 60.0
|
188
149
|
default_config.rpcs.update_crypto_key_version.retry_policy = {
|
189
|
-
initial_delay: 0.1,
|
190
|
-
max_delay: 60.0,
|
191
|
-
multiplier: 1.3,
|
192
|
-
retry_codes: [13, 14, 4]
|
150
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
193
151
|
}
|
194
152
|
|
195
153
|
default_config.rpcs.encrypt.timeout = 60.0
|
196
154
|
default_config.rpcs.encrypt.retry_policy = {
|
197
|
-
initial_delay: 0.1,
|
198
|
-
max_delay: 60.0,
|
199
|
-
multiplier: 1.3,
|
200
|
-
retry_codes: [13, 14, 4]
|
155
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
201
156
|
}
|
202
157
|
|
203
158
|
default_config.rpcs.decrypt.timeout = 60.0
|
204
159
|
default_config.rpcs.decrypt.retry_policy = {
|
205
|
-
initial_delay: 0.1,
|
206
|
-
max_delay: 60.0,
|
207
|
-
multiplier: 1.3,
|
208
|
-
retry_codes: [13, 14, 4]
|
160
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
209
161
|
}
|
210
162
|
|
211
163
|
default_config.rpcs.asymmetric_sign.timeout = 60.0
|
212
164
|
default_config.rpcs.asymmetric_sign.retry_policy = {
|
213
|
-
initial_delay: 0.1,
|
214
|
-
max_delay: 60.0,
|
215
|
-
multiplier: 1.3,
|
216
|
-
retry_codes: [13, 14, 4]
|
165
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
217
166
|
}
|
218
167
|
|
219
168
|
default_config.rpcs.asymmetric_decrypt.timeout = 60.0
|
220
169
|
default_config.rpcs.asymmetric_decrypt.retry_policy = {
|
221
|
-
initial_delay: 0.1,
|
222
|
-
max_delay: 60.0,
|
223
|
-
multiplier: 1.3,
|
224
|
-
retry_codes: [13, 14, 4]
|
170
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
225
171
|
}
|
226
172
|
|
227
173
|
default_config.rpcs.update_crypto_key_primary_version.timeout = 60.0
|
228
174
|
default_config.rpcs.update_crypto_key_primary_version.retry_policy = {
|
229
|
-
initial_delay: 0.1,
|
230
|
-
max_delay: 60.0,
|
231
|
-
multiplier: 1.3,
|
232
|
-
retry_codes: [13, 14, 4]
|
175
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
233
176
|
}
|
234
177
|
|
235
178
|
default_config.rpcs.destroy_crypto_key_version.timeout = 60.0
|
236
179
|
default_config.rpcs.destroy_crypto_key_version.retry_policy = {
|
237
|
-
initial_delay: 0.1,
|
238
|
-
max_delay: 60.0,
|
239
|
-
multiplier: 1.3,
|
240
|
-
retry_codes: [13, 14, 4]
|
180
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
241
181
|
}
|
242
182
|
|
243
183
|
default_config.rpcs.restore_crypto_key_version.timeout = 60.0
|
244
184
|
default_config.rpcs.restore_crypto_key_version.retry_policy = {
|
245
|
-
initial_delay: 0.1,
|
246
|
-
max_delay: 60.0,
|
247
|
-
multiplier: 1.3,
|
248
|
-
retry_codes: [13, 14, 4]
|
185
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
249
186
|
}
|
250
187
|
|
251
188
|
default_config
|
@@ -309,8 +246,14 @@ module Google
|
|
309
246
|
|
310
247
|
# Create credentials
|
311
248
|
credentials = @config.credentials
|
312
|
-
|
313
|
-
if
|
249
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
250
|
+
# but only if the default endpoint does not have a region prefix.
|
251
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
252
|
+
@config.endpoint == Client.configure.endpoint &&
|
253
|
+
!@config.endpoint.split(".").first.include?("-")
|
254
|
+
credentials ||= Credentials.default scope: @config.scope,
|
255
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
256
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
314
257
|
credentials = Credentials.new credentials, scope: @config.scope
|
315
258
|
end
|
316
259
|
@quota_project_id = @config.quota_project
|
@@ -1967,7 +1910,8 @@ module Google
|
|
1967
1910
|
##
|
1968
1911
|
# Update the version of a {::Google::Cloud::Kms::V1::CryptoKey CryptoKey} that will be used in {::Google::Cloud::Kms::V1::KeyManagementService::Client#encrypt Encrypt}.
|
1969
1912
|
#
|
1970
|
-
# Returns an error if called on
|
1913
|
+
# Returns an error if called on a key whose purpose is not
|
1914
|
+
# {::Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
|
1971
1915
|
#
|
1972
1916
|
# @overload update_crypto_key_primary_version(request, options = nil)
|
1973
1917
|
# Pass arguments to `update_crypto_key_primary_version` via a request object, either of type
|
@@ -2275,7 +2219,7 @@ module Google
|
|
2275
2219
|
config_attr :scope, nil, ::String, ::Array, nil
|
2276
2220
|
config_attr :lib_name, nil, ::String, nil
|
2277
2221
|
config_attr :lib_version, nil, ::String, nil
|
2278
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
2222
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2279
2223
|
config_attr :interceptors, nil, ::Array, nil
|
2280
2224
|
config_attr :timeout, nil, ::Numeric, nil
|
2281
2225
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -2296,7 +2240,7 @@ module Google
|
|
2296
2240
|
def rpcs
|
2297
2241
|
@rpcs ||= begin
|
2298
2242
|
parent_rpcs = nil
|
2299
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
2243
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2300
2244
|
Rpcs.new parent_rpcs
|
2301
2245
|
end
|
2302
2246
|
end
|
@@ -2437,51 +2381,51 @@ module Google
|
|
2437
2381
|
|
2438
2382
|
# @private
|
2439
2383
|
def initialize parent_rpcs = nil
|
2440
|
-
list_key_rings_config = parent_rpcs
|
2384
|
+
list_key_rings_config = parent_rpcs.list_key_rings if parent_rpcs.respond_to? :list_key_rings
|
2441
2385
|
@list_key_rings = ::Gapic::Config::Method.new list_key_rings_config
|
2442
|
-
list_crypto_keys_config = parent_rpcs
|
2386
|
+
list_crypto_keys_config = parent_rpcs.list_crypto_keys if parent_rpcs.respond_to? :list_crypto_keys
|
2443
2387
|
@list_crypto_keys = ::Gapic::Config::Method.new list_crypto_keys_config
|
2444
|
-
list_crypto_key_versions_config = parent_rpcs
|
2388
|
+
list_crypto_key_versions_config = parent_rpcs.list_crypto_key_versions if parent_rpcs.respond_to? :list_crypto_key_versions
|
2445
2389
|
@list_crypto_key_versions = ::Gapic::Config::Method.new list_crypto_key_versions_config
|
2446
|
-
list_import_jobs_config = parent_rpcs
|
2390
|
+
list_import_jobs_config = parent_rpcs.list_import_jobs if parent_rpcs.respond_to? :list_import_jobs
|
2447
2391
|
@list_import_jobs = ::Gapic::Config::Method.new list_import_jobs_config
|
2448
|
-
get_key_ring_config = parent_rpcs
|
2392
|
+
get_key_ring_config = parent_rpcs.get_key_ring if parent_rpcs.respond_to? :get_key_ring
|
2449
2393
|
@get_key_ring = ::Gapic::Config::Method.new get_key_ring_config
|
2450
|
-
get_crypto_key_config = parent_rpcs
|
2394
|
+
get_crypto_key_config = parent_rpcs.get_crypto_key if parent_rpcs.respond_to? :get_crypto_key
|
2451
2395
|
@get_crypto_key = ::Gapic::Config::Method.new get_crypto_key_config
|
2452
|
-
get_crypto_key_version_config = parent_rpcs
|
2396
|
+
get_crypto_key_version_config = parent_rpcs.get_crypto_key_version if parent_rpcs.respond_to? :get_crypto_key_version
|
2453
2397
|
@get_crypto_key_version = ::Gapic::Config::Method.new get_crypto_key_version_config
|
2454
|
-
get_public_key_config = parent_rpcs
|
2398
|
+
get_public_key_config = parent_rpcs.get_public_key if parent_rpcs.respond_to? :get_public_key
|
2455
2399
|
@get_public_key = ::Gapic::Config::Method.new get_public_key_config
|
2456
|
-
get_import_job_config = parent_rpcs
|
2400
|
+
get_import_job_config = parent_rpcs.get_import_job if parent_rpcs.respond_to? :get_import_job
|
2457
2401
|
@get_import_job = ::Gapic::Config::Method.new get_import_job_config
|
2458
|
-
create_key_ring_config = parent_rpcs
|
2402
|
+
create_key_ring_config = parent_rpcs.create_key_ring if parent_rpcs.respond_to? :create_key_ring
|
2459
2403
|
@create_key_ring = ::Gapic::Config::Method.new create_key_ring_config
|
2460
|
-
create_crypto_key_config = parent_rpcs
|
2404
|
+
create_crypto_key_config = parent_rpcs.create_crypto_key if parent_rpcs.respond_to? :create_crypto_key
|
2461
2405
|
@create_crypto_key = ::Gapic::Config::Method.new create_crypto_key_config
|
2462
|
-
create_crypto_key_version_config = parent_rpcs
|
2406
|
+
create_crypto_key_version_config = parent_rpcs.create_crypto_key_version if parent_rpcs.respond_to? :create_crypto_key_version
|
2463
2407
|
@create_crypto_key_version = ::Gapic::Config::Method.new create_crypto_key_version_config
|
2464
|
-
import_crypto_key_version_config = parent_rpcs
|
2408
|
+
import_crypto_key_version_config = parent_rpcs.import_crypto_key_version if parent_rpcs.respond_to? :import_crypto_key_version
|
2465
2409
|
@import_crypto_key_version = ::Gapic::Config::Method.new import_crypto_key_version_config
|
2466
|
-
create_import_job_config = parent_rpcs
|
2410
|
+
create_import_job_config = parent_rpcs.create_import_job if parent_rpcs.respond_to? :create_import_job
|
2467
2411
|
@create_import_job = ::Gapic::Config::Method.new create_import_job_config
|
2468
|
-
update_crypto_key_config = parent_rpcs
|
2412
|
+
update_crypto_key_config = parent_rpcs.update_crypto_key if parent_rpcs.respond_to? :update_crypto_key
|
2469
2413
|
@update_crypto_key = ::Gapic::Config::Method.new update_crypto_key_config
|
2470
|
-
update_crypto_key_version_config = parent_rpcs
|
2414
|
+
update_crypto_key_version_config = parent_rpcs.update_crypto_key_version if parent_rpcs.respond_to? :update_crypto_key_version
|
2471
2415
|
@update_crypto_key_version = ::Gapic::Config::Method.new update_crypto_key_version_config
|
2472
|
-
encrypt_config = parent_rpcs
|
2416
|
+
encrypt_config = parent_rpcs.encrypt if parent_rpcs.respond_to? :encrypt
|
2473
2417
|
@encrypt = ::Gapic::Config::Method.new encrypt_config
|
2474
|
-
decrypt_config = parent_rpcs
|
2418
|
+
decrypt_config = parent_rpcs.decrypt if parent_rpcs.respond_to? :decrypt
|
2475
2419
|
@decrypt = ::Gapic::Config::Method.new decrypt_config
|
2476
|
-
asymmetric_sign_config = parent_rpcs
|
2420
|
+
asymmetric_sign_config = parent_rpcs.asymmetric_sign if parent_rpcs.respond_to? :asymmetric_sign
|
2477
2421
|
@asymmetric_sign = ::Gapic::Config::Method.new asymmetric_sign_config
|
2478
|
-
asymmetric_decrypt_config = parent_rpcs
|
2422
|
+
asymmetric_decrypt_config = parent_rpcs.asymmetric_decrypt if parent_rpcs.respond_to? :asymmetric_decrypt
|
2479
2423
|
@asymmetric_decrypt = ::Gapic::Config::Method.new asymmetric_decrypt_config
|
2480
|
-
update_crypto_key_primary_version_config = parent_rpcs
|
2424
|
+
update_crypto_key_primary_version_config = parent_rpcs.update_crypto_key_primary_version if parent_rpcs.respond_to? :update_crypto_key_primary_version
|
2481
2425
|
@update_crypto_key_primary_version = ::Gapic::Config::Method.new update_crypto_key_primary_version_config
|
2482
|
-
destroy_crypto_key_version_config = parent_rpcs
|
2426
|
+
destroy_crypto_key_version_config = parent_rpcs.destroy_crypto_key_version if parent_rpcs.respond_to? :destroy_crypto_key_version
|
2483
2427
|
@destroy_crypto_key_version = ::Gapic::Config::Method.new destroy_crypto_key_version_config
|
2484
|
-
restore_crypto_key_version_config = parent_rpcs
|
2428
|
+
restore_crypto_key_version_config = parent_rpcs.restore_crypto_key_version if parent_rpcs.respond_to? :restore_crypto_key_version
|
2485
2429
|
@restore_crypto_key_version = ::Gapic::Config::Method.new restore_crypto_key_version_config
|
2486
2430
|
|
2487
2431
|
yield self if block_given?
|
@@ -78,6 +78,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
78
78
|
value :RSA_DECRYPT_OAEP_4096_SHA512, 17
|
79
79
|
value :EC_SIGN_P256_SHA256, 12
|
80
80
|
value :EC_SIGN_P384_SHA384, 13
|
81
|
+
value :EC_SIGN_SECP256K1_SHA256, 31
|
81
82
|
value :EXTERNAL_SYMMETRIC_ENCRYPTION, 18
|
82
83
|
end
|
83
84
|
add_enum "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState" do
|
@@ -117,7 +117,8 @@ module Google
|
|
117
117
|
rpc :AsymmetricDecrypt, ::Google::Cloud::Kms::V1::AsymmetricDecryptRequest, ::Google::Cloud::Kms::V1::AsymmetricDecryptResponse
|
118
118
|
# Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
|
119
119
|
#
|
120
|
-
# Returns an error if called on
|
120
|
+
# Returns an error if called on a key whose purpose is not
|
121
|
+
# [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
|
121
122
|
rpc :UpdateCryptoKeyPrimaryVersion, ::Google::Cloud::Kms::V1::UpdateCryptoKeyPrimaryVersionRequest, ::Google::Cloud::Kms::V1::CryptoKey
|
122
123
|
# Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction.
|
123
124
|
#
|
@@ -54,6 +54,18 @@ module Google
|
|
54
54
|
# This indicates that the field may be set once in a request to create a
|
55
55
|
# resource, but may not be changed thereafter.
|
56
56
|
IMMUTABLE = 5
|
57
|
+
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
59
|
+
# This indicates that the service may provide the elements of the list
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
62
|
+
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
57
69
|
end
|
58
70
|
end
|
59
71
|
end
|
@@ -339,6 +339,10 @@ module Google
|
|
339
339
|
# ECDSA on the NIST P-384 curve with a SHA384 digest.
|
340
340
|
EC_SIGN_P384_SHA384 = 13
|
341
341
|
|
342
|
+
# ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
|
343
|
+
# HSM protection level.
|
344
|
+
EC_SIGN_SECP256K1_SHA256 = 31
|
345
|
+
|
342
346
|
# Algorithm representing symmetric encryption by an external key manager.
|
343
347
|
EXTERNAL_SYMMETRIC_ENCRYPTION = 18
|
344
348
|
end
|
@@ -70,7 +70,16 @@ module Google
|
|
70
70
|
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
71
|
#
|
72
72
|
#
|
73
|
-
# Example 5: Compute Timestamp from
|
73
|
+
# Example 5: Compute Timestamp from Java `Instant.now()`.
|
74
|
+
#
|
75
|
+
# Instant now = Instant.now();
|
76
|
+
#
|
77
|
+
# Timestamp timestamp =
|
78
|
+
# Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
79
|
+
# .setNanos(now.getNano()).build();
|
80
|
+
#
|
81
|
+
#
|
82
|
+
# Example 6: Compute Timestamp from current time in Python.
|
74
83
|
#
|
75
84
|
# timestamp = Timestamp()
|
76
85
|
# timestamp.GetCurrentTime()
|