google-cloud-kms 2.2.1 → 2.3.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: 387ffbafed11c8adfc5d53ab39c6ea4715a523e7660669d4e5c195af5d15b1a7
4
- data.tar.gz: 6534e63d832bdf6e32b588b3a9d949ebe87fcb606d54fca3c68208100ef09a08
3
+ metadata.gz: 4dd68566d3b364da35143e5501f8bdb5743a48bfcfb51d692293caf0c12c5114
4
+ data.tar.gz: 4997226dfb7ea680bee31f6f28a88bafb991eb67bcacbdcdc165ea9e9ae23f80
5
5
  SHA512:
6
- metadata.gz: f5248ba49fc23d406e368c443bae949e3eb6298a1b779497831b94baf4ece36f27eab758ec39493fa3766437e1ecbb8df0c25fa9d95deed3188aa98445447b29
7
- data.tar.gz: 0d0b9bdf6a2dc84427e167d9b427133934177a59799e5d4192b95c9d07fb8d0faa502213e62096bd0a0d6b2a6052cd1c6775a33f7c0ad04d4c70afdede3a015f
6
+ metadata.gz: 9648610675019023d3b3480f654310d6055ffcc44a47d083648751d91098397e3381712f2b7309f9467e2c63d6875e62a13b7b122a8d357531954f17f3f44371
7
+ data.tar.gz: 32bad132d2272bf16282109581845e0dad66fa100cca52338e6352a8c4499641a34ccc30c67ee5ab493265ebeaa60aeee8f6c1512fc9412ff716e2189124891f
data/AUTHENTICATION.md CHANGED
@@ -27,7 +27,7 @@ export KMS_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/kms"
29
29
 
30
- client = Google::Cloud::Kms.key_management_service
30
+ client = Google::Cloud::Kms.ekm_service
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-kms
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- `::Google::Cloud::Kms::V1::KeyManagementService::Credentials`):
67
+ `::Google::Cloud::Kms::V1::EkmService::Credentials`):
68
68
 
69
69
  * `KMS_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  * `KMS_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/kms"
77
77
 
78
78
  ENV["KMS_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::Kms.key_management_service
80
+ client = Google::Cloud::Kms.ekm_service
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ it in an environment variable. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/kms"
90
90
 
91
- client = Google::Cloud::Kms.key_management_service do |config|
91
+ client = Google::Cloud::Kms.ekm_service do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -102,7 +102,7 @@ Google::Cloud::Kms.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::Kms.key_management_service
105
+ client = Google::Cloud::Kms.ekm_service
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -11,7 +11,7 @@ verisoned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
14
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-kms/latest)
14
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-kms/latest)
15
15
  for this library, google-cloud-kms, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Kms
23
- VERSION = "2.2.1"
23
+ VERSION = "2.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -44,6 +44,40 @@ end
44
44
  module Google
45
45
  module Cloud
46
46
  module Kms
47
+ ##
48
+ # Create a new client object for EkmService.
49
+ #
50
+ # By default, this returns an instance of
51
+ # [Google::Cloud::Kms::V1::EkmService::Client](https://googleapis.dev/ruby/google-cloud-kms-v1/latest/Google/Cloud/Kms/V1/EkmService/Client.html)
52
+ # for version V1 of the API.
53
+ # However, you can specify specify a different API version by passing it in the
54
+ # `version` parameter. If the EkmService service is
55
+ # supported by that API version, and the corresponding gem is available, the
56
+ # appropriate versioned client will be returned.
57
+ #
58
+ # ## About EkmService
59
+ #
60
+ # Google Cloud Key Management EKM Service
61
+ #
62
+ # Manages external cryptographic keys and operations using those keys.
63
+ # Implements a REST model with the following objects:
64
+ # * EkmConnection
65
+ #
66
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
67
+ # Defaults to `:v1`.
68
+ # @return [EkmService::Client] A client object for the specified version.
69
+ #
70
+ def self.ekm_service version: :v1, &block
71
+ require "google/cloud/kms/#{version.to_s.downcase}"
72
+
73
+ package_name = Google::Cloud::Kms
74
+ .constants
75
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
76
+ .first
77
+ package_module = Google::Cloud::Kms.const_get package_name
78
+ package_module.const_get(:EkmService).const_get(:Client).new(&block)
79
+ end
80
+
47
81
  ##
48
82
  # Create a new client object for KeyManagementService.
49
83
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.0'
33
+ version: '0.11'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.0'
43
+ version: '0.11'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.3.4
193
+ rubygems_version: 3.3.5
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: API Client library for the Cloud Key Management Service (KMS) API