Skip to main content

crypto_key_versions_public_key

Creates, updates, deletes, gets or lists a crypto_key_versions_public_key resource.

Overview

Namecrypto_key_versions_public_key
TypeResource
Idgoogle.cloudkms.crypto_key_versions_public_key

Fields

NameDatatypeDescription
namestringThe name of the CryptoKeyVersion public key. Provided here for verification. NOTE: This field is in Beta.
algorithmstringThe Algorithm associated with this key.
pemstringThe public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and [Textual Encoding of Subject Public Key Info] (https://tools.ietf.org/html/rfc7468#section-13).
pemCrc32cstringIntegrity 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.
protectionLevelstringThe ProtectionLevel of the CryptoKeyVersion public key.

Methods

NameAccessible byRequired ParamsDescription
get_public_keySELECTcryptoKeyVersionsId, cryptoKeysId, keyRingsId, locationsId, projectsIdReturns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.

SELECT examples

Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.

SELECT
name,
algorithm,
pem,
pemCrc32c,
protectionLevel
FROM google.cloudkms.crypto_key_versions_public_key
WHERE cryptoKeyVersionsId = '{{ cryptoKeyVersionsId }}'
AND cryptoKeysId = '{{ cryptoKeysId }}'
AND keyRingsId = '{{ keyRingsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';