google-cloud-kms 2.8.2 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffed9f313d7cc6deec5345e2ae09e0c32123702a185f45406c652b605fd90cdd
4
- data.tar.gz: 17488dd0da5fd020393984546ab82a6fecc5b322fadf14bff5e24254614050a2
3
+ metadata.gz: 24073816531885649865cc94d1e0d4eeb4c30b73eb7d9e647e98a7c10c1718dc
4
+ data.tar.gz: 20fd872302eac220b61fb961e51a04bb1264c491ea0f8f108e2e2292539dfd7e
5
5
  SHA512:
6
- metadata.gz: 5955ebd4c8903573d764c99340c74e20058f19f4a2316dbfd78d0c55265fdadcd73a6d0b75b176d9bcd8c6cfe1754af818674a39a914c59731bde53830bb13c6
7
- data.tar.gz: 47acd59578568f63333010fdca9894dd40e5893141a010638fe249c472bc31c59f37c8fc12cd7e4cefc9f05728952d3ec462c46eddd4ca717e9588175d5847d8
6
+ metadata.gz: 299d5e2d0cd02f5d711b01976110db62872a949010a5e9d054f3faed5b84df7e8f2d3479a4318933ef6b4ff535ee0a49f7d2a9392b3490a866e3877b7eaa6618
7
+ data.tar.gz: 5a26492613cbdbf49952649fc002c1a350c791003d8c5a0f8d932c168f50bf3befac256c48c86816f79b27b8dfbce9d264259da6cacbf9dc5afce125aae4f7dd
data/README.md CHANGED
@@ -42,9 +42,39 @@ and includes substantial interface changes. Existing code written for earlier
42
42
  versions of this library will likely require updates to use this version.
43
43
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
44
44
 
45
+ ## Debug Logging
46
+
47
+ This library comes with opt-in Debug Logging that can help you troubleshoot
48
+ your application's integration with the API. When logging is activated, key
49
+ events such as requests and responses, along with data payloads and metadata
50
+ such as headers and client configuration, are logged to the standard error
51
+ stream.
52
+
53
+ **WARNING:** Client Library Debug Logging includes your data payloads in
54
+ plaintext, which could include sensitive data such as PII for yourself or your
55
+ customers, private keys, or other security data that could be compromising if
56
+ leaked. Always practice good data hygiene with your application logs, and follow
57
+ the principle of least access. Google also recommends that Client Library Debug
58
+ Logging be enabled only temporarily during active debugging, and not used
59
+ permanently in production.
60
+
61
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
62
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
63
+ list of client library gem names. This will select the default logging behavior,
64
+ which writes logs to the standard error stream. On a local workstation, this may
65
+ result in logs appearing on the console. When running on a Google Cloud hosting
66
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
67
+ results in logs appearing alongside your application logs in the
68
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
69
+
70
+ Debug logging also requires that the versioned clients for this service be
71
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
72
+ working, try updating the versioned clients in your bundle or installed gems:
73
+ [google-cloud-kms-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest).
74
+
45
75
  ## Supported Ruby Versions
46
76
 
47
- This library is supported on Ruby 2.7+.
77
+ This library is supported on Ruby 3.0+.
48
78
 
49
79
  Google provides official support for Ruby versions that are actively supported
50
80
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Kms
23
- VERSION = "2.8.2"
23
+ VERSION = "2.9.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the Autokey service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::Kms.autokey_available?}.
65
+ #
61
66
  # ## About Autokey
62
67
  #
63
68
  # Provides interfaces for using [Cloud KMS
@@ -96,6 +101,37 @@ module Google
96
101
  service_module.const_get(:Client).new(&block)
97
102
  end
98
103
 
