google-cloud-kms 2.9.3 → 2.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4d382fd89897a53296c42ae8b3b0b24278d8361d8af1a123ac8d823c621339d
4
- data.tar.gz: 740b215983e378dbda75e6efb0ee81d5c948fe897af63a93ac38cfb28647397a
3
+ metadata.gz: f6e193af0065ebb7139bfc223fec776a06f1daa942af84385d5ca9690f920858
4
+ data.tar.gz: 20d02191bc722e25f9cb4e493b518d5972d15e0817a050d4f2c83a83b5ff2875
5
5
  SHA512:
6
- metadata.gz: 171522b62877021ea22c27eb80c75077c92ca428e503ad3c5a6ed2df7aeaf1f1538f7abcdbdc7b678efd3586705dc901e7be8226fc0df5a2f683ea04e4904700
7
- data.tar.gz: ffd27b3200d25be7ba1369e5019549a00373547ca2c21099267000867219b4798b783a98f7b6f1a93c23db4a6b9abafd5afd74d55ccc7f30ef3a7ae951de896e
6
+ metadata.gz: 8bd56c66301ade1f73f0706a78a20ffdefe9b1388edb4bfd1870df49b1782b5a6bdd0a9c724968f49962cc5e59b47f3bca8d7e83cfd9286a28cdee99b737457c
7
+ data.tar.gz: 6b65b3240245b4a692d7b853438d7d2667aacd20e0c018592a0befcef60f9c79db8669f5994a22fbb21fdb0c3afbb1b48175fcfe462cdb4542a89950b7112df7
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Kms
23
- VERSION = "2.9.3"
23
+ VERSION = "2.10.0"
24
24
  end
25
25
  end
26
26
  end
@@ -283,6 +283,82 @@ module Google
283
283
  false
284
284
  end
285
285
 
286
+ ##
287
+ # Create a new client object for HsmManagement.
288
+ #
289
+ # By default, this returns an instance of
290
+ # [Google::Cloud::Kms::V1::HsmManagement::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-HsmManagement-Client)
291
+ # for a gRPC client for version V1 of the API.
292
+ # However, you can specify a different API version by passing it in the
293
+ # `version` parameter. If the HsmManagement service is
294
+ # supported by that API version, and the corresponding gem is available, the
295
+ # appropriate versioned client will be returned.
296
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
297
+ # the `transport` parameter.
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 HsmManagement service.
301
+ # You can determine whether the method will succeed by calling
302
+ # {Google::Cloud::Kms.hsm_management_available?}.
303
+ #
304
+ # ## About HsmManagement
305
+ #
306
+ # Google Cloud HSM Management Service
307
+ #
308
+ # Provides interfaces for managing HSM instances.
309
+ #
310
+ # Implements a REST model with the following objects:
311
+ # * SingleTenantHsmInstance
312
+ # * SingleTenantHsmInstanceProposal
313
+ #
314
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
315
+ # Defaults to `:v1`.
316
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
317
+ # @return [::Object] A client object for the specified version.
318
+ #
319
+ def self.hsm_management version: :v1, transport: :grpc, &block
320
+ require "google/cloud/kms/#{version.to_s.downcase}"
321
+
322
+ package_name = Google::Cloud::Kms
323
+ .constants
324
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
325
+ .first
326
+ service_module = Google::Cloud::Kms.const_get(package_name).const_get(:HsmManagement)
327
+ service_module = service_module.const_get(:Rest) if transport == :rest
328
+ service_module.const_get(:Client).new(&block)
329
+ end
330
+
331
+ ##
332
+ # Determines whether the HsmManagement service is supported by the current client.
333
+ # If true, you can retrieve a client object by calling {Google::Cloud::Kms.hsm_management}.
334
+ # If false, that method will raise an exception. This could happen if the given
335
+ # API version does not exist or does not support the HsmManagement service,
336
+ # or if the versioned client gem needs an update to support the HsmManagement service.
337
+ #
338
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
339
+ # Defaults to `:v1`.
340
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
341
+ # @return [boolean] Whether the service is available.
342
+ #
343
+ def self.hsm_management_available? version: :v1, transport: :grpc
344
+ require "google/cloud/kms/#{version.to_s.downcase}"
345
+ package_name = Google::Cloud::Kms
346
+ .constants
347
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
348
+ .first
349
+ return false unless package_name
350
+ service_module = Google::Cloud::Kms.const_get package_name
351
+ return false unless service_module.const_defined? :HsmManagement
352
+ service_module = service_module.const_get :HsmManagement
353
+ if transport == :rest
354
+ return false unless service_module.const_defined? :Rest
355
+ service_module = service_module.const_get :Rest
356
+ end
357
+ service_module.const_defined? :Client
358
+ rescue ::LoadError
359
+ false
360
+ end
361
+
286
362
  ##
287
363
  # Create a new client object for KeyManagementService.
288
364
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.3
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC