blob: 6f6ba0f9cba6f6781ef5fd338c0ff6515238ba39 [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="cloudkms_v1.html">Cloud Key Management Service (KMS) API</a> . <a href="cloudkms_v1.projects.html">projects</a> . <a href="cloudkms_v1.projects.locations.html">locations</a> . <a href="cloudkms_v1.projects.locations.keyRings.html">keyRings</a> . <a href="cloudkms_v1.projects.locations.keyRings.cryptoKeys.html">cryptoKeys</a> . <a href="cloudkms_v1.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.html">cryptoKeyVersions</a></h1>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#asymmetricDecrypt">asymmetricDecrypt(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Decrypts data that was encrypted with a public key retrieved from</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#asymmetricSign">asymmetricSign(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Signs data using a CryptoKeyVersion with CryptoKey.purpose</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Create a new CryptoKeyVersion in a CryptoKey.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#destroy">destroy(name, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040088<p class="firstline">Schedule a CryptoKeyVersion for destruction.</p>
89<p class="toc_element">
90 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
91<p class="firstline">Returns metadata for a given CryptoKeyVersion.</p>
92<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#getPublicKey">getPublicKey(name, x__xgafv=None)</a></code></p>
94<p class="firstline">Returns the public key for the given CryptoKeyVersion. The</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Imports a new CryptoKeyVersion into an existing CryptoKey using the</p>
98<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070099 <code><a href="#list">list(parent, filter=None, pageToken=None, pageSize=None, view=None, orderBy=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400100<p class="firstline">Lists CryptoKeyVersions.</p>
101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400106<p class="firstline">Update a CryptoKeyVersion's metadata.</p>
107<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#restore">restore(name, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400109<p class="firstline">Restore a CryptoKeyVersion in the</p>
110<h3>Method Details</h3>
111<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700112 <code class="details" id="asymmetricDecrypt">asymmetricDecrypt(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113 <pre>Decrypts data that was encrypted with a public key retrieved from
114GetPublicKey corresponding to a CryptoKeyVersion with
115CryptoKey.purpose ASYMMETRIC_DECRYPT.
116
117Args:
118 name: string, Required. The resource name of the CryptoKeyVersion to use for
119decryption. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 The object takes the form of:
122
123{ # Request message for KeyManagementService.AsymmetricDecrypt.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;ciphertext&quot;: &quot;A String&quot;, # Required. The data encrypted with the named CryptoKeyVersion&#x27;s public
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 # key using OAEP.
126 }
127
128 x__xgafv: string, V1 error format.
129 Allowed values
130 1 - v1 error format
131 2 - v2 error format
132
133Returns:
134 An object of the form:
135
136 { # Response message for KeyManagementService.AsymmetricDecrypt.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;plaintext&quot;: &quot;A String&quot;, # The decrypted data originally encrypted with the matching public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 }</pre>
139</div>
140
141<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700142 <code class="details" id="asymmetricSign">asymmetricSign(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 <pre>Signs data using a CryptoKeyVersion with CryptoKey.purpose
144ASYMMETRIC_SIGN, producing a signature that can be verified with the public
145key retrieved from GetPublicKey.
146
147Args:
148 name: string, Required. The resource name of the CryptoKeyVersion to use for signing. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 The object takes the form of:
151
152{ # Request message for KeyManagementService.AsymmetricSign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 &quot;digest&quot;: { # A Digest holds a cryptographic message digest. # Required. The digest of the data to sign. The digest must be produced with
154 # the same digest algorithm as specified by the key version&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 # algorithm.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700156 &quot;sha512&quot;: &quot;A String&quot;, # A message digest produced with the SHA-512 algorithm.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;sha384&quot;: &quot;A String&quot;, # A message digest produced with the SHA-384 algorithm.
158 &quot;sha256&quot;: &quot;A String&quot;, # A message digest produced with the SHA-256 algorithm.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 },
160 }
161
162 x__xgafv: string, V1 error format.
163 Allowed values
164 1 - v1 error format
165 2 - v2 error format
166
167Returns:
168 An object of the form:
169
170 { # Response message for KeyManagementService.AsymmetricSign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 &quot;signature&quot;: &quot;A String&quot;, # The created signature.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 }</pre>
173</div>
174
175<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400177 <pre>Create a new CryptoKeyVersion in a CryptoKey.
178
179The server will assign the next sequential id. If unset,
180state will be set to
181ENABLED.
182
183Args:
184 parent: string, Required. The name of the CryptoKey associated with
185the CryptoKeyVersions. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400187 The object takes the form of:
188
189{ # A CryptoKeyVersion represents an individual cryptographic key, and the
190 # associated key material.
191 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 # An ENABLED version can be
193 # used for cryptographic operations.
194 #
195 # For security reasons, the raw cryptographic key material represented by a
196 # CryptoKeyVersion can never be viewed or exported. It can only be used to
197 # encrypt, decrypt, or sign data when an authorized user or application invokes
198 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
200 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
201 # CryptoKeyVersion supports.
202 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 # CryptoKeyVersion. Only present if the underlying key material was
204 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700205 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700206 # configuring a CryptoKeyVersion that are specific to the
207 # EXTERNAL protection level.
208 # configuring a CryptoKeyVersion that are specific to the
209 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700212 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
213 # destroyed. Only present if state is
214 # DESTROYED.
215 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
216 # was imported.
217 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
218 # for destruction. Only present if state is
219 # DESTROY_SCHEDULED.
220 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
221 # state is
222 # IMPORT_FAILED.
223 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
224 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
225 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
226 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
227 # creation time. Use this statement to verify attributes of the key as stored
228 # on the HSM, independently of Google. Only provided for key versions with
229 # protection_level HSM.
230 # information, see [Verifying attestations]
231 # (https://cloud.google.com/kms/docs/attest-key).
232 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
233 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
234 # operation was performed.
235 },
236 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
237 # generated.
238 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
239 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400240}
241
242 x__xgafv: string, V1 error format.
243 Allowed values
244 1 - v1 error format
245 2 - v2 error format
246
247Returns:
248 An object of the form:
249
250 { # A CryptoKeyVersion represents an individual cryptographic key, and the
251 # associated key material.
252 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253 # An ENABLED version can be
254 # used for cryptographic operations.
255 #
256 # For security reasons, the raw cryptographic key material represented by a
257 # CryptoKeyVersion can never be viewed or exported. It can only be used to
258 # encrypt, decrypt, or sign data when an authorized user or application invokes
259 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
261 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
262 # CryptoKeyVersion supports.
263 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 # CryptoKeyVersion. Only present if the underlying key material was
265 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 # configuring a CryptoKeyVersion that are specific to the
268 # EXTERNAL protection level.
269 # configuring a CryptoKeyVersion that are specific to the
270 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700272 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700273 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
274 # destroyed. Only present if state is
275 # DESTROYED.
276 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
277 # was imported.
278 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
279 # for destruction. Only present if state is
280 # DESTROY_SCHEDULED.
281 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
282 # state is
283 # IMPORT_FAILED.
284 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
285 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
286 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
287 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
288 # creation time. Use this statement to verify attributes of the key as stored
289 # on the HSM, independently of Google. Only provided for key versions with
290 # protection_level HSM.
291 # information, see [Verifying attestations]
292 # (https://cloud.google.com/kms/docs/attest-key).
293 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
294 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
295 # operation was performed.
296 },
297 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
298 # generated.
299 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
300 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400301 }</pre>
302</div>
303
304<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700305 <code class="details" id="destroy">destroy(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400306 <pre>Schedule a CryptoKeyVersion for destruction.
307
308Upon calling this method, CryptoKeyVersion.state will be set to
309DESTROY_SCHEDULED
310and destroy_time will be set to a time 24
311hours in the future, at which point the state
312will be changed to
313DESTROYED, and the key
314material will be irrevocably destroyed.
315
316Before the destroy_time is reached,
317RestoreCryptoKeyVersion may be called to reverse the process.
318
319Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 name: string, Required. The resource name of the CryptoKeyVersion to destroy. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400322 The object takes the form of:
323
324{ # Request message for KeyManagementService.DestroyCryptoKeyVersion.
325 }
326
327 x__xgafv: string, V1 error format.
328 Allowed values
329 1 - v1 error format
330 2 - v2 error format
331
332Returns:
333 An object of the form:
334
335 { # A CryptoKeyVersion represents an individual cryptographic key, and the
336 # associated key material.
337 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 # An ENABLED version can be
339 # used for cryptographic operations.
340 #
341 # For security reasons, the raw cryptographic key material represented by a
342 # CryptoKeyVersion can never be viewed or exported. It can only be used to
343 # encrypt, decrypt, or sign data when an authorized user or application invokes
344 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
346 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
347 # CryptoKeyVersion supports.
348 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 # CryptoKeyVersion. Only present if the underlying key material was
350 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 # configuring a CryptoKeyVersion that are specific to the
353 # EXTERNAL protection level.
354 # configuring a CryptoKeyVersion that are specific to the
355 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700358 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
359 # destroyed. Only present if state is
360 # DESTROYED.
361 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
362 # was imported.
363 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
364 # for destruction. Only present if state is
365 # DESTROY_SCHEDULED.
366 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
367 # state is
368 # IMPORT_FAILED.
369 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
370 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
371 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
372 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
373 # creation time. Use this statement to verify attributes of the key as stored
374 # on the HSM, independently of Google. Only provided for key versions with
375 # protection_level HSM.
376 # information, see [Verifying attestations]
377 # (https://cloud.google.com/kms/docs/attest-key).
378 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
379 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
380 # operation was performed.
381 },
382 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
383 # generated.
384 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
385 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400386 }</pre>
387</div>
388
389<div class="method">
390 <code class="details" id="get">get(name, x__xgafv=None)</code>
391 <pre>Returns metadata for a given CryptoKeyVersion.
392
393Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700394 name: string, Required. The name of the CryptoKeyVersion to get. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400395 x__xgafv: string, V1 error format.
396 Allowed values
397 1 - v1 error format
398 2 - v2 error format
399
400Returns:
401 An object of the form:
402
403 { # A CryptoKeyVersion represents an individual cryptographic key, and the
404 # associated key material.
405 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 # An ENABLED version can be
407 # used for cryptographic operations.
408 #
409 # For security reasons, the raw cryptographic key material represented by a
410 # CryptoKeyVersion can never be viewed or exported. It can only be used to
411 # encrypt, decrypt, or sign data when an authorized user or application invokes
412 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700413 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
414 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
415 # CryptoKeyVersion supports.
416 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 # CryptoKeyVersion. Only present if the underlying key material was
418 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700420 # configuring a CryptoKeyVersion that are specific to the
421 # EXTERNAL protection level.
422 # configuring a CryptoKeyVersion that are specific to the
423 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700424 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700426 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
427 # destroyed. Only present if state is
428 # DESTROYED.
429 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
430 # was imported.
431 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
432 # for destruction. Only present if state is
433 # DESTROY_SCHEDULED.
434 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
435 # state is
436 # IMPORT_FAILED.
437 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
438 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
439 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
440 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
441 # creation time. Use this statement to verify attributes of the key as stored
442 # on the HSM, independently of Google. Only provided for key versions with
443 # protection_level HSM.
444 # information, see [Verifying attestations]
445 # (https://cloud.google.com/kms/docs/attest-key).
446 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
447 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
448 # operation was performed.
449 },
450 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
451 # generated.
452 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
453 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400454 }</pre>
455</div>
456
457<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 <code class="details" id="getPublicKey">getPublicKey(name, x__xgafv=None)</code>
459 <pre>Returns the public key for the given CryptoKeyVersion. The
460CryptoKey.purpose must be
461ASYMMETRIC_SIGN or
462ASYMMETRIC_DECRYPT.
463
464Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700465 name: string, Required. The name of the CryptoKeyVersion public key to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466get. (required)
467 x__xgafv: string, V1 error format.
468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
471
472Returns:
473 An object of the form:
474
475 { # The public key for a given CryptoKeyVersion. Obtained via
476 # GetPublicKey.
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;algorithm&quot;: &quot;A String&quot;, # The Algorithm associated
478 # with this key.
479 &quot;pem&quot;: &quot;A String&quot;, # The public key, encoded in PEM format. For more information, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700480 # [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
481 # [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
482 # [Textual Encoding of Subject Public Key Info]
483 # (https://tools.ietf.org/html/rfc7468#section-13).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 }</pre>
485</div>
486
487<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 <code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
489 <pre>Imports a new CryptoKeyVersion into an existing CryptoKey using the
490wrapped key material provided in the request.
491
492The version ID will be assigned the next sequential id within the
493CryptoKey.
494
495Args:
496 parent: string, Required. The name of the CryptoKey to
497be imported into. (required)
498 body: object, The request body.
499 The object takes the form of:
500
501{ # Request message for KeyManagementService.ImportCryptoKeyVersion.
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;rsaAesWrappedKey&quot;: &quot;A String&quot;, # Wrapped key material produced with
Dan O'Mearadd494642020-05-01 07:42:23 -0700503 # RSA_OAEP_3072_SHA1_AES_256
504 # or
505 # RSA_OAEP_4096_SHA1_AES_256.
506 #
507 # This field contains the concatenation of two wrapped keys:
508 # &lt;ol&gt;
509 # &lt;li&gt;An ephemeral AES-256 wrapping key wrapped with the
510 # public_key using RSAES-OAEP with SHA-1,
511 # MGF1 with SHA-1, and an empty label.
512 # &lt;/li&gt;
513 # &lt;li&gt;The key to be imported, wrapped with the ephemeral AES-256 key
514 # using AES-KWP (RFC 5649).
515 # &lt;/li&gt;
516 # &lt;/ol&gt;
517 #
518 # If importing symmetric key material, it is expected that the unwrapped
519 # key contains plain bytes. If importing asymmetric key material, it is
520 # expected that the unwrapped key is in PKCS#8-encoded DER format (the
521 # PrivateKeyInfo structure from RFC 5208).
522 #
523 # This format is the same as the format produced by PKCS#11 mechanism
524 # CKM_RSA_AES_KEY_WRAP.
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 &quot;importJob&quot;: &quot;A String&quot;, # Required. The name of the ImportJob that was used to
526 # wrap this key material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700527 &quot;algorithm&quot;: &quot;A String&quot;, # Required. The algorithm of
528 # the key being imported. This does not need to match the
529 # version_template of the CryptoKey this
530 # version imports into.
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 }
532
533 x__xgafv: string, V1 error format.
534 Allowed values
535 1 - v1 error format
536 2 - v2 error format
537
538Returns:
539 An object of the form:
540
541 { # A CryptoKeyVersion represents an individual cryptographic key, and the
542 # associated key material.
543 #
544 # An ENABLED version can be
545 # used for cryptographic operations.
546 #
547 # For security reasons, the raw cryptographic key material represented by a
548 # CryptoKeyVersion can never be viewed or exported. It can only be used to
549 # encrypt, decrypt, or sign data when an authorized user or application invokes
550 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700551 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
552 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
553 # CryptoKeyVersion supports.
554 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 # CryptoKeyVersion. Only present if the underlying key material was
556 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700558 # configuring a CryptoKeyVersion that are specific to the
559 # EXTERNAL protection level.
560 # configuring a CryptoKeyVersion that are specific to the
561 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700564 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
565 # destroyed. Only present if state is
566 # DESTROYED.
567 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
568 # was imported.
569 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
570 # for destruction. Only present if state is
571 # DESTROY_SCHEDULED.
572 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
573 # state is
574 # IMPORT_FAILED.
575 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
576 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
577 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
578 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
579 # creation time. Use this statement to verify attributes of the key as stored
580 # on the HSM, independently of Google. Only provided for key versions with
581 # protection_level HSM.
582 # information, see [Verifying attestations]
583 # (https://cloud.google.com/kms/docs/attest-key).
584 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
585 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
586 # operation was performed.
587 },
588 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
589 # generated.
590 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
591 # performed with this CryptoKeyVersion.
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 }</pre>
593</div>
594
595<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700596 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=None, view=None, orderBy=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400597 <pre>Lists CryptoKeyVersions.
598
599Args:
600 parent: string, Required. The resource name of the CryptoKey to list, in the format
601`projects/*/locations/*/keyRings/*/cryptoKeys/*`. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700602 filter: string, Optional. Only include resources that match the filter in the response. For
603more information, see
604[Sorting and filtering list
605results](https://cloud.google.com/kms/docs/sorting-and-filtering).
Bu Sun Kim65020912020-05-20 12:08:20 -0700606 pageToken: string, Optional. Optional pagination token, returned earlier via
607ListCryptoKeyVersionsResponse.next_page_token.
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 pageSize: integer, Optional. Optional limit on the number of CryptoKeyVersions to
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400609include in the response. Further CryptoKeyVersions can
610subsequently be obtained by including the
611ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
612If unspecified, the server will pick an appropriate default.
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 view: string, The fields to include in the response.
614 orderBy: string, Optional. Specify how the results should be sorted. If not specified, the
615results will be sorted in the default order. For more information, see
616[Sorting and filtering list
617results](https://cloud.google.com/kms/docs/sorting-and-filtering).
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 x__xgafv: string, V1 error format.
619 Allowed values
620 1 - v1 error format
621 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400622
623Returns:
624 An object of the form:
625
626 { # Response message for KeyManagementService.ListCryptoKeyVersions.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700627 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in
628 # ListCryptoKeyVersionsRequest.page_token to retrieve the next page of
629 # results.
630 &quot;totalSize&quot;: 42, # The total number of CryptoKeyVersions that matched the
631 # query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;cryptoKeyVersions&quot;: [ # The list of CryptoKeyVersions.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400633 { # A CryptoKeyVersion represents an individual cryptographic key, and the
634 # associated key material.
635 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 # An ENABLED version can be
637 # used for cryptographic operations.
638 #
639 # For security reasons, the raw cryptographic key material represented by a
640 # CryptoKeyVersion can never be viewed or exported. It can only be used to
641 # encrypt, decrypt, or sign data when an authorized user or application invokes
642 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
644 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
645 # CryptoKeyVersion supports.
646 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700647 # CryptoKeyVersion. Only present if the underlying key material was
648 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 # configuring a CryptoKeyVersion that are specific to the
651 # EXTERNAL protection level.
652 # configuring a CryptoKeyVersion that are specific to the
653 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700656 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
657 # destroyed. Only present if state is
658 # DESTROYED.
659 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
660 # was imported.
661 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
662 # for destruction. Only present if state is
663 # DESTROY_SCHEDULED.
664 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
665 # state is
666 # IMPORT_FAILED.
667 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
668 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
669 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
670 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
671 # creation time. Use this statement to verify attributes of the key as stored
672 # on the HSM, independently of Google. Only provided for key versions with
673 # protection_level HSM.
674 # information, see [Verifying attestations]
675 # (https://cloud.google.com/kms/docs/attest-key).
676 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
677 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
678 # operation was performed.
679 },
680 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
681 # generated.
682 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
683 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400684 },
685 ],
686 }</pre>
687</div>
688
689<div class="method">
690 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
691 <pre>Retrieves the next page of results.
692
693Args:
694 previous_request: The request for the previous page. (required)
695 previous_response: The response from the request for the previous page. (required)
696
697Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400699 page. Returns None if there are no more items in the collection.
700 </pre>
701</div>
702
703<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 <pre>Update a CryptoKeyVersion&#x27;s metadata.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400706
707state may be changed between
708ENABLED and
709DISABLED using this
710method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to
711move between other states.
712
713Args:
714 name: string, Output only. The resource name for this CryptoKeyVersion in the format
715`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400717 The object takes the form of:
718
719{ # A CryptoKeyVersion represents an individual cryptographic key, and the
720 # associated key material.
721 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 # An ENABLED version can be
723 # used for cryptographic operations.
724 #
725 # For security reasons, the raw cryptographic key material represented by a
726 # CryptoKeyVersion can never be viewed or exported. It can only be used to
727 # encrypt, decrypt, or sign data when an authorized user or application invokes
728 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
730 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
731 # CryptoKeyVersion supports.
732 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700733 # CryptoKeyVersion. Only present if the underlying key material was
734 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 # configuring a CryptoKeyVersion that are specific to the
737 # EXTERNAL protection level.
738 # configuring a CryptoKeyVersion that are specific to the
739 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700742 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
743 # destroyed. Only present if state is
744 # DESTROYED.
745 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
746 # was imported.
747 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
748 # for destruction. Only present if state is
749 # DESTROY_SCHEDULED.
750 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
751 # state is
752 # IMPORT_FAILED.
753 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
754 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
755 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
756 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
757 # creation time. Use this statement to verify attributes of the key as stored
758 # on the HSM, independently of Google. Only provided for key versions with
759 # protection_level HSM.
760 # information, see [Verifying attestations]
761 # (https://cloud.google.com/kms/docs/attest-key).
762 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
763 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
764 # operation was performed.
765 },
766 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
767 # generated.
768 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
769 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400770}
771
Dan O'Mearadd494642020-05-01 07:42:23 -0700772 updateMask: string, Required. List of fields to be updated in this request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400773 x__xgafv: string, V1 error format.
774 Allowed values
775 1 - v1 error format
776 2 - v2 error format
777
778Returns:
779 An object of the form:
780
781 { # A CryptoKeyVersion represents an individual cryptographic key, and the
782 # associated key material.
783 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700784 # An ENABLED version can be
785 # used for cryptographic operations.
786 #
787 # For security reasons, the raw cryptographic key material represented by a
788 # CryptoKeyVersion can never be viewed or exported. It can only be used to
789 # encrypt, decrypt, or sign data when an authorized user or application invokes
790 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
792 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
793 # CryptoKeyVersion supports.
794 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 # CryptoKeyVersion. Only present if the underlying key material was
796 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700798 # configuring a CryptoKeyVersion that are specific to the
799 # EXTERNAL protection level.
800 # configuring a CryptoKeyVersion that are specific to the
801 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700804 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
805 # destroyed. Only present if state is
806 # DESTROYED.
807 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
808 # was imported.
809 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
810 # for destruction. Only present if state is
811 # DESTROY_SCHEDULED.
812 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
813 # state is
814 # IMPORT_FAILED.
815 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
816 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
817 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
818 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
819 # creation time. Use this statement to verify attributes of the key as stored
820 # on the HSM, independently of Google. Only provided for key versions with
821 # protection_level HSM.
822 # information, see [Verifying attestations]
823 # (https://cloud.google.com/kms/docs/attest-key).
824 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
825 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
826 # operation was performed.
827 },
828 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
829 # generated.
830 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
831 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400832 }</pre>
833</div>
834
835<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 <code class="details" id="restore">restore(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400837 <pre>Restore a CryptoKeyVersion in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838DESTROY_SCHEDULED
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400839state.
840
841Upon restoration of the CryptoKeyVersion, state
842will be set to DISABLED,
843and destroy_time will be cleared.
844
845Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 name: string, Required. The resource name of the CryptoKeyVersion to restore. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700847 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400848 The object takes the form of:
849
850{ # Request message for KeyManagementService.RestoreCryptoKeyVersion.
851 }
852
853 x__xgafv: string, V1 error format.
854 Allowed values
855 1 - v1 error format
856 2 - v2 error format
857
858Returns:
859 An object of the form:
860
861 { # A CryptoKeyVersion represents an individual cryptographic key, and the
862 # associated key material.
863 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 # An ENABLED version can be
865 # used for cryptographic operations.
866 #
867 # For security reasons, the raw cryptographic key material represented by a
868 # CryptoKeyVersion can never be viewed or exported. It can only be used to
869 # encrypt, decrypt, or sign data when an authorized user or application invokes
870 # Cloud KMS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700871 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
872 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
873 # CryptoKeyVersion supports.
874 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 # CryptoKeyVersion. Only present if the underlying key material was
876 # imported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
Dan O'Mearadd494642020-05-01 07:42:23 -0700878 # configuring a CryptoKeyVersion that are specific to the
879 # EXTERNAL protection level.
880 # configuring a CryptoKeyVersion that are specific to the
881 # EXTERNAL protection level.
Bu Sun Kim65020912020-05-20 12:08:20 -0700882 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
Dan O'Mearadd494642020-05-01 07:42:23 -0700883 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700884 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
885 # destroyed. Only present if state is
886 # DESTROYED.
887 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
888 # was imported.
889 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
890 # for destruction. Only present if state is
891 # DESTROY_SCHEDULED.
892 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
893 # state is
894 # IMPORT_FAILED.
895 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
896 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
897 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
898 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more # Output only. Statement that was generated and signed by the HSM at key
899 # creation time. Use this statement to verify attributes of the key as stored
900 # on the HSM, independently of Google. Only provided for key versions with
901 # protection_level HSM.
902 # information, see [Verifying attestations]
903 # (https://cloud.google.com/kms/docs/attest-key).
904 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
905 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
906 # operation was performed.
907 },
908 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
909 # generated.
910 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
911 # performed with this CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400912 }</pre>
913</div>
914
915</body></html>