blob: 86159dd64c8243026e3f7647d1666ecc4c5ec345 [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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<p class="firstline">Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<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>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#destroy">destroy(name, body=None, x__xgafv=None)</a></code></p>
yoshi-code-botcdf480e2021-08-17 00:20:40 -070091<p class="firstline">Schedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will be set to the time destroy_scheduled_duration in the future. At that time, the state will automatically change to DESTROYED, and the key material will be irrevocably destroyed. Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040092<p class="toc_element">
93 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
94<p class="firstline">Returns metadata for a given CryptoKeyVersion.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#getPublicKey">getPublicKey(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700100<p class="firstline">Import wrapped key material into a CryptoKeyVersion. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request, key material will be reimported into that version. Otherwise, a new version will be created, and will be assigned the next sequential id within the CryptoKey.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700101<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800102 <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, view=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103<p class="firstline">Lists CryptoKeyVersions.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
yoshi-code-botb539cc42021-08-03 00:20:27 -0700108 <code><a href="#macSign">macSign(name, body=None, x__xgafv=None)</a></code></p>
109<p class="firstline">Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.</p>
110<p class="toc_element">
111 <code><a href="#macVerify">macVerify(name, body=None, x__xgafv=None)</a></code></p>
112<p class="firstline">Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115<p class="firstline">Update a CryptoKeyVersion's metadata. state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#restore">restore(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118<p class="firstline">Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400119<h3>Method Details</h3>
120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 <code class="details" id="asymmetricDecrypt">asymmetricDecrypt(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700122 <pre>Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123
124Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700125 name: string, Required. The resource name of the CryptoKeyVersion to use for decryption. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127 The object takes the form of:
128
129{ # Request message for KeyManagementService.AsymmetricDecrypt.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800130 &quot;ciphertext&quot;: &quot;A String&quot;, # Required. The data encrypted with the named CryptoKeyVersion&#x27;s public key using OAEP.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700131 &quot;ciphertextCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the AsymmetricDecryptRequest.ciphertext. If specified, KeyManagementService will verify the integrity of the received AsymmetricDecryptRequest.ciphertext using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(AsymmetricDecryptRequest.ciphertext) is equal to AsymmetricDecryptRequest.ciphertext_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800132}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133
134 x__xgafv: string, V1 error format.
135 Allowed values
136 1 - v1 error format
137 2 - v2 error format
138
139Returns:
140 An object of the form:
141
142 { # Response message for KeyManagementService.AsymmetricDecrypt.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800143 &quot;plaintext&quot;: &quot;A String&quot;, # The decrypted data originally encrypted with the matching public key.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700144 &quot;plaintextCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned AsymmetricDecryptResponse.plaintext. An integrity check of AsymmetricDecryptResponse.plaintext can be performed by computing the CRC32C checksum of AsymmetricDecryptResponse.plaintext and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800145 &quot;protectionLevel&quot;: &quot;A String&quot;, # The ProtectionLevel of the CryptoKeyVersion used in decryption.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700146 &quot;verifiedCiphertextCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether AsymmetricDecryptRequest.ciphertext_crc32c was received by KeyManagementService and used for the integrity verification of the ciphertext. A false value of this field indicates either that AsymmetricDecryptRequest.ciphertext_crc32c was left unset or that it was not delivered to KeyManagementService. If you&#x27;ve set AsymmetricDecryptRequest.ciphertext_crc32c but this field is still false, discard the response and perform a limited number of retries.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800147}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148</div>
149
150<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 <code class="details" id="asymmetricSign">asymmetricSign(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700152 <pre>Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153
154Args:
155 name: string, Required. The resource name of the CryptoKeyVersion to use for signing. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 The object takes the form of:
158
159{ # Request message for KeyManagementService.AsymmetricSign.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800160 &quot;digest&quot;: { # A Digest holds a cryptographic message digest. # Optional. The digest of the data to sign. The digest must be produced with the same digest algorithm as specified by the key version&#x27;s algorithm.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800161 &quot;sha256&quot;: &quot;A String&quot;, # A message digest produced with the SHA-256 algorithm.
162 &quot;sha384&quot;: &quot;A String&quot;, # A message digest produced with the SHA-384 algorithm.
163 &quot;sha512&quot;: &quot;A String&quot;, # A message digest produced with the SHA-512 algorithm.
164 },
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700165 &quot;digestCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the AsymmetricSignRequest.digest. If specified, KeyManagementService will verify the integrity of the received AsymmetricSignRequest.digest using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(AsymmetricSignRequest.digest) is equal to AsymmetricSignRequest.digest_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800166}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167
168 x__xgafv: string, V1 error format.
169 Allowed values
170 1 - v1 error format
171 2 - v2 error format
172
173Returns:
174 An object of the form:
175
176 { # Response message for KeyManagementService.AsymmetricSign.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700177 &quot;name&quot;: &quot;A String&quot;, # The resource name of the CryptoKeyVersion used for signing. Check this field to verify that the intended resource was used for signing.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800178 &quot;protectionLevel&quot;: &quot;A String&quot;, # The ProtectionLevel of the CryptoKeyVersion used for signing.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800179 &quot;signature&quot;: &quot;A String&quot;, # The created signature.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700180 &quot;signatureCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned AsymmetricSignResponse.signature. An integrity check of AsymmetricSignResponse.signature can be performed by computing the CRC32C checksum of AsymmetricSignResponse.signature and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
181 &quot;verifiedDigestCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether AsymmetricSignRequest.digest_crc32c was received by KeyManagementService and used for the integrity verification of the digest. A false value of this field indicates either that AsymmetricSignRequest.digest_crc32c was left unset or that it was not delivered to KeyManagementService. If you&#x27;ve set AsymmetricSignRequest.digest_crc32c but this field is still false, discard the response and perform a limited number of retries.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800182}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183</div>
184
185<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700186 <code class="details" id="close">close()</code>
187 <pre>Close httplib2 connections.</pre>
188</div>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400189
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700190<div class="method">
191 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
192 <pre>Create a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400193
194Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 parent: string, Required. The name of the CryptoKey associated with the CryptoKeyVersions. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400197 The object takes the form of:
198
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700199{ # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800200 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700201 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700202 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800203 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700204 &quot;A String&quot;,
205 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800206 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
207 &quot;A String&quot;,
208 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800209 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
210 &quot;A String&quot;,
211 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700212 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800213 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
214 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700215 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800216 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800217 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
218 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800219 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
220 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
221 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800222 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700223 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
224 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
225 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800226 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
227 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700228 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800229 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400230}
231
232 x__xgafv: string, V1 error format.
233 Allowed values
234 1 - v1 error format
235 2 - v2 error format
236
237Returns:
238 An object of the form:
239
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700240 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800241 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
242 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
243 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
244 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
245 &quot;A String&quot;,
246 ],
247 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
248 &quot;A String&quot;,
249 ],
250 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
251 &quot;A String&quot;,
252 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700253 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
255 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
256 },
257 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
258 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
259 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
260 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
261 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
262 },
263 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700264 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
265 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
266 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800267 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
268 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700269 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
271}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400272</div>
273
274<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 <code class="details" id="destroy">destroy(name, body=None, x__xgafv=None)</code>
yoshi-code-botcdf480e2021-08-17 00:20:40 -0700276 <pre>Schedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will be set to the time destroy_scheduled_duration in the future. At that time, the state will automatically change to DESTROYED, and the key material will be irrevocably destroyed. Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400277
278Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 name: string, Required. The resource name of the CryptoKeyVersion to destroy. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400281 The object takes the form of:
282
283{ # Request message for KeyManagementService.DestroyCryptoKeyVersion.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800284}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400285
286 x__xgafv: string, V1 error format.
287 Allowed values
288 1 - v1 error format
289 2 - v2 error format
290
291Returns:
292 An object of the form:
293
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700294 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800295 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
296 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
297 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
298 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
299 &quot;A String&quot;,
300 ],
301 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
302 &quot;A String&quot;,
303 ],
304 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
305 &quot;A String&quot;,
306 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700307 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800308 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
309 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
310 },
311 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
312 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
313 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
314 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
315 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
316 },
317 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700318 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
319 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
320 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800321 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
322 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700323 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800324 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
325}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400326</div>
327
328<div class="method">
329 <code class="details" id="get">get(name, x__xgafv=None)</code>
330 <pre>Returns metadata for a given CryptoKeyVersion.
331
332Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 name: string, Required. The name of the CryptoKeyVersion to get. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400334 x__xgafv: string, V1 error format.
335 Allowed values
336 1 - v1 error format
337 2 - v2 error format
338
339Returns:
340 An object of the form:
341
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800343 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
344 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
345 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
346 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
347 &quot;A String&quot;,
348 ],
349 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
350 &quot;A String&quot;,
351 ],
352 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
353 &quot;A String&quot;,
354 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700355 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800356 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
357 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
358 },
359 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
360 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
361 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
362 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
363 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
364 },
365 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700366 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
367 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
368 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800369 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
370 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700371 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800372 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
373}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400374</div>
375
376<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 <code class="details" id="getPublicKey">getPublicKey(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700378 <pre>Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379
380Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700381 name: string, Required. The name of the CryptoKeyVersion public key to get. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 x__xgafv: string, V1 error format.
383 Allowed values
384 1 - v1 error format
385 2 - v2 error format
386
387Returns:
388 An object of the form:
389
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700390 { # The public key for a given CryptoKeyVersion. Obtained via GetPublicKey.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800391 &quot;algorithm&quot;: &quot;A String&quot;, # The Algorithm associated with this key.
392 &quot;name&quot;: &quot;A String&quot;, # The name of the CryptoKeyVersion public key. Provided here for verification. NOTE: This field is in Beta.
393 &quot;pem&quot;: &quot;A String&quot;, # The public key, encoded in PEM format. For more information, see the [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual Encoding of Subject Public Key Info] (https://tools.ietf.org/html/rfc7468#section-13).
394 &quot;pemCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type. NOTE: This field is in Beta.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800395 &quot;protectionLevel&quot;: &quot;A String&quot;, # The ProtectionLevel of the CryptoKeyVersion public key.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800396}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397</div>
398
399<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700400 <code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700401 <pre>Import wrapped key material into a CryptoKeyVersion. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request, key material will be reimported into that version. Otherwise, a new version will be created, and will be assigned the next sequential id within the CryptoKey.
Dan O'Mearadd494642020-05-01 07:42:23 -0700402
403Args:
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700404 parent: string, Required. The name of the CryptoKey to be imported into. The create permission is only required on this key when creating a new CryptoKeyVersion. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700405 body: object, The request body.
406 The object takes the form of:
407
408{ # Request message for KeyManagementService.ImportCryptoKeyVersion.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800409 &quot;algorithm&quot;: &quot;A String&quot;, # Required. The algorithm of the key being imported. This does not need to match the version_template of the CryptoKey this version imports into.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700410 &quot;cryptoKeyVersion&quot;: &quot;A String&quot;, # Optional. The optional name of an existing CryptoKeyVersion to target for an import operation. If this field is not present, a new CryptoKeyVersion containing the supplied key material is created. If this field is present, the supplied key material is imported into the existing CryptoKeyVersion. To import into an existing CryptoKeyVersion, the CryptoKeyVersion must be a child of ImportCryptoKeyVersionRequest.parent, have been previously created via ImportCryptoKeyVersion, and be in DESTROYED or IMPORT_FAILED state. The key material and algorithm must match the previous CryptoKeyVersion exactly if the CryptoKeyVersion has ever contained key material.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;importJob&quot;: &quot;A String&quot;, # Required. The name of the ImportJob that was used to wrap this key material.
412 &quot;rsaAesWrappedKey&quot;: &quot;A String&quot;, # Wrapped key material produced with RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256. This field contains the concatenation of two wrapped keys: 1. An ephemeral AES-256 wrapping key wrapped with the public_key using RSAES-OAEP with SHA-1, MGF1 with SHA-1, and an empty label. 2. The key to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649). If importing symmetric key material, it is expected that the unwrapped key contains plain bytes. If importing asymmetric key material, it is expected that the unwrapped key is in PKCS#8-encoded DER format (the PrivateKeyInfo structure from RFC 5208). This format is the same as the format produced by PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.
413}
Dan O'Mearadd494642020-05-01 07:42:23 -0700414
415 x__xgafv: string, V1 error format.
416 Allowed values
417 1 - v1 error format
418 2 - v2 error format
419
420Returns:
421 An object of the form:
422
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700423 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800424 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
425 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
426 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
427 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
428 &quot;A String&quot;,
429 ],
430 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
431 &quot;A String&quot;,
432 ],
433 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
434 &quot;A String&quot;,
435 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800437 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
438 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
439 },
440 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
441 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
442 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
443 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
444 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
445 },
446 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700447 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
448 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
449 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800450 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
451 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700452 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800453 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
454}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700455</div>
456
457<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800458 <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, view=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400459 <pre>Lists CryptoKeyVersions.
460
461Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700462 parent: string, Required. The resource name of the CryptoKey to list, in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. (required)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800463 filter: string, Optional. Only include resources that match the filter in the response. For more information, see [Sorting and filtering list results](https://cloud.google.com/kms/docs/sorting-and-filtering).
464 orderBy: string, Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see [Sorting and filtering list results](https://cloud.google.com/kms/docs/sorting-and-filtering).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800465 pageSize: integer, Optional. Optional limit on the number of CryptoKeyVersions to include in the response. Further CryptoKeyVersions can subsequently be obtained by including the ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800466 pageToken: string, Optional. Optional pagination token, returned earlier via ListCryptoKeyVersionsResponse.next_page_token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 view: string, The fields to include in the response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700468 Allowed values
469 CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED - Default view for each CryptoKeyVersion. Does not include the attestation field.
470 FULL - Provides all fields in each CryptoKeyVersion, including the attestation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 x__xgafv: string, V1 error format.
472 Allowed values
473 1 - v1 error format
474 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400475
476Returns:
477 An object of the form:
478
479 { # Response message for KeyManagementService.ListCryptoKeyVersions.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800480 &quot;cryptoKeyVersions&quot;: [ # The list of CryptoKeyVersions.
481 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
482 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
483 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
484 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
485 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
486 &quot;A String&quot;,
487 ],
488 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
489 &quot;A String&quot;,
490 ],
491 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
492 &quot;A String&quot;,
493 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700494 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800495 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
496 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400497 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800498 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
499 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
500 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
501 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
502 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
503 },
504 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700505 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
506 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
507 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800508 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
509 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700510 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800511 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
512 },
513 ],
514 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in ListCryptoKeyVersionsRequest.page_token to retrieve the next page of results.
515 &quot;totalSize&quot;: 42, # The total number of CryptoKeyVersions that matched the query.
516}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517</div>
518
519<div class="method">
520 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
521 <pre>Retrieves the next page of results.
522
523Args:
524 previous_request: The request for the previous page. (required)
525 previous_response: The response from the request for the previous page. (required)
526
527Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700528 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400529 page. Returns None if there are no more items in the collection.
530 </pre>
531</div>
532
533<div class="method">
yoshi-code-botb539cc42021-08-03 00:20:27 -0700534 <code class="details" id="macSign">macSign(name, body=None, x__xgafv=None)</code>
535 <pre>Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.
536
537Args:
538 name: string, Required. The resource name of the CryptoKeyVersion to use for signing. (required)
539 body: object, The request body.
540 The object takes the form of:
541
542{ # Request message for KeyManagementService.MacSign.
543 &quot;data&quot;: &quot;A String&quot;, # Required. The data to sign. The MAC tag is computed over this data field based on the specific algorithm.
544 &quot;dataCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the MacSignRequest.data. If specified, KeyManagementService will verify the integrity of the received MacSignRequest.data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(MacSignRequest.data) is equal to MacSignRequest.data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
545}
546
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 { # Response message for KeyManagementService.MacSign.
556 &quot;mac&quot;: &quot;A String&quot;, # The created signature.
557 &quot;macCrc32c&quot;: &quot;A String&quot;, # Integrity verification field. A CRC32C checksum of the returned MacSignResponse.mac. An integrity check of MacSignResponse.mac can be performed by computing the CRC32C checksum of MacSignResponse.mac and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
558 &quot;name&quot;: &quot;A String&quot;, # The resource name of the CryptoKeyVersion used for signing. Check this field to verify that the intended resource was used for signing.
559 &quot;protectionLevel&quot;: &quot;A String&quot;, # The ProtectionLevel of the CryptoKeyVersion used for signing.
560 &quot;verifiedDataCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether MacSignRequest.data_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that MacSignRequest.data_crc32c was left unset or that it was not delivered to KeyManagementService. If you&#x27;ve set MacSignRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.
561}</pre>
562</div>
563
564<div class="method">
565 <code class="details" id="macVerify">macVerify(name, body=None, x__xgafv=None)</code>
566 <pre>Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful.
567
568Args:
569 name: string, Required. The resource name of the CryptoKeyVersion to use for verification. (required)
570 body: object, The request body.
571 The object takes the form of:
572
573{ # Request message for KeyManagementService.MacVerify.
574 &quot;data&quot;: &quot;A String&quot;, # Required. The data used previously as a MacSignRequest.data to generate the MAC tag.
575 &quot;dataCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the MacVerifyRequest.data. If specified, KeyManagementService will verify the integrity of the received MacVerifyRequest.data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(MacVerifyRequest.data) is equal to MacVerifyRequest.data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
576 &quot;mac&quot;: &quot;A String&quot;, # Required. The signature to verify.
577 &quot;macCrc32c&quot;: &quot;A String&quot;, # Optional. An optional CRC32C checksum of the MacVerifyRequest.mac. If specified, KeyManagementService will verify the integrity of the received MacVerifyRequest.mac using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(MacVerifyRequest.tag) is equal to MacVerifyRequest.mac_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
578}
579
580 x__xgafv: string, V1 error format.
581 Allowed values
582 1 - v1 error format
583 2 - v2 error format
584
585Returns:
586 An object of the form:
587
588 { # Response message for KeyManagementService.MacVerify.
589 &quot;name&quot;: &quot;A String&quot;, # The resource name of the CryptoKeyVersion used for verification. Check this field to verify that the intended resource was used for verification.
590 &quot;protectionLevel&quot;: &quot;A String&quot;, # The ProtectionLevel of the CryptoKeyVersion used for verification.
591 &quot;success&quot;: True or False, # This field indicates whether or not the verification operation for MacVerifyRequest.mac over MacVerifyRequest.data was successful.
592 &quot;verifiedDataCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether MacVerifyRequest.data_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that MacVerifyRequest.data_crc32c was left unset or that it was not delivered to KeyManagementService. If you&#x27;ve set MacVerifyRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.
593 &quot;verifiedMacCrc32c&quot;: True or False, # Integrity verification field. A flag indicating whether MacVerifyRequest.mac_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that MacVerifyRequest.mac_crc32c was left unset or that it was not delivered to KeyManagementService. If you&#x27;ve set MacVerifyRequest.mac_crc32c but this field is still false, discard the response and perform a limited number of retries.
594 &quot;verifiedSuccessIntegrity&quot;: True or False, # Integrity verification field. This value is used for the integrity verification of [MacVerifyResponse.success]. If the value of this field contradicts the value of [MacVerifyResponse.success], discard the response and perform a limited number of retries.
595}</pre>
596</div>
597
598<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700599 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700600 <pre>Update a CryptoKeyVersion&#x27;s metadata. state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400601
602Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700603 name: string, Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700604 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400605 The object takes the form of:
606
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700607{ # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800608 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700609 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700610 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800611 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700612 &quot;A String&quot;,
613 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800614 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
615 &quot;A String&quot;,
616 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800617 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
618 &quot;A String&quot;,
619 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700620 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800621 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
622 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700623 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800624 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800625 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
626 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800627 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
628 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
629 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800630 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700631 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
632 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
633 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800634 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
635 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700636 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800637 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400638}
639
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 updateMask: string, Required. List of fields to be updated in this request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400641 x__xgafv: string, V1 error format.
642 Allowed values
643 1 - v1 error format
644 2 - v2 error format
645
646Returns:
647 An object of the form:
648
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700649 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800650 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
651 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
652 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
653 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
654 &quot;A String&quot;,
655 ],
656 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
657 &quot;A String&quot;,
658 ],
659 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
660 &quot;A String&quot;,
661 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700662 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800663 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
664 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
665 },
666 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
667 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
668 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
669 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
670 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
671 },
672 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700673 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
674 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
675 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800676 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
677 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700678 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800679 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
680}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400681</div>
682
683<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684 <code class="details" id="restore">restore(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700685 <pre>Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400686
687Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 name: string, Required. The resource name of the CryptoKeyVersion to restore. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400690 The object takes the form of:
691
692{ # Request message for KeyManagementService.RestoreCryptoKeyVersion.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800693}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400694
695 x__xgafv: string, V1 error format.
696 Allowed values
697 1 - v1 error format
698 2 - v2 error format
699
700Returns:
701 An object of the form:
702
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700703 { # A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. An ENABLED version can be used for cryptographic operations. For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800704 &quot;algorithm&quot;: &quot;A String&quot;, # Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.
705 &quot;attestation&quot;: { # Contains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key). # Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.
706 &quot;certChains&quot;: { # Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2. # Output only. The certificate chains needed to validate the attestation
707 &quot;caviumCerts&quot;: [ # Cavium certificate chain corresponding to the attestation.
708 &quot;A String&quot;,
709 ],
710 &quot;googleCardCerts&quot;: [ # Google card certificate chain corresponding to the attestation.
711 &quot;A String&quot;,
712 ],
713 &quot;googlePartitionCerts&quot;: [ # Google partition certificate chain corresponding to the attestation.
714 &quot;A String&quot;,
715 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700716 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800717 &quot;content&quot;: &quot;A String&quot;, # Output only. The attestation data provided by the HSM when the key operation was performed.
718 &quot;format&quot;: &quot;A String&quot;, # Output only. The format of the attestation data.
719 },
720 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion was created.
721 &quot;destroyEventTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was destroyed. Only present if state is DESTROYED.
722 &quot;destroyTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
723 &quot;externalProtectionLevelOptions&quot;: { # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level. # ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level.
724 &quot;externalKeyUri&quot;: &quot;A String&quot;, # The URI for an external resource that this CryptoKeyVersion represents.
725 },
726 &quot;generateTime&quot;: &quot;A String&quot;, # Output only. The time this CryptoKeyVersion&#x27;s key material was generated.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700727 &quot;importFailureReason&quot;: &quot;A String&quot;, # Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.
728 &quot;importJob&quot;: &quot;A String&quot;, # Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
729 &quot;importTime&quot;: &quot;A String&quot;, # Output only. The time at which this CryptoKeyVersion&#x27;s key material was most recently imported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800730 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for this CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
731 &quot;protectionLevel&quot;: &quot;A String&quot;, # Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
yoshi-code-bot8bb904c2021-08-31 00:28:27 -0700732 &quot;reimportEligible&quot;: True or False, # Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800733 &quot;state&quot;: &quot;A String&quot;, # The current state of the CryptoKeyVersion.
734}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400735</div>
736
737</body></html>