Class CryptoKey (1.2.1)

ACryptoKey represents a logical keythat can be used for cryptographic operations.

ACryptoKey is made up of one or moreversions, which represent theactual key material used in cryptographic operations.

Output only. A copy of the "primary"CryptoKeyVersion that will be used byEncrypt when thisCryptoKey is given in [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.na me]. TheCryptoKey's primary version can be updated via [UpdateCryptoKeyPrimaryVersion][goo gle.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVe rsion]. All keys withpurpose [ENCRYPT_DEC RYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_ DECRYPT] have a primary. For other keys, this field will be omitted.

Output only. The time at which thisCryptoKey was created.

Controls the rate of automatic rotation.

A template describing settings for newCryptoKeyVersion instances. The properties of newCryptoKeyVersion instances created by either [CreateCryptoKeyVersion][google.cl oud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or auto-rotation are controlled by this template.

Classes

LabelsEntry

API documentation forkms_v1.types.CryptoKey.LabelsEntry class.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-13 UTC.