1<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 75<h1><a href="cloudkms_v1.html">Google 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> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p> 79<p class="firstline">Create a new CryptoKeyVersion in a CryptoKey.</p> 80<p class="toc_element"> 81 <code><a href="#destroy">destroy(name, body, x__xgafv=None)</a></code></p> 82<p class="firstline">Schedule a CryptoKeyVersion for destruction.</p> 83<p class="toc_element"> 84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 85<p class="firstline">Returns metadata for a given CryptoKeyVersion.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Lists CryptoKeyVersions.</p> 89<p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91<p class="firstline">Retrieves the next page of results.</p> 92<p class="toc_element"> 93 <code><a href="#patch">patch(name, body, updateMask=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Update a CryptoKeyVersion's metadata.</p> 95<p class="toc_element"> 96 <code><a href="#restore">restore(name, body, x__xgafv=None)</a></code></p> 97<p class="firstline">Restore a CryptoKeyVersion in the</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="create">create(parent, body, x__xgafv=None)</code> 101 <pre>Create a new CryptoKeyVersion in a CryptoKey. 102 103The server will assign the next sequential id. If unset, 104state will be set to 105ENABLED. 106 107Args: 108 parent: string, Required. The name of the CryptoKey associated with 109the CryptoKeyVersions. (required) 110 body: object, The request body. (required) 111 The object takes the form of: 112 113{ # A CryptoKeyVersion represents an individual cryptographic key, and the 114 # associated key material. 115 # 116 # It can be used for cryptographic operations either directly, or via its 117 # parent CryptoKey, in which case the server will choose the appropriate 118 # version for the operation. 119 "state": "A String", # The current state of the CryptoKeyVersion. 120 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 121 # for destruction. Only present if state is 122 # DESTROY_SCHEDULED. 123 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 124 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 125 # destroyed. Only present if state is 126 # DESTROYED. 127 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 128 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 129} 130 131 x__xgafv: string, V1 error format. 132 Allowed values 133 1 - v1 error format 134 2 - v2 error format 135 136Returns: 137 An object of the form: 138 139 { # A CryptoKeyVersion represents an individual cryptographic key, and the 140 # associated key material. 141 # 142 # It can be used for cryptographic operations either directly, or via its 143 # parent CryptoKey, in which case the server will choose the appropriate 144 # version for the operation. 145 "state": "A String", # The current state of the CryptoKeyVersion. 146 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 147 # for destruction. Only present if state is 148 # DESTROY_SCHEDULED. 149 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 150 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 151 # destroyed. Only present if state is 152 # DESTROYED. 153 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 154 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 155 }</pre> 156</div> 157 158<div class="method"> 159 <code class="details" id="destroy">destroy(name, body, x__xgafv=None)</code> 160 <pre>Schedule a CryptoKeyVersion for destruction. 161 162Upon calling this method, CryptoKeyVersion.state will be set to 163DESTROY_SCHEDULED 164and destroy_time will be set to a time 24 165hours in the future, at which point the state 166will be changed to 167DESTROYED, and the key 168material will be irrevocably destroyed. 169 170Before the destroy_time is reached, 171RestoreCryptoKeyVersion may be called to reverse the process. 172 173Args: 174 name: string, The resource name of the CryptoKeyVersion to destroy. (required) 175 body: object, The request body. (required) 176 The object takes the form of: 177 178{ # Request message for KeyManagementService.DestroyCryptoKeyVersion. 179 } 180 181 x__xgafv: string, V1 error format. 182 Allowed values 183 1 - v1 error format 184 2 - v2 error format 185 186Returns: 187 An object of the form: 188 189 { # A CryptoKeyVersion represents an individual cryptographic key, and the 190 # associated key material. 191 # 192 # It can be used for cryptographic operations either directly, or via its 193 # parent CryptoKey, in which case the server will choose the appropriate 194 # version for the operation. 195 "state": "A String", # The current state of the CryptoKeyVersion. 196 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 197 # for destruction. Only present if state is 198 # DESTROY_SCHEDULED. 199 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 200 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 201 # destroyed. Only present if state is 202 # DESTROYED. 203 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 204 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 205 }</pre> 206</div> 207 208<div class="method"> 209 <code class="details" id="get">get(name, x__xgafv=None)</code> 210 <pre>Returns metadata for a given CryptoKeyVersion. 211 212Args: 213 name: string, The name of the CryptoKeyVersion to get. (required) 214 x__xgafv: string, V1 error format. 215 Allowed values 216 1 - v1 error format 217 2 - v2 error format 218 219Returns: 220 An object of the form: 221 222 { # A CryptoKeyVersion represents an individual cryptographic key, and the 223 # associated key material. 224 # 225 # It can be used for cryptographic operations either directly, or via its 226 # parent CryptoKey, in which case the server will choose the appropriate 227 # version for the operation. 228 "state": "A String", # The current state of the CryptoKeyVersion. 229 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 230 # for destruction. Only present if state is 231 # DESTROY_SCHEDULED. 232 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 233 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 234 # destroyed. Only present if state is 235 # DESTROYED. 236 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 237 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 238 }</pre> 239</div> 240 241<div class="method"> 242 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 243 <pre>Lists CryptoKeyVersions. 244 245Args: 246 parent: string, Required. The resource name of the CryptoKey to list, in the format 247`projects/*/locations/*/keyRings/*/cryptoKeys/*`. (required) 248 pageSize: integer, Optional limit on the number of CryptoKeyVersions to 249include in the response. Further CryptoKeyVersions can 250subsequently be obtained by including the 251ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. 252If unspecified, the server will pick an appropriate default. 253 pageToken: string, Optional pagination token, returned earlier via 254ListCryptoKeyVersionsResponse.next_page_token. 255 x__xgafv: string, V1 error format. 256 Allowed values 257 1 - v1 error format 258 2 - v2 error format 259 260Returns: 261 An object of the form: 262 263 { # Response message for KeyManagementService.ListCryptoKeyVersions. 264 "nextPageToken": "A String", # A token to retrieve next page of results. Pass this value in 265 # ListCryptoKeyVersionsRequest.page_token to retrieve the next page of 266 # results. 267 "totalSize": 42, # The total number of CryptoKeyVersions that matched the 268 # query. 269 "cryptoKeyVersions": [ # The list of CryptoKeyVersions. 270 { # A CryptoKeyVersion represents an individual cryptographic key, and the 271 # associated key material. 272 # 273 # It can be used for cryptographic operations either directly, or via its 274 # parent CryptoKey, in which case the server will choose the appropriate 275 # version for the operation. 276 "state": "A String", # The current state of the CryptoKeyVersion. 277 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 278 # for destruction. Only present if state is 279 # DESTROY_SCHEDULED. 280 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 281 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 282 # destroyed. Only present if state is 283 # DESTROYED. 284 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 285 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 286 }, 287 ], 288 }</pre> 289</div> 290 291<div class="method"> 292 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 293 <pre>Retrieves the next page of results. 294 295Args: 296 previous_request: The request for the previous page. (required) 297 previous_response: The response from the request for the previous page. (required) 298 299Returns: 300 A request object that you can call 'execute()' on to request the next 301 page. Returns None if there are no more items in the collection. 302 </pre> 303</div> 304 305<div class="method"> 306 <code class="details" id="patch">patch(name, body, updateMask=None, x__xgafv=None)</code> 307 <pre>Update a CryptoKeyVersion's metadata. 308 309state may be changed between 310ENABLED and 311DISABLED using this 312method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to 313move between other states. 314 315Args: 316 name: string, Output only. The resource name for this CryptoKeyVersion in the format 317`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. (required) 318 body: object, The request body. (required) 319 The object takes the form of: 320 321{ # A CryptoKeyVersion represents an individual cryptographic key, and the 322 # associated key material. 323 # 324 # It can be used for cryptographic operations either directly, or via its 325 # parent CryptoKey, in which case the server will choose the appropriate 326 # version for the operation. 327 "state": "A String", # The current state of the CryptoKeyVersion. 328 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 329 # for destruction. Only present if state is 330 # DESTROY_SCHEDULED. 331 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 332 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 333 # destroyed. Only present if state is 334 # DESTROYED. 335 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 336 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 337} 338 339 updateMask: string, Required list of fields to be updated in this request. 340 x__xgafv: string, V1 error format. 341 Allowed values 342 1 - v1 error format 343 2 - v2 error format 344 345Returns: 346 An object of the form: 347 348 { # A CryptoKeyVersion represents an individual cryptographic key, and the 349 # associated key material. 350 # 351 # It can be used for cryptographic operations either directly, or via its 352 # parent CryptoKey, in which case the server will choose the appropriate 353 # version for the operation. 354 "state": "A String", # The current state of the CryptoKeyVersion. 355 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 356 # for destruction. Only present if state is 357 # DESTROY_SCHEDULED. 358 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 359 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 360 # destroyed. Only present if state is 361 # DESTROYED. 362 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 363 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 364 }</pre> 365</div> 366 367<div class="method"> 368 <code class="details" id="restore">restore(name, body, x__xgafv=None)</code> 369 <pre>Restore a CryptoKeyVersion in the 370DESTROY_SCHEDULED, 371state. 372 373Upon restoration of the CryptoKeyVersion, state 374will be set to DISABLED, 375and destroy_time will be cleared. 376 377Args: 378 name: string, The resource name of the CryptoKeyVersion to restore. (required) 379 body: object, The request body. (required) 380 The object takes the form of: 381 382{ # Request message for KeyManagementService.RestoreCryptoKeyVersion. 383 } 384 385 x__xgafv: string, V1 error format. 386 Allowed values 387 1 - v1 error format 388 2 - v2 error format 389 390Returns: 391 An object of the form: 392 393 { # A CryptoKeyVersion represents an individual cryptographic key, and the 394 # associated key material. 395 # 396 # It can be used for cryptographic operations either directly, or via its 397 # parent CryptoKey, in which case the server will choose the appropriate 398 # version for the operation. 399 "state": "A String", # The current state of the CryptoKeyVersion. 400 "destroyTime": "A String", # Output only. The time this CryptoKeyVersion's key material is scheduled 401 # for destruction. Only present if state is 402 # DESTROY_SCHEDULED. 403 "createTime": "A String", # Output only. The time at which this CryptoKeyVersion was created. 404 "destroyEventTime": "A String", # Output only. The time this CryptoKeyVersion's key material was 405 # destroyed. Only present if state is 406 # DESTROYED. 407 "name": "A String", # Output only. The resource name for this CryptoKeyVersion in the format 408 # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. 409 }</pre> 410</div> 411 412</body></html>