blob: 351933db85089dcc51a2d07b1c1d3f4ae2529fa5 [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 Kimd059ad82020-07-22 17:02:09 -070099 <code><a href="#list">list(parent, filter=None, orderBy=None, pageToken=None, pageSize=None, view=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 Kimd059ad82020-07-22 17:02:09 -0700124 &quot;ciphertextCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the AsymmetricDecryptRequest.ciphertext.
125 # If specified, KeyManagementService will verify the integrity of the
126 # received AsymmetricDecryptRequest.ciphertext using this checksum.
127 # KeyManagementService will report an error if the checksum verification
128 # fails. If you receive a checksum error, your client should verify that
129 # CRC32C(AsymmetricDecryptRequest.ciphertext) is equal to
130 # AsymmetricDecryptRequest.ciphertext_crc32c, and if so, perform a
131 # limited number of retries. A persistent mismatch may indicate an issue in
132 # your computation of the CRC32C checksum.
133 # Note: This field is defined as int64 for reasons of compatibility across
134 # different languages. However, it is a non-negative integer, which will
135 # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
136 # that support this type.
137 #
138 # NOTE: This field is in Beta.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &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 -0700140 # key using OAEP.
141 }
142
143 x__xgafv: string, V1 error format.
144 Allowed values
145 1 - v1 error format
146 2 - v2 error format
147
148Returns:
149 An object of the form:
150
151 { # Response message for KeyManagementService.AsymmetricDecrypt.
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;plaintext&quot;: &quot;A String&quot;, # The decrypted data originally encrypted with the matching public key.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700153 &quot;verifiedCiphertextCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether
154 # AsymmetricDecryptRequest.ciphertext_crc32c was received by
155 # KeyManagementService and used for the integrity verification of the
156 # ciphertext. A false value of this
157 # field indicates either that AsymmetricDecryptRequest.ciphertext_crc32c
158 # was left unset or that it was not delivered to KeyManagementService. If
159 # you&#x27;ve set AsymmetricDecryptRequest.ciphertext_crc32c but this field is
160 # still false, discard the response and perform a limited number of retries.
161 #
162 # NOTE: This field is in Beta.
163 &quot;plaintextCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned
164 # AsymmetricDecryptResponse.plaintext. An integrity check of
165 # AsymmetricDecryptResponse.plaintext can be performed by computing the
166 # CRC32C checksum of AsymmetricDecryptResponse.plaintext and comparing
167 # your results to this field. Discard the response in case of non-matching
168 # checksum values, and perform a limited number of retries. A persistent
169 # mismatch may indicate an issue in your computation of the CRC32C checksum.
170 # Note: This field is defined as int64 for reasons of compatibility across
171 # different languages. However, it is a non-negative integer, which will
172 # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
173 # that support this type.
174 #
175 # NOTE: This field is in Beta.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 }</pre>
177</div>
178
179<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code class="details" id="asymmetricSign">asymmetricSign(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181 <pre>Signs data using a CryptoKeyVersion with CryptoKey.purpose
182ASYMMETRIC_SIGN, producing a signature that can be verified with the public
183key retrieved from GetPublicKey.
184
185Args:
186 name: string, Required. The resource name of the CryptoKeyVersion to use for signing. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700187 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 The object takes the form of:
189
190{ # Request message for KeyManagementService.AsymmetricSign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 &quot;digest&quot;: { # A Digest holds a cryptographic message digest. # Required. The digest of the data to sign. The digest must be produced with
192 # the same digest algorithm as specified by the key version&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 # algorithm.
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 &quot;sha384&quot;: &quot;A String&quot;, # A message digest produced with the SHA-384 algorithm.
195 &quot;sha256&quot;: &quot;A String&quot;, # A message digest produced with the SHA-256 algorithm.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700196 &quot;sha512&quot;: &quot;A String&quot;, # A message digest produced with the SHA-512 algorithm.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700198 &quot;digestCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the AsymmetricSignRequest.digest. If
199 # specified, KeyManagementService will verify the integrity of the
200 # received AsymmetricSignRequest.digest using this checksum.
201 # KeyManagementService will report an error if the checksum verification
202 # fails. If you receive a checksum error, your client should verify that
203 # CRC32C(AsymmetricSignRequest.digest) is equal to
204 # AsymmetricSignRequest.digest_crc32c, and if so, perform a limited
205 # number of retries. A persistent mismatch may indicate an issue in your
206 # computation of the CRC32C checksum.
207 # Note: This field is defined as int64 for reasons of compatibility across
208 # different languages. However, it is a non-negative integer, which will
209 # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
210 # that support this type.
211 #
212 # NOTE: This field is in Beta.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 }
214
215 x__xgafv: string, V1 error format.
216 Allowed values
217 1 - v1 error format
218 2 - v2 error format
219
220Returns:
221 An object of the form:
222
223 { # Response message for KeyManagementService.AsymmetricSign.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700224 &quot;signatureCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned
225 # AsymmetricSignResponse.signature. An integrity check of
226 # AsymmetricSignResponse.signature can be performed by computing the
227 # CRC32C checksum of AsymmetricSignResponse.signature and comparing your
228 # results to this field. Discard the response in case of non-matching
229 # checksum values, and perform a limited number of retries. A persistent
230 # mismatch may indicate an issue in your computation of the CRC32C checksum.
231 # Note: This field is defined as int64 for reasons of compatibility across
232 # different languages. However, it is a non-negative integer, which will
233 # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
234 # that support this type.
235 #
236 # NOTE: This field is in Beta.
237 &quot;verifiedDigestCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether
238 # AsymmetricSignRequest.digest_crc32c was received by
239 # KeyManagementService and used for the integrity verification of the
240 # digest. A false value of this field
241 # indicates either that AsymmetricSignRequest.digest_crc32c was left
242 # unset or that it was not delivered to KeyManagementService. If you&#x27;ve
243 # set AsymmetricSignRequest.digest_crc32c but this field is still false,
244 # discard the response and perform a limited number of retries.
245 #
246 # NOTE: This field is in Beta.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;signature&quot;: &quot;A String&quot;, # The created signature.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700248 &quot;name&quot;: &quot;A String&quot;, # The resource name of the CryptoKeyVersion used for signing. Check
249 # this field to verify that the intended resource was used for signing.
250 #
251 # NOTE: This field is in Beta.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 }</pre>
253</div>
254
255<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400257 <pre>Create a new CryptoKeyVersion in a CryptoKey.
258
259The server will assign the next sequential id. If unset,
260state will be set to
261ENABLED.
262
263Args:
264 parent: string, Required. The name of the CryptoKey associated with
265the CryptoKeyVersions. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400267 The object takes the form of:
268
269{ # A CryptoKeyVersion represents an individual cryptographic key, and the
270 # associated key material.
271 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 # An ENABLED version can be
273 # used for cryptographic operations.
274 #
275 # For security reasons, the raw cryptographic key material represented by a
276 # CryptoKeyVersion can never be viewed or exported. It can only be used to
277 # encrypt, decrypt, or sign data when an authorized user or application invokes
278 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700279 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
280 # generated.
281 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
282 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700283 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
284 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700285 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
286 # state is
287 # IMPORT_FAILED.
288 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700289 &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
290 # creation time. Use this statement to verify attributes of the key as stored
291 # on the HSM, independently of Google. Only provided for key versions with
292 # protection_level HSM.
293 # information, see [Verifying attestations]
294 # (https://cloud.google.com/kms/docs/attest-key).
295 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
296 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
297 # operation was performed.
298 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700299 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
300 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
301 # for destruction. Only present if state is
302 # DESTROY_SCHEDULED.
303 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
304 # destroyed. Only present if state is
305 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700306 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
307 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700308 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
309 # configuring a CryptoKeyVersion that are specific to the
310 # EXTERNAL protection level.
311 # configuring a CryptoKeyVersion that are specific to the
312 # EXTERNAL protection level.
313 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
314 },
315 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
316 # CryptoKeyVersion. Only present if the underlying key material was
317 # imported.
318 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
319 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400320}
321
322 x__xgafv: string, V1 error format.
323 Allowed values
324 1 - v1 error format
325 2 - v2 error format
326
327Returns:
328 An object of the form:
329
330 { # A CryptoKeyVersion represents an individual cryptographic key, and the
331 # associated key material.
332 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 # An ENABLED version can be
334 # used for cryptographic operations.
335 #
336 # For security reasons, the raw cryptographic key material represented by a
337 # CryptoKeyVersion can never be viewed or exported. It can only be used to
338 # encrypt, decrypt, or sign data when an authorized user or application invokes
339 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700340 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
341 # generated.
342 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
343 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700344 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
345 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700346 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
347 # state is
348 # IMPORT_FAILED.
349 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700350 &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
351 # creation time. Use this statement to verify attributes of the key as stored
352 # on the HSM, independently of Google. Only provided for key versions with
353 # protection_level HSM.
354 # information, see [Verifying attestations]
355 # (https://cloud.google.com/kms/docs/attest-key).
356 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
357 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
358 # operation was performed.
359 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
361 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
362 # for destruction. Only present if state is
363 # DESTROY_SCHEDULED.
364 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
365 # destroyed. Only present if state is
366 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700367 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
368 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700369 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
370 # configuring a CryptoKeyVersion that are specific to the
371 # EXTERNAL protection level.
372 # configuring a CryptoKeyVersion that are specific to the
373 # EXTERNAL protection level.
374 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
375 },
376 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
377 # CryptoKeyVersion. Only present if the underlying key material was
378 # imported.
379 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
380 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400381 }</pre>
382</div>
383
384<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 <code class="details" id="destroy">destroy(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400386 <pre>Schedule a CryptoKeyVersion for destruction.
387
388Upon calling this method, CryptoKeyVersion.state will be set to
389DESTROY_SCHEDULED
390and destroy_time will be set to a time 24
391hours in the future, at which point the state
392will be changed to
393DESTROYED, and the key
394material will be irrevocably destroyed.
395
396Before the destroy_time is reached,
397RestoreCryptoKeyVersion may be called to reverse the process.
398
399Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700400 name: string, Required. The resource name of the CryptoKeyVersion to destroy. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400402 The object takes the form of:
403
404{ # Request message for KeyManagementService.DestroyCryptoKeyVersion.
405 }
406
407 x__xgafv: string, V1 error format.
408 Allowed values
409 1 - v1 error format
410 2 - v2 error format
411
412Returns:
413 An object of the form:
414
415 { # A CryptoKeyVersion represents an individual cryptographic key, and the
416 # associated key material.
417 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 # An ENABLED version can be
419 # used for cryptographic operations.
420 #
421 # For security reasons, the raw cryptographic key material represented by a
422 # CryptoKeyVersion can never be viewed or exported. It can only be used to
423 # encrypt, decrypt, or sign data when an authorized user or application invokes
424 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700425 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
426 # generated.
427 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
428 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700429 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
430 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700431 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
432 # state is
433 # IMPORT_FAILED.
434 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700435 &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
436 # creation time. Use this statement to verify attributes of the key as stored
437 # on the HSM, independently of Google. Only provided for key versions with
438 # protection_level HSM.
439 # information, see [Verifying attestations]
440 # (https://cloud.google.com/kms/docs/attest-key).
441 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
442 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
443 # operation was performed.
444 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700445 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
446 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
447 # for destruction. Only present if state is
448 # DESTROY_SCHEDULED.
449 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
450 # destroyed. Only present if state is
451 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700452 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
453 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700454 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
455 # configuring a CryptoKeyVersion that are specific to the
456 # EXTERNAL protection level.
457 # configuring a CryptoKeyVersion that are specific to the
458 # EXTERNAL protection level.
459 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
460 },
461 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
462 # CryptoKeyVersion. Only present if the underlying key material was
463 # imported.
464 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
465 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400466 }</pre>
467</div>
468
469<div class="method">
470 <code class="details" id="get">get(name, x__xgafv=None)</code>
471 <pre>Returns metadata for a given CryptoKeyVersion.
472
473Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 name: string, Required. The name of the CryptoKeyVersion to get. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400475 x__xgafv: string, V1 error format.
476 Allowed values
477 1 - v1 error format
478 2 - v2 error format
479
480Returns:
481 An object of the form:
482
483 { # A CryptoKeyVersion represents an individual cryptographic key, and the
484 # associated key material.
485 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 # An ENABLED version can be
487 # used for cryptographic operations.
488 #
489 # For security reasons, the raw cryptographic key material represented by a
490 # CryptoKeyVersion can never be viewed or exported. It can only be used to
491 # encrypt, decrypt, or sign data when an authorized user or application invokes
492 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700493 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
494 # generated.
495 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
496 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700497 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
498 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700499 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
500 # state is
501 # IMPORT_FAILED.
502 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700503 &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
504 # creation time. Use this statement to verify attributes of the key as stored
505 # on the HSM, independently of Google. Only provided for key versions with
506 # protection_level HSM.
507 # information, see [Verifying attestations]
508 # (https://cloud.google.com/kms/docs/attest-key).
509 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
510 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
511 # operation was performed.
512 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700513 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
514 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
515 # for destruction. Only present if state is
516 # DESTROY_SCHEDULED.
517 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
518 # destroyed. Only present if state is
519 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700520 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
521 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700522 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
523 # configuring a CryptoKeyVersion that are specific to the
524 # EXTERNAL protection level.
525 # configuring a CryptoKeyVersion that are specific to the
526 # EXTERNAL protection level.
527 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
528 },
529 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
530 # CryptoKeyVersion. Only present if the underlying key material was
531 # imported.
532 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
533 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400534 }</pre>
535</div>
536
537<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 <code class="details" id="getPublicKey">getPublicKey(name, x__xgafv=None)</code>
539 <pre>Returns the public key for the given CryptoKeyVersion. The
540CryptoKey.purpose must be
541ASYMMETRIC_SIGN or
542ASYMMETRIC_DECRYPT.
543
544Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 name: string, Required. The name of the CryptoKeyVersion public key to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700546get. (required)
547 x__xgafv: string, V1 error format.
548 Allowed values
549 1 - v1 error format
550 2 - v2 error format
551
552Returns:
553 An object of the form:
554
555 { # The public key for a given CryptoKeyVersion. Obtained via
556 # GetPublicKey.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700557 &quot;pemCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned
558 # PublicKey.pem. An integrity check of PublicKey.pem can be performed
559 # by computing the CRC32C checksum of PublicKey.pem and
560 # comparing your results to this field. Discard the response in case of
561 # non-matching checksum values, and perform a limited number of retries. A
562 # persistent mismatch may indicate an issue in your computation of the CRC32C
563 # checksum.
564 # Note: This field is defined as int64 for reasons of compatibility across
565 # different languages. However, it is a non-negative integer, which will
566 # never exceed 2^32-1, and can be safely downconverted to uint32 in languages
567 # that support this type.
568 #
569 # NOTE: This field is in Beta.
570 &quot;name&quot;: &quot;A String&quot;, # The name of the CryptoKeyVersion public key.
571 # Provided here for verification.
572 #
573 # NOTE: This field is in Beta.
Bu Sun Kim65020912020-05-20 12:08:20 -0700574 &quot;algorithm&quot;: &quot;A String&quot;, # The Algorithm associated
575 # with this key.
576 &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 -0700577 # [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
578 # [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
579 # [Textual Encoding of Subject Public Key Info]
580 # (https://tools.ietf.org/html/rfc7468#section-13).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 }</pre>
582</div>
583
584<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700585 <code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
586 <pre>Imports a new CryptoKeyVersion into an existing CryptoKey using the
587wrapped key material provided in the request.
588
589The version ID will be assigned the next sequential id within the
590CryptoKey.
591
592Args:
593 parent: string, Required. The name of the CryptoKey to
594be imported into. (required)
595 body: object, The request body.
596 The object takes the form of:
597
598{ # Request message for KeyManagementService.ImportCryptoKeyVersion.
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 &quot;rsaAesWrappedKey&quot;: &quot;A String&quot;, # Wrapped key material produced with
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 # RSA_OAEP_3072_SHA1_AES_256
601 # or
602 # RSA_OAEP_4096_SHA1_AES_256.
603 #
604 # This field contains the concatenation of two wrapped keys:
605 # &lt;ol&gt;
606 # &lt;li&gt;An ephemeral AES-256 wrapping key wrapped with the
607 # public_key using RSAES-OAEP with SHA-1,
608 # MGF1 with SHA-1, and an empty label.
609 # &lt;/li&gt;
610 # &lt;li&gt;The key to be imported, wrapped with the ephemeral AES-256 key
611 # using AES-KWP (RFC 5649).
612 # &lt;/li&gt;
613 # &lt;/ol&gt;
614 #
615 # If importing symmetric key material, it is expected that the unwrapped
616 # key contains plain bytes. If importing asymmetric key material, it is
617 # expected that the unwrapped key is in PKCS#8-encoded DER format (the
618 # PrivateKeyInfo structure from RFC 5208).
619 #
620 # This format is the same as the format produced by PKCS#11 mechanism
621 # CKM_RSA_AES_KEY_WRAP.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;importJob&quot;: &quot;A String&quot;, # Required. The name of the ImportJob that was used to
623 # wrap this key material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700624 &quot;algorithm&quot;: &quot;A String&quot;, # Required. The algorithm of
625 # the key being imported. This does not need to match the
626 # version_template of the CryptoKey this
627 # version imports into.
Dan O'Mearadd494642020-05-01 07:42:23 -0700628 }
629
630 x__xgafv: string, V1 error format.
631 Allowed values
632 1 - v1 error format
633 2 - v2 error format
634
635Returns:
636 An object of the form:
637
638 { # A CryptoKeyVersion represents an individual cryptographic key, and the
639 # associated key material.
640 #
641 # An ENABLED version can be
642 # used for cryptographic operations.
643 #
644 # For security reasons, the raw cryptographic key material represented by a
645 # CryptoKeyVersion can never be viewed or exported. It can only be used to
646 # encrypt, decrypt, or sign data when an authorized user or application invokes
647 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700648 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
649 # generated.
650 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
651 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700652 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
653 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700654 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
655 # state is
656 # IMPORT_FAILED.
657 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700658 &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
659 # creation time. Use this statement to verify attributes of the key as stored
660 # on the HSM, independently of Google. Only provided for key versions with
661 # protection_level HSM.
662 # information, see [Verifying attestations]
663 # (https://cloud.google.com/kms/docs/attest-key).
664 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
665 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
666 # operation was performed.
667 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700668 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
669 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
670 # for destruction. Only present if state is
671 # DESTROY_SCHEDULED.
672 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
673 # destroyed. Only present if state is
674 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700675 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
676 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700677 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
678 # configuring a CryptoKeyVersion that are specific to the
679 # EXTERNAL protection level.
680 # configuring a CryptoKeyVersion that are specific to the
681 # EXTERNAL protection level.
682 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
683 },
684 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
685 # CryptoKeyVersion. Only present if the underlying key material was
686 # imported.
687 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
688 # CryptoKeyVersion supports.
Dan O'Mearadd494642020-05-01 07:42:23 -0700689 }</pre>
690</div>
691
692<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700693 <code class="details" id="list">list(parent, filter=None, orderBy=None, pageToken=None, pageSize=None, view=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400694 <pre>Lists CryptoKeyVersions.
695
696Args:
697 parent: string, Required. The resource name of the CryptoKey to list, in the format
698`projects/*/locations/*/keyRings/*/cryptoKeys/*`. (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700699 filter: string, Optional. Only include resources that match the filter in the response. For
700more information, see
701[Sorting and filtering list
702results](https://cloud.google.com/kms/docs/sorting-and-filtering).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700703 orderBy: string, Optional. Specify how the results should be sorted. If not specified, the
704results will be sorted in the default order. For more information, see
705[Sorting and filtering list
706results](https://cloud.google.com/kms/docs/sorting-and-filtering).
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 pageToken: string, Optional. Optional pagination token, returned earlier via
708ListCryptoKeyVersionsResponse.next_page_token.
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 pageSize: integer, Optional. Optional limit on the number of CryptoKeyVersions to
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400710include in the response. Further CryptoKeyVersions can
711subsequently be obtained by including the
712ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
713If unspecified, the server will pick an appropriate default.
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 view: string, The fields to include in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 x__xgafv: string, V1 error format.
716 Allowed values
717 1 - v1 error format
718 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400719
720Returns:
721 An object of the form:
722
723 { # Response message for KeyManagementService.ListCryptoKeyVersions.
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;cryptoKeyVersions&quot;: [ # The list of CryptoKeyVersions.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400725 { # A CryptoKeyVersion represents an individual cryptographic key, and the
726 # associated key material.
727 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 # An ENABLED version can be
729 # used for cryptographic operations.
730 #
731 # For security reasons, the raw cryptographic key material represented by a
732 # CryptoKeyVersion can never be viewed or exported. It can only be used to
733 # encrypt, decrypt, or sign data when an authorized user or application invokes
734 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700735 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
736 # generated.
737 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
738 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700739 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
740 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700741 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
742 # state is
743 # IMPORT_FAILED.
744 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700745 &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
746 # creation time. Use this statement to verify attributes of the key as stored
747 # on the HSM, independently of Google. Only provided for key versions with
748 # protection_level HSM.
749 # information, see [Verifying attestations]
750 # (https://cloud.google.com/kms/docs/attest-key).
751 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
752 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
753 # operation was performed.
754 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700755 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
756 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
757 # for destruction. Only present if state is
758 # DESTROY_SCHEDULED.
759 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
760 # destroyed. Only present if state is
761 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700762 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
763 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700764 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
765 # configuring a CryptoKeyVersion that are specific to the
766 # EXTERNAL protection level.
767 # configuring a CryptoKeyVersion that are specific to the
768 # EXTERNAL protection level.
769 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
770 },
771 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
772 # CryptoKeyVersion. Only present if the underlying key material was
773 # imported.
774 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
775 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400776 },
777 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700778 &quot;totalSize&quot;: 42, # The total number of CryptoKeyVersions that matched the
779 # query.
780 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in
781 # ListCryptoKeyVersionsRequest.page_token to retrieve the next page of
782 # results.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400783 }</pre>
784</div>
785
786<div class="method">
787 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
788 <pre>Retrieves the next page of results.
789
790Args:
791 previous_request: The request for the previous page. (required)
792 previous_response: The response from the request for the previous page. (required)
793
794Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400796 page. Returns None if there are no more items in the collection.
797 </pre>
798</div>
799
800<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 <pre>Update a CryptoKeyVersion&#x27;s metadata.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400803
804state may be changed between
805ENABLED and
806DISABLED using this
807method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to
808move between other states.
809
810Args:
811 name: string, Output only. The resource name for this CryptoKeyVersion in the format
812`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400814 The object takes the form of:
815
816{ # A CryptoKeyVersion represents an individual cryptographic key, and the
817 # associated key material.
818 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 # An ENABLED version can be
820 # used for cryptographic operations.
821 #
822 # For security reasons, the raw cryptographic key material represented by a
823 # CryptoKeyVersion can never be viewed or exported. It can only be used to
824 # encrypt, decrypt, or sign data when an authorized user or application invokes
825 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700826 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
827 # generated.
828 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
829 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700830 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
831 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700832 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
833 # state is
834 # IMPORT_FAILED.
835 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700836 &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
837 # creation time. Use this statement to verify attributes of the key as stored
838 # on the HSM, independently of Google. Only provided for key versions with
839 # protection_level HSM.
840 # information, see [Verifying attestations]
841 # (https://cloud.google.com/kms/docs/attest-key).
842 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
843 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
844 # operation was performed.
845 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700846 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
847 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
848 # for destruction. Only present if state is
849 # DESTROY_SCHEDULED.
850 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
851 # destroyed. Only present if state is
852 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700853 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
854 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700855 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
856 # configuring a CryptoKeyVersion that are specific to the
857 # EXTERNAL protection level.
858 # configuring a CryptoKeyVersion that are specific to the
859 # EXTERNAL protection level.
860 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
861 },
862 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
863 # CryptoKeyVersion. Only present if the underlying key material was
864 # imported.
865 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
866 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400867}
868
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 updateMask: string, Required. List of fields to be updated in this request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400870 x__xgafv: string, V1 error format.
871 Allowed values
872 1 - v1 error format
873 2 - v2 error format
874
875Returns:
876 An object of the form:
877
878 { # A CryptoKeyVersion represents an individual cryptographic key, and the
879 # associated key material.
880 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881 # An ENABLED version can be
882 # used for cryptographic operations.
883 #
884 # For security reasons, the raw cryptographic key material represented by a
885 # CryptoKeyVersion can never be viewed or exported. It can only be used to
886 # encrypt, decrypt, or sign data when an authorized user or application invokes
887 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700888 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
889 # generated.
890 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
891 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700892 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
893 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700894 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
895 # state is
896 # IMPORT_FAILED.
897 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700898 &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 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700908 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
909 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
910 # for destruction. Only present if state is
911 # DESTROY_SCHEDULED.
912 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
913 # destroyed. Only present if state is
914 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700915 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
916 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700917 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
918 # configuring a CryptoKeyVersion that are specific to the
919 # EXTERNAL protection level.
920 # configuring a CryptoKeyVersion that are specific to the
921 # EXTERNAL protection level.
922 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
923 },
924 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
925 # CryptoKeyVersion. Only present if the underlying key material was
926 # imported.
927 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
928 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400929 }</pre>
930</div>
931
932<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 <code class="details" id="restore">restore(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400934 <pre>Restore a CryptoKeyVersion in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935DESTROY_SCHEDULED
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400936state.
937
938Upon restoration of the CryptoKeyVersion, state
939will be set to DISABLED,
940and destroy_time will be cleared.
941
942Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700943 name: string, Required. The resource name of the CryptoKeyVersion to restore. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400945 The object takes the form of:
946
947{ # Request message for KeyManagementService.RestoreCryptoKeyVersion.
948 }
949
950 x__xgafv: string, V1 error format.
951 Allowed values
952 1 - v1 error format
953 2 - v2 error format
954
955Returns:
956 An object of the form:
957
958 { # A CryptoKeyVersion represents an individual cryptographic key, and the
959 # associated key material.
960 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 # An ENABLED version can be
962 # used for cryptographic operations.
963 #
964 # For security reasons, the raw cryptographic key material represented by a
965 # CryptoKeyVersion can never be viewed or exported. It can only be used to
966 # encrypt, decrypt, or sign data when an authorized user or application invokes
967 # Cloud KMS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700968 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
969 # generated.
970 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format
971 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700972 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material
973 # was imported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700974 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of an import failure. Only present if
975 # state is
976 # IMPORT_FAILED.
977 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700978 &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
979 # creation time. Use this statement to verify attributes of the key as stored
980 # on the HSM, independently of Google. Only provided for key versions with
981 # protection_level HSM.
982 # information, see [Verifying attestations]
983 # (https://cloud.google.com/kms/docs/attest-key).
984 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
985 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key
986 # operation was performed.
987 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700988 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
989 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled
990 # for destruction. Only present if state is
991 # DESTROY_SCHEDULED.
992 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was
993 # destroyed. Only present if state is
994 # DESTROYED.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700995 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are
996 # performed with this CryptoKeyVersion.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700997 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for # ExternalProtectionLevelOptions stores a group of additional fields for
998 # configuring a CryptoKeyVersion that are specific to the
999 # EXTERNAL protection level.
1000 # configuring a CryptoKeyVersion that are specific to the
1001 # EXTERNAL protection level.
1002 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
1003 },
1004 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used to import this
1005 # CryptoKeyVersion. Only present if the underlying key material was
1006 # imported.
1007 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this
1008 # CryptoKeyVersion supports.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001009 }</pre>
1010</div>
1011
1012</body></html>