104
+ ##
105
+ # Determines whether the Autokey service is supported by the current client.
106
+ # If true, you can retrieve a client object by calling {Google::Cloud::Kms.autokey}.
107
+ # If false, that method will raise an exception. This could happen if the given
108
+ # API version does not exist or does not support the Autokey service,
109
+ # or if the versioned client gem needs an update to support the Autokey service.
110
+ #
111
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
112
+ # Defaults to `:v1`.
113
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
114
+ # @return [boolean] Whether the service is available.
115
+ #
116
+ def self.autokey_available? version: :v1, transport: :grpc
117
+ require "google/cloud/kms/#{version.to_s.downcase}"
118
+ package_name = Google::Cloud::Kms
119
+ .constants
120
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
121
+ .first
122
+ return false unless package_name
123
+ service_module = Google::Cloud::Kms.const_get package_name
124
+ return false unless service_module.const_defined? :Autokey
125
+ service_module = service_module.const_get :Autokey
126
+ if transport == :rest
127
+ return false unless service_module.const_defined? :Rest
128
+ service_module = service_module.const_get :Rest
129
+ end
130
+ service_module.const_defined? :Client
131
+ rescue ::LoadError
132
+ false
133
+ end
134
+
99
135
  ##
100
136
  # Create a new client object for AutokeyAdmin.
101
137
  #
@@ -109,6 +145,11 @@ module Google
109
145
  # You can also specify a different transport by passing `:rest` or `:grpc` in
110
146
  # the `transport` parameter.
111
147
  #
148
+ # Raises an exception if the currently installed versioned client gem for the
149
+ # given API version does not support the given transport of the AutokeyAdmin service.
150
+ # You can determine whether the method will succeed by calling
151
+ # {Google::Cloud::Kms.autokey_admin_available?}.
152
+ #
112
153
  # ## About AutokeyAdmin
113
154
  #
114
155
  # Provides interfaces for managing [Cloud KMS
@@ -137,6 +178,37 @@ module Google
137
178
  service_module.const_get(:Client).new(&block)
138
179
  end
139
180
 
181
+ ##
182
+ # Determines whether the AutokeyAdmin service is supported by the current client.
183
+ # If true, you can retrieve a client object by calling {Google::Cloud::Kms.autokey_admin}.
184
+ # If false, that method will raise an exception. This could happen if the given
185
+ # API version does not exist or does not support the AutokeyAdmin service,
186
+ # or if the versioned client gem needs an update to support the AutokeyAdmin service.
187
+ #
188
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
189
+ # Defaults to `:v1`.
190
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
191
+ # @return [boolean] Whether the service is available.
192
+ #
193
+ def self.autokey_admin_available? version: :v1, transport: :grpc
194
+ require "google/cloud/kms/#{version.to_s.downcase}"
195
+ package_name = Google::Cloud::Kms
196
+ .constants
197
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
198
+ .first
199
+ return false unless package_name
200
+ service_module = Google::Cloud::Kms.const_get package_name
201
+ return false unless service_module.const_defined? :AutokeyAdmin
202
+ service_module = service_module.const_get :AutokeyAdmin
203
+ if transport == :rest
204
+ return false unless service_module.const_defined? :Rest
205
+ service_module = service_module.const_get :Rest
206
+ end
207
+ service_module.const_defined? :Client
208
+ rescue ::LoadError
209
+ false
210
+ end
211
+
140
212
  ##
141
213
  # Create a new client object for EkmService.
142
214
  #
@@ -150,6 +222,11 @@ module Google
150
222
  # You can also specify a different transport by passing `:rest` or `:grpc` in
151
223
  # the `transport` parameter.
152
224
  #
225
+ # Raises an exception if the currently installed versioned client gem for the
226
+ # given API version does not support the given transport of the EkmService service.
227
+ # You can determine whether the method will succeed by calling
228
+ # {Google::Cloud::Kms.ekm_service_available?}.
229
+ #
153
230
  # ## About EkmService
154
231
  #
155
232
  # Google Cloud Key Management EKM Service
@@ -175,6 +252,37 @@ module Google
175
252
  service_module.const_get(:Client).new(&block)
176
253
  end
177
254
 
255
+ ##
256
+ # Determines whether the EkmService service is supported by the current client.
257
+ # If true, you can retrieve a client object by calling {Google::Cloud::Kms.ekm_service}.
258
+ # If false, that method will raise an exception. This could happen if the given
259
+ # API version does not exist or does not support the EkmService service,
260
+ # or if the versioned client gem needs an update to support the EkmService service.
261
+ #
262
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
263
+ # Defaults to `:v1`.
264
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
265
+ # @return [boolean] Whether the service is available.
266
+ #
267
+ def self.ekm_service_available? version: :v1, transport: :grpc
268
+ require "google/cloud/kms/#{version.to_s.downcase}"
269
+ package_name = Google::Cloud::Kms
270
+ .constants
271
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
272
+ .first
273
+ return false unless package_name
274
+ service_module = Google::Cloud::Kms.const_get package_name
275
+ return false unless service_module.const_defined? :EkmService
276
+ service_module = service_module.const_get :EkmService
277
+ if transport == :rest
278
+ return false unless service_module.const_defined? :Rest
279
+ service_module = service_module.const_get :Rest
280
+ end
281
+ service_module.const_defined? :Client
282
+ rescue ::LoadError
283
+ false
284
+ end
285
+
178
286
  ##
179
287
  # Create a new client object for KeyManagementService.
180
288
  #
@@ -188,6 +296,11 @@ module Google
188
296
  # You can also specify a different transport by passing `:rest` or `:grpc` in
189
297
  # the `transport` parameter.
190
298
  #
299
+ # Raises an exception if the currently installed versioned client gem for the
300
+ # given API version does not support the given transport of the KeyManagementService service.
301
+ # You can determine whether the method will succeed by calling
302
+ # {Google::Cloud::Kms.key_management_service_available?}.
303
+ #
191
304
  # ## About KeyManagementService
192
305
  #
193
306
  # Google Cloud Key Management Service
@@ -220,6 +333,37 @@ module Google
220
333
  service_module.const_get(:Client).new(&block)
221
334
  end
222
335
 
336
+ ##
337
+ # Determines whether the KeyManagementService service is supported by the current client.
338
+ # If true, you can retrieve a client object by calling {Google::Cloud::Kms.key_management_service}.
339
+ # If false, that method will raise an exception. This could happen if the given
340
+ # API version does not exist or does not support the KeyManagementService service,
341
+ # or if the versioned client gem needs an update to support the KeyManagementService service.
342
+ #
343
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
344
+ # Defaults to `:v1`.
345
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
346
+ # @return [boolean] Whether the service is available.
347
+ #
348
+ def self.key_management_service_available? version: :v1, transport: :grpc
349
+ require "google/cloud/kms/#{version.to_s.downcase}"
350
+ package_name = Google::Cloud::Kms
351
+ .constants
352
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
353
+ .first
354
+ return false unless package_name
355
+ service_module = Google::Cloud::Kms.const_get package_name
356
+ return false unless service_module.const_defined? :KeyManagementService
357
+ service_module = service_module.const_get :KeyManagementService
358
+ if transport == :rest
359
+ return false unless service_module.const_defined? :Rest
360
+ service_module = service_module.const_get :Rest
361
+ end
362
+ service_module.const_defined? :Client
363
+ rescue ::LoadError
364
+ false
365
+ end
366
+
223
367
  ##
224
368
  # Configure the google-cloud-kms library.
225
369
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.2
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-30 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -64,7 +63,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
64
63
  licenses:
65
64
  - Apache-2.0
66
65
  metadata: {}
67
- post_install_message:
68
66
  rdoc_options: []
69
67
  require_paths:
70
68
  - lib
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
70
  requirements:
73
71
  - - ">="
74
72
  - !ruby/object:Gem::Version
75
- version: '2.7'
73
+ version: '3.0'
76
74
  required_rubygems_version: !ruby/object:Gem::Requirement
77
75
  requirements:
78
76
  - - ">="
79
77
  - !ruby/object:Gem::Version
80
78
  version: '0'
81
79
  requirements: []
82
- rubygems_version: 3.5.6
83
- signing_key:
80
+ rubygems_version: 3.6.2
84
81
  specification_version: 4
85
82
  summary: API Client library for the Cloud Key Management Service (KMS) API
86
83
  test_files: []