google-cloud-kms 2.9.3 → 2.11.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: f10b093b1a22889874fa287b904f1258d2a46c373978ae9320ddc94321a97069
4
+ data.tar.gz: 0d1d48b89d748ff888e07d6682bd0bddd4b7b492c9d88cfd7048a8194d51f19d
5
5
  SHA512:
6
- metadata.gz: 171522b62877021ea22c27eb80c75077c92ca428e503ad3c5a6ed2df7aeaf1f1538f7abcdbdc7b678efd3586705dc901e7be8226fc0df5a2f683ea04e4904700
7
- data.tar.gz: ffd27b3200d25be7ba1369e5019549a00373547ca2c21099267000867219b4798b783a98f7b6f1a93c23db4a6b9abafd5afd74d55ccc7f30ef3a7ae951de896e
6
+ metadata.gz: ee5bb514fa69f03012227e509beeb297f3fc1f9d05987d51979db4c503e60997676c03aff24cdf19eea7b5a56aaf00f699573d44f249d1cebe82a66d2803a63d
7
+ data.tar.gz: 326d577d87213932edd7fe6440379d2d93d81f56eed2fdb2b46587c4e0a67a69adb89f4cfe50d7644f10ca2c801eceb13ff604a43b4590893d54402d02a9b2c0
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Kms
23
- VERSION = "2.9.3"
23
+ VERSION = "2.11.0"
24
24
  end
25
25
  end
26
26
  end
@@ -153,13 +153,15 @@ module Google
153
153
  # ## About AutokeyAdmin
154
154
  #
155
155
  # Provides interfaces for managing [Cloud KMS
156
- # Autokey](https://cloud.google.com/kms/help/autokey) folder-level
157
- # configurations. A configuration is inherited by all descendent projects. A
158
- # configuration at one folder overrides any other configurations in its
159
- # ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
160
- # Autokey, so that users working in a descendant project can request
161
- # provisioned CryptoKeys, ready for Customer
162
- # Managed Encryption Key (CMEK) use, on-demand.
156
+ # Autokey](https://cloud.google.com/kms/help/autokey) folder-level or
157
+ # project-level configurations. A configuration is inherited by all descendent
158
+ # folders and projects. A configuration at a folder or project overrides any
159
+ # other configurations in its ancestry. Setting a configuration on a folder is
160
+ # a prerequisite for Cloud KMS Autokey, so that users working in a descendant
161
+ # project can request provisioned CryptoKeys,
162
+ # ready for Customer Managed Encryption Key (CMEK) use, on-demand when using
163
+ # the dedicated key project mode. This is not required when using the delegated
164
+ # key management mode for same-project keys.
163
165
  #
164
166
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
165
167
  # Defaults to `:v1`.
@@ -283,6 +285,82 @@ module Google
283
285
  false
284
286
  end
285
287
 
288
+ ##
289
+ # Create a new client object for HsmManagement.
290
+ #
291
+ # By default, this returns an instance of
292
+ # [Google::Cloud::Kms::V1::HsmManagement::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-HsmManagement-Client)
293
+ # for a gRPC client for version V1 of the API.
294
+ # However, you can specify a different API version by passing it in the
295
+ # `version` parameter. If the HsmManagement service is
296
+ # supported by that API version, and the corresponding gem is available, the
297
+ # appropriate versioned client will be returned.
298
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
299
+ # the `transport` parameter.
300
+ #
301
+ # Raises an exception if the currently installed versioned client gem for the
302
+ # given API version does not support the given transport of the HsmManagement service.
303
+ # You can determine whether the method will succeed by calling
304
+ # {Google::Cloud::Kms.hsm_management_available?}.
305
+ #
306
+ # ## About HsmManagement
307
+ #
308
+ # Google Cloud HSM Management Service
309
+ #
310
+ # Provides interfaces for managing HSM instances.
311
+ #
312
+ # Implements a REST model with the following objects:
313
+ # * SingleTenantHsmInstance
314
+ # * SingleTenantHsmInstanceProposal
315
+ #
316
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
317
+ # Defaults to `:v1`.
318
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
319
+ # @return [::Object] A client object for the specified version.
320
+ #
321
+ def self.hsm_management version: :v1, transport: :grpc, &block
322
+ require "google/cloud/kms/#{version.to_s.downcase}"
323
+
324
+ package_name = Google::Cloud::Kms
325
+ .constants
326
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
327
+ .first
328
+ service_module = Google::Cloud::Kms.const_get(package_name).const_get(:HsmManagement)
329
+ service_module = service_module.const_get(:Rest) if transport == :rest
330
+ service_module.const_get(:Client).new(&block)
331
+ end
332
+
333
+ ##
334
+ # Determines whether the HsmManagement service is supported by the current client.
335
+ # If true, you can retrieve a client object by calling {Google::Cloud::Kms.hsm_management}.
336
+ # If false, that method will raise an exception. This could happen if the given
337
+ # API version does not exist or does not support the HsmManagement service,
338
+ # or if the versioned client gem needs an update to support the HsmManagement service.
339
+ #
340
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
341
+ # Defaults to `:v1`.
342
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
343
+ # @return [boolean] Whether the service is available.
344
+ #
345
+ def self.hsm_management_available? version: :v1, transport: :grpc
346
+ require "google/cloud/kms/#{version.to_s.downcase}"
347
+ package_name = Google::Cloud::Kms
348
+ .constants
349
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
350
+ .first
351
+ return false unless package_name
352
+ service_module = Google::Cloud::Kms.const_get package_name
353
+ return false unless service_module.const_defined? :HsmManagement
354
+ service_module = service_module.const_get :HsmManagement
355
+ if transport == :rest
356
+ return false unless service_module.const_defined? :Rest
357
+ service_module = service_module.const_get :Rest
358
+ end
359
+ service_module.const_defined? :Client
360
+ rescue ::LoadError
361
+ false
362
+ end
363
+
286
364
  ##
287
365
  # Create a new client object for KeyManagementService.
288
366
  #
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.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: '3.0'
73
+ version: '3.2'
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="