Package google.cloud.kms.v1

Index

Autokey

Provides interfaces for usingCloud KMS Autokey to provision newCryptoKeys, ready for Customer Managed Encryption Key (CMEK) use, on-demand. To support certain client tooling, this feature is modeled around aKeyHandle resource: creating aKeyHandle in a resource project and given location triggers Cloud KMS Autokey to provision aCryptoKey in the configured key project and the same location.

Prior to use in a given resource project,UpdateAutokeyConfig should have been called on an ancestor folder, setting the key project where Cloud KMS Autokey should create newCryptoKeys. See documentation for additional prerequisites. To check what key project, if any, is currently configured on a resource project's ancestor folder, seeShowEffectiveAutokeyConfig.

CreateKeyHandle

rpc CreateKeyHandle(CreateKeyHandleRequest) returns (Operation)

Creates a newKeyHandle, triggering the provisioning of a newCryptoKey for CMEK use with the given resource type in the configured key project and the same location.GetOperation should be used to resolve the resulting long-running operation and get the resultingKeyHandle andCryptoKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.keyHandles.create

For more information, see theIAM documentation.

GetKeyHandle

rpc GetKeyHandle(GetKeyHandleRequest) returns (KeyHandle)

Returns theKeyHandle.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.keyHandles.get

For more information, see theIAM documentation.

ListKeyHandles

rpc ListKeyHandles(ListKeyHandlesRequest) returns (ListKeyHandlesResponse)

ListsKeyHandles.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.keyHandles.list

For more information, see theIAM documentation.

AutokeyAdmin

Provides interfaces for managingCloud KMS Autokey folder-level or project-level configurations. A configuration is inherited by all descendent folders and projects. A configuration at a folder or project overrides any other configurations in its ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS Autokey, so that users working in a descendant project can request provisionedCryptoKeys, ready for Customer Managed Encryption Key (CMEK) use, on-demand when using the dedicated key project mode. This is not required when using the delegated key management mode for same-project keys.

GetAutokeyConfig

rpc GetAutokeyConfig(GetAutokeyConfigRequest) returns (AutokeyConfig)

Returns theAutokeyConfig for a folder or project.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.autokeyConfigs.get

For more information, see theIAM documentation.

ShowEffectiveAutokeyConfig

rpc ShowEffectiveAutokeyConfig(ShowEffectiveAutokeyConfigRequest) returns (ShowEffectiveAutokeyConfigResponse)

Returns the effective Cloud KMS Autokey configuration for a given project.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.projects.showEffectiveAutokeyConfig

For more information, see theIAM documentation.

UpdateAutokeyConfig

rpc UpdateAutokeyConfig(UpdateAutokeyConfigRequest) returns (AutokeyConfig)

Updates theAutokeyConfig for a folder or a project. The caller must have bothcloudkms.autokeyConfigs.update permission on the parent folder andcloudkms.cryptoKeys.setIamPolicy permission on the provided key project. AKeyHandle creation in the folder's descendant projects will use this configuration to determine where to create the resultingCryptoKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.autokeyConfigs.update

For more information, see theIAM documentation.

EkmService

Google Cloud Key Management EKM Service

Manages external cryptographic keys and operations using those keys. Implements a REST model with the following objects: *EkmConnection

CreateEkmConnection

rpc CreateEkmConnection(CreateEkmConnectionRequest) returns (EkmConnection)

Creates a newEkmConnection in a given Project and Location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetEkmConfig

rpc GetEkmConfig(GetEkmConfigRequest) returns (EkmConfig)

Returns theEkmConfig singleton resource for a given project and location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetEkmConnection

rpc GetEkmConnection(GetEkmConnectionRequest) returns (EkmConnection)

Returns metadata for a givenEkmConnection.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ListEkmConnections

rpc ListEkmConnections(ListEkmConnectionsRequest) returns (ListEkmConnectionsResponse)

ListsEkmConnections.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

UpdateEkmConfig

rpc UpdateEkmConfig(UpdateEkmConfigRequest) returns (EkmConfig)

Updates theEkmConfig singleton resource for a given project and location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

UpdateEkmConnection

rpc UpdateEkmConnection(UpdateEkmConnectionRequest) returns (EkmConnection)

Updates anEkmConnection's metadata.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

VerifyConnectivity

rpc VerifyConnectivity(VerifyConnectivityRequest) returns (VerifyConnectivityResponse)

Verifies that Cloud KMS can successfully connect to the external key manager specified by anEkmConnection. If there is an error connecting to the EKM, this method returns a FAILED_PRECONDITION status containing structured information as described athttps://cloud.google.com/kms/docs/reference/ekm_errors.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

HsmManagement

Google Cloud HSM Management Service

Provides interfaces for managing HSM instances.

Implements a REST model with the following objects: *SingleTenantHsmInstance *SingleTenantHsmInstanceProposal

ApproveSingleTenantHsmInstanceProposal

rpc ApproveSingleTenantHsmInstanceProposal(ApproveSingleTenantHsmInstanceProposalRequest) returns (ApproveSingleTenantHsmInstanceProposalResponse)

Approves aSingleTenantHsmInstanceProposal for a givenSingleTenantHsmInstance. The proposal must be in thePENDING state.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.singleTenantHsmInstanceProposals.approve

For more information, see theIAM documentation.

CreateSingleTenantHsmInstance

rpc CreateSingleTenantHsmInstance(CreateSingleTenantHsmInstanceRequest) returns (Operation)

Creates a newSingleTenantHsmInstance in a given Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this single-tenant HSM instance to finish setup of the instance.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.singleTenantHsmInstances.create

For more information, see theIAM documentation.

CreateSingleTenantHsmInstanceProposal

rpc CreateSingleTenantHsmInstanceProposal(CreateSingleTenantHsmInstanceProposalRequest) returns (Operation)

Creates a newSingleTenantHsmInstanceProposal for a givenSingleTenantHsmInstance.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.singleTenantHsmInstanceProposals.create

For more information, see theIAM documentation.

DeleteSingleTenantHsmInstanceProposal

rpc DeleteSingleTenantHsmInstanceProposal(DeleteSingleTenantHsmInstanceProposalRequest) returns (Empty)

Deletes aSingleTenantHsmInstanceProposal.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.singleTenantHsmInstanceProposals.delete

For more information, see theIAM documentation.

ExecuteSingleTenantHsmInstanceProposal

rpc ExecuteSingleTenantHsmInstanceProposal(ExecuteSingleTenantHsmInstanceProposalRequest) returns (Operation)

Executes aSingleTenantHsmInstanceProposal for a givenSingleTenantHsmInstance. The proposal must be in theAPPROVED state.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.singleTenantHsmInstanceProposals.execute

For more information, see theIAM documentation.

GetSingleTenantHsmInstance

rpc GetSingleTenantHsmInstance(GetSingleTenantHsmInstanceRequest) returns (SingleTenantHsmInstance)

Returns metadata for a givenSingleTenantHsmInstance.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.singleTenantHsmInstances.get

For more information, see theIAM documentation.

GetSingleTenantHsmInstanceProposal

rpc GetSingleTenantHsmInstanceProposal(GetSingleTenantHsmInstanceProposalRequest) returns (SingleTenantHsmInstanceProposal)

Returns metadata for a givenSingleTenantHsmInstanceProposal.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • cloudkms.singleTenantHsmInstanceProposals.get

For more information, see theIAM documentation.

ListSingleTenantHsmInstanceProposals

rpc ListSingleTenantHsmInstanceProposals(ListSingleTenantHsmInstanceProposalsRequest) returns (ListSingleTenantHsmInstanceProposalsResponse)

ListsSingleTenantHsmInstanceProposals.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.singleTenantHsmInstanceProposals.list

For more information, see theIAM documentation.

ListSingleTenantHsmInstances

rpc ListSingleTenantHsmInstances(ListSingleTenantHsmInstancesRequest) returns (ListSingleTenantHsmInstancesResponse)

ListsSingleTenantHsmInstances.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on theparent resource:

  • cloudkms.singleTenantHsmInstances.list

For more information, see theIAM documentation.

KeyAccessJustificationsConfig

Service for managing Key Access Justifications policy settings for Cloud Key Management Service keys.

GetKeyAccessJustificationsPolicyConfig

rpc GetKeyAccessJustificationsPolicyConfig(GetKeyAccessJustificationsPolicyConfigRequest) returns (KeyAccessJustificationsPolicyConfig)

Gets theKeyAccessJustificationsPolicyConfig for a given organization, folder, or project.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ShowEffectiveKeyAccessJustificationsEnrollmentConfig

rpc ShowEffectiveKeyAccessJustificationsEnrollmentConfig(ShowEffectiveKeyAccessJustificationsEnrollmentConfigRequest) returns (ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse)

Returns theKeyAccessJustificationsEnrollmentConfig of the resource closest to the given project in hierarchy.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ShowEffectiveKeyAccessJustificationsPolicyConfig

rpc ShowEffectiveKeyAccessJustificationsPolicyConfig(ShowEffectiveKeyAccessJustificationsPolicyConfigRequest) returns (ShowEffectiveKeyAccessJustificationsPolicyConfigResponse)

Returns theKeyAccessJustificationsPolicyConfig of the resource closest to the given project in hierarchy.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

UpdateKeyAccessJustificationsPolicyConfig

rpc UpdateKeyAccessJustificationsPolicyConfig(UpdateKeyAccessJustificationsPolicyConfigRequest) returns (KeyAccessJustificationsPolicyConfig)

Updates theKeyAccessJustificationsPolicyConfig for a given organization, folder, or project.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

KeyManagementService

Google Cloud Key Management Service

Manages cryptographic keys and operations using those keys. Implements a REST model with the following objects:

If you are using manual gRPC libraries, seeUsing gRPC with Cloud KMS.

AsymmetricDecrypt

rpc AsymmetricDecrypt(AsymmetricDecryptRequest) returns (AsymmetricDecryptResponse)

Decrypts data that was encrypted with a public key retrieved fromGetPublicKey corresponding to aCryptoKeyVersion withCryptoKey.purpose ASYMMETRIC_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

AsymmetricSign

rpc AsymmetricSign(AsymmetricSignRequest) returns (AsymmetricSignResponse)

Signs data using aCryptoKeyVersion withCryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved fromGetPublicKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

CreateCryptoKey

rpc CreateCryptoKey(CreateCryptoKeyRequest) returns (CryptoKey)

Create a newCryptoKey within aKeyRing.

CryptoKey.purpose andCryptoKey.version_template.algorithm are required.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

CreateCryptoKeyVersion

rpc CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Create a newCryptoKeyVersion in aCryptoKey.

The server will assign the next sequential id. If unset,state will be set toENABLED.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

CreateImportJob

rpc CreateImportJob(CreateImportJobRequest) returns (ImportJob)

Create a newImportJob within aKeyRing.

ImportJob.import_method is required.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

CreateKeyRing

rpc CreateKeyRing(CreateKeyRingRequest) returns (KeyRing)

Create a newKeyRing in a given Project and Location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

Decapsulate

rpc Decapsulate(DecapsulateRequest) returns (DecapsulateResponse)

Decapsulates data that was encapsulated with a public key retrieved fromGetPublicKey corresponding to aCryptoKeyVersion withCryptoKey.purpose KEY_ENCAPSULATION.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

Decrypt

rpc Decrypt(DecryptRequest) returns (DecryptResponse)

Decrypts data that was protected byEncrypt. TheCryptoKey.purpose must beENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

DestroyCryptoKeyVersion

rpc DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Schedule aCryptoKeyVersion for destruction.

Upon calling this method,CryptoKeyVersion.state will be set toDESTROY_SCHEDULED, anddestroy_time will be set to the timedestroy_scheduled_duration in the future. At that time, thestate will automatically change toDESTROYED, and the key material will be irrevocably destroyed.

Before thedestroy_time is reached,RestoreCryptoKeyVersion may be called to reverse the process.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

Encrypt

rpc Encrypt(EncryptRequest) returns (EncryptResponse)

Encrypts data, so that it can only be recovered by a call toDecrypt. TheCryptoKey.purpose must beENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GenerateRandomBytes

rpc GenerateRandomBytes(GenerateRandomBytesRequest) returns (GenerateRandomBytesResponse)

Generate random bytes using the Cloud KMS randomness source in the provided location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetCryptoKey

rpc GetCryptoKey(GetCryptoKeyRequest) returns (CryptoKey)

Returns metadata for a givenCryptoKey, as well as itsprimaryCryptoKeyVersion.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetCryptoKeyVersion

rpc GetCryptoKeyVersion(GetCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Returns metadata for a givenCryptoKeyVersion.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetImportJob

rpc GetImportJob(GetImportJobRequest) returns (ImportJob)

Returns metadata for a givenImportJob.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetKeyRing

rpc GetKeyRing(GetKeyRingRequest) returns (KeyRing)

Returns metadata for a givenKeyRing.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

GetPublicKey

rpc GetPublicKey(GetPublicKeyRequest) returns (PublicKey)

Returns the public key for the givenCryptoKeyVersion. TheCryptoKey.purpose must beASYMMETRIC_SIGN orASYMMETRIC_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ImportCryptoKeyVersion

rpc ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Import wrapped key material into aCryptoKeyVersion.

All requests must specify aCryptoKey. If aCryptoKeyVersion 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 theCryptoKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ListCryptoKeyVersions

rpc ListCryptoKeyVersions(ListCryptoKeyVersionsRequest) returns (ListCryptoKeyVersionsResponse)

ListsCryptoKeyVersions.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ListCryptoKeys

rpc ListCryptoKeys(ListCryptoKeysRequest) returns (ListCryptoKeysResponse)

ListsCryptoKeys.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ListImportJobs

rpc ListImportJobs(ListImportJobsRequest) returns (ListImportJobsResponse)

ListsImportJobs.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

ListKeyRings

rpc ListKeyRings(ListKeyRingsRequest) returns (ListKeyRingsResponse)

ListsKeyRings.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

MacSign

rpc MacSign(MacSignRequest) returns (MacSignResponse)

Signs data using aCryptoKeyVersion withCryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

MacVerify

rpc MacVerify(MacVerifyRequest) returns (MacVerifyResponse)

Verifies MAC tag using aCryptoKeyVersion withCryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

RawDecrypt

rpc RawDecrypt(RawDecryptRequest) returns (RawDecryptResponse)

Decrypts data that was originally encrypted using a raw cryptographic mechanism. TheCryptoKey.purpose must beRAW_ENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

RawEncrypt

rpc RawEncrypt(RawEncryptRequest) returns (RawEncryptResponse)

Encrypts data using portable cryptographic primitives. Most users should chooseEncrypt andDecrypt rather than their raw counterparts. TheCryptoKey.purpose must beRAW_ENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

RestoreCryptoKeyVersion

rpc RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Restore aCryptoKeyVersion in theDESTROY_SCHEDULED state.

Upon restoration of the CryptoKeyVersion,state will be set toDISABLED, anddestroy_time will be cleared.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

UpdateCryptoKey

rpc UpdateCryptoKey(UpdateCryptoKeyRequest) returns (CryptoKey)

Update aCryptoKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

UpdateCryptoKeyPrimaryVersion

rpc UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest) returns (CryptoKey)

Update the version of aCryptoKey that will be used inEncrypt.

Returns an error if called on a key whose purpose is notENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

UpdateCryptoKeyVersion

rpc UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Update aCryptoKeyVersion's metadata.

state may be changed betweenENABLED andDISABLED using this method. SeeDestroyCryptoKeyVersion andRestoreCryptoKeyVersion to move between other states.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

AccessReason

Describes the reason for a data access. Please refer tohttps://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes for the detailed semantic meaning of justification reason codes.

Enums
REASON_UNSPECIFIEDUnspecified access reason.
CUSTOMER_INITIATED_SUPPORTCustomer-initiated support.
GOOGLE_INITIATED_SERVICEGoogle-initiated access for system management and troubleshooting.
THIRD_PARTY_DATA_REQUESTGoogle-initiated access in response to a legal request or legal process.
GOOGLE_INITIATED_REVIEWGoogle-initiated access for security, fraud, abuse, or compliance purposes.
CUSTOMER_INITIATED_ACCESSCustomer uses their account to perform any access to their own data which their IAM policy authorizes.
GOOGLE_INITIATED_SYSTEM_OPERATIONGoogle systems access customer data to help optimize the structure of the data or quality for future uses by the customer.
REASON_NOT_EXPECTEDNo reason is expected for this key request.
MODIFIED_CUSTOMER_INITIATED_ACCESS

Deprecated: This code is no longer generated by Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes available in both Key Access Justifications and Access Transparency logs provide customer-visible signals of emergency access in more precise contexts.

Customer uses their account to perform any access to their own data which their IAM policy authorizes, and one of the following is true:

  • A Google administrator has reset the root-access account associated with the user's organization within the past 7 days.
  • A Google-initiated emergency access operation has interacted with a resource in the same project or folder as the currently accessed resource within the past 7 days.

This item is deprecated!

MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION

Deprecated: This code is no longer generated by Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes available in both Key Access Justifications and Access Transparency logs provide customer-visible signals of emergency access in more precise contexts.

Google systems access customer data to help optimize the structure of the data or quality for future uses by the customer, and one of the following is true:

  • A Google administrator has reset the root-access account associated with the user's organization within the past 7 days.
  • A Google-initiated emergency access operation has interacted with a resource in the same project or folder as the currently accessed resource within the past 7 days.

This item is deprecated!

GOOGLE_RESPONSE_TO_PRODUCTION_ALERTGoogle-initiated access to maintain system reliability.
CUSTOMER_AUTHORIZED_WORKFLOW_SERVICING

One of the following operations is being executed while simultaneously encountering an internal technical issue which prevented a more precise justification code from being generated:

  • Your account has been used to perform any access to your own data which your IAM policy authorizes.
  • An automated Google system operates on encrypted customer data which your IAM policy authorizes.
  • Customer-initiated Google support access.
  • Google-initiated support access to protect system reliability.

ApproveSingleTenantHsmInstanceProposalRequest

Request message forHsmManagement.ApproveSingleTenantHsmInstanceProposal.

Fields
name

string

Required. Thename of theSingleTenantHsmInstanceProposal to approve.

Union fieldapproval_payload. The approval payload. The type of approval payload must correspond to the type of approval_parameters in the proposal.approval_payload can be only one of the following:
quorum_reply

QuorumReply

Required. The reply toQuorumParameters for approving the proposal.

required_action_quorum_reply

RequiredActionQuorumReply

Required. The reply toRequiredActionQuorumParameters for approving the proposal.

QuorumReply

The reply toQuorumParameters for approving the proposal.

Fields
challenge_replies[]

ChallengeReply

Required. The challenge replies to approve the proposal. Challenge replies can be sent across multiple requests. The proposal will be approved whenrequired_approver_count challenge replies are provided.

RequiredActionQuorumReply

The reply toRequiredActionQuorumParameters for approving the proposal.

Fields
required_challenge_replies[]

ChallengeReply

Required. All required challenges must be signed for the proposal to be approved. These can be sent across multiple requests.

quorum_challenge_replies[]

ChallengeReply

Required. Quorum members' signed challenge replies. These can be provided across multiple requests. The proposal will be approved whenrequired_approver_count quorum_challenge_replies are provided and when all required_challenge_replies are provided.

ApproveSingleTenantHsmInstanceProposalResponse

This type has no fields.

Response message forHsmManagement.ApproveSingleTenantHsmInstanceProposal.

AsymmetricDecryptRequest

Request message forKeyManagementService.AsymmetricDecrypt.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for decryption.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToDecrypt
ciphertext

bytes

Required. The data encrypted with the namedCryptoKeyVersion's public key using OAEP.

ciphertext_crc32c

Int64Value

Optional. An optional CRC32C checksum of theAsymmetricDecryptRequest.ciphertext. If specified,KeyManagementService will verify the integrity of the receivedAsymmetricDecryptRequest.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 toAsymmetricDecryptRequest.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.

AsymmetricDecryptResponse

Response message forKeyManagementService.AsymmetricDecrypt.

Fields
plaintext

bytes

The decrypted data originally encrypted with the matching public key.

plaintext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedAsymmetricDecryptResponse.plaintext. An integrity check ofAsymmetricDecryptResponse.plaintext can be performed by computing the CRC32C checksum ofAsymmetricDecryptResponse.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.

verified_ciphertext_crc32c

bool

Integrity verification field. A flag indicating whetherAsymmetricDecryptRequest.ciphertext_crc32c was received byKeyManagementService and used for the integrity verification of theciphertext. A false value of this field indicates either thatAsymmetricDecryptRequest.ciphertext_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setAsymmetricDecryptRequest.ciphertext_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used in decryption.

AsymmetricSignRequest

Request message forKeyManagementService.AsymmetricSign.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for signing.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToSign
digest

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'salgorithm.

This field may not be supplied ifAsymmetricSignRequest.data is supplied.

digest_crc32c

Int64Value

Optional. An optional CRC32C checksum of theAsymmetricSignRequest.digest. If specified,KeyManagementService will verify the integrity of the receivedAsymmetricSignRequest.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 toAsymmetricSignRequest.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.

data

bytes

Optional. The data to sign. It can't be supplied ifAsymmetricSignRequest.digest is supplied.

data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theAsymmetricSignRequest.data. If specified,KeyManagementService will verify the integrity of the receivedAsymmetricSignRequest.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(AsymmetricSignRequest.data) is equal toAsymmetricSignRequest.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.

AsymmetricSignResponse

Response message forKeyManagementService.AsymmetricSign.

Fields
signature

bytes

The created signature.

signature_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedAsymmetricSignResponse.signature. An integrity check ofAsymmetricSignResponse.signature can be performed by computing the CRC32C checksum ofAsymmetricSignResponse.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.

verified_digest_crc32c

bool

Integrity verification field. A flag indicating whetherAsymmetricSignRequest.digest_crc32c was received byKeyManagementService and used for the integrity verification of thedigest. A false value of this field indicates either thatAsymmetricSignRequest.digest_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setAsymmetricSignRequest.digest_crc32c but this field is still false, discard the response and perform a limited number of retries.

name

string

The resource name of theCryptoKeyVersion used for signing. Check this field to verify that the intended resource was used for signing.

verified_data_crc32c

bool

Integrity verification field. A flag indicating whetherAsymmetricSignRequest.data_crc32c was received byKeyManagementService and used for the integrity verification of thedata. A false value of this field indicates either thatAsymmetricSignRequest.data_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setAsymmetricSignRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used for signing.

AutokeyConfig

Cloud KMS Autokey configuration for a folder.

Fields
name

string

Identifier. Name of theAutokeyConfig resource, e.g.folders/{FOLDER_NUMBER}/autokeyConfig orprojects/{PROJECT_NUMBER}/autokeyConfig.

key_project

string

Optional. Name of the key project, e.g.projects/{PROJECT_ID} orprojects/{PROJECT_NUMBER}, where Cloud KMS Autokey will provision a newCryptoKey when aKeyHandle is created. OnUpdateAutokeyConfig, the caller will requirecloudkms.cryptoKeys.setIamPolicy permission on this key project. Once configured, for Cloud KMS Autokey to function properly, this key project must have the Cloud KMS API activated and the Cloud KMS Service Agent for this key project must be granted thecloudkms.admin role (or pertinent permissions). A request with an empty key project field will clear the configuration.

state

State

Output only. The state for the AutokeyConfig.

etag

string

Optional. A checksum computed by the server based on the value of other fields. This may be sent on update requests to ensure that the client has an up-to-date value before proceeding. The request will be rejected with an ABORTED error on a mismatched etag.

key_project_resolution_mode

KeyProjectResolutionMode

Optional. KeyProjectResolutionMode for the AutokeyConfig. Valid values areDEDICATED_KEY_PROJECT,RESOURCE_PROJECT, orDISABLED.

KeyProjectResolutionMode

Defines the resolution mode enum for the key project. TheKeyProjectResolutionMode determines the mechanism by whichAutokeyConfig identifies akey_project at its specific configuration node. This parameter also determines if Autokey can be used within this project or folder.

Enums
KEY_PROJECT_RESOLUTION_MODE_UNSPECIFIEDDefault value. KeyProjectResolutionMode when not specified will act asDEDICATED_KEY_PROJECT.
DEDICATED_KEY_PROJECTKeys are created in a dedicated project specified bykey_project.
RESOURCE_PROJECTKeys are created in the same project as the resource requesting the key. Thekey_project must not be set when this mode is used.
DISABLEDDisables the AutokeyConfig. When this mode is set, any AutokeyConfig from higher levels in the resource hierarchy are ignored for this resource and its descendants. This setting can be overridden by a more specific configuration at a lower level. For example, if Autokey is disabled on a folder, it can be re-enabled on a sub-folder or project within that folder by setting a different mode (e.g., DEDICATED_KEY_PROJECT or RESOURCE_PROJECT).

State

The states AutokeyConfig can be in.

Enums
STATE_UNSPECIFIEDThe state of the AutokeyConfig is unspecified.
ACTIVEThe AutokeyConfig is currently active.
KEY_PROJECT_DELETEDA previously configured key project has been deleted and the current AutokeyConfig is unusable.
UNINITIALIZEDThe AutokeyConfig is not yet initialized or has been reset to its default uninitialized state.

Certificate

ACertificate represents an X.509 certificate used to authenticate HTTPS connections to EKM replicas.

Fields
raw_der

bytes

Required. The raw certificate bytes in DER format.

parsed

bool

Output only. True if the certificate was parsed successfully.

issuer

string

Output only. The issuer distinguished name in RFC 2253 format. Only present ifparsed is true.

subject

string

Output only. The subject distinguished name in RFC 2253 format. Only present ifparsed is true.

subject_alternative_dns_names[]

string

Output only. The subject Alternative DNS names. Only present ifparsed is true.

not_before_time

Timestamp

Output only. The certificate is not valid before this time. Only present ifparsed is true.

not_after_time

Timestamp

Output only. The certificate is not valid after this time. Only present ifparsed is true.

serial_number

string

Output only. The certificate serial number as a hex string. Only present ifparsed is true.

sha256_fingerprint

string

Output only. The SHA-256 certificate fingerprint as a hex string. Only present ifparsed is true.

Challenge

A challenge to be signed by a 2FA key.

Fields
challenge

bytes

Output only. The challenge to be signed by the 2FA key indicated by the public key.

public_key_pem

string

Output only. The public key associated with the 2FA key that should sign the challenge.

ChallengeReply

A reply to a challenge signed by a 2FA key.

Fields
signed_challenge

bytes

Required. The signed challenge associated with the 2FA key. The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest.

public_key_pem

string

Required. The public key associated with the 2FA key.

ChecksummedData

Data with integrity verification field.

Fields
data

bytes

Raw Data.

crc32c_checksum

Int64Value

Integrity verification field. A CRC32C checksum of the returnedChecksummedData.data. An integrity check ofChecksummedData.data can be performed by computing the CRC32C checksum ofChecksummedData.data 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 exceed2^32-1, and can be safely downconverted to uint32 in languages that support this type.

CreateCryptoKeyRequest

Request message forKeyManagementService.CreateCryptoKey.

Fields
parent

string

Required. Thename of the KeyRing associated with theCryptoKeys.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.cryptoKeys.create
crypto_key_id

string

Required. It must be unique within a KeyRing and match the regular expression[a-zA-Z0-9_-]{1,63}

crypto_key

CryptoKey

Required. ACryptoKey with initial field values.

skip_initial_version_creation

bool

If set to true, the request will create aCryptoKey without anyCryptoKeyVersions. You must manually callCreateCryptoKeyVersion orImportCryptoKeyVersion before you can use thisCryptoKey.

CreateCryptoKeyVersionRequest

Request message forKeyManagementService.CreateCryptoKeyVersion.

Fields
parent

string

Required. Thename of theCryptoKey associated with theCryptoKeyVersions.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.cryptoKeyVersions.create
crypto_key_version

CryptoKeyVersion

Required. ACryptoKeyVersion with initial field values.

CreateEkmConnectionRequest

Request message forEkmService.CreateEkmConnection.

Fields
parent

string

Required. The resource name of the location associated with theEkmConnection, in the formatprojects/*/locations/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.ekmConnections.create
ekm_connection_id

string

Required. It must be unique within a location and match the regular expression[a-zA-Z0-9_-]{1,63}.

ekm_connection

EkmConnection

Required. AnEkmConnection with initial field values.

CreateImportJobRequest

Request message forKeyManagementService.CreateImportJob.

Fields
parent

string

Required. Thename of theKeyRing associated with theImportJobs.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.importJobs.create
import_job_id

string

Required. It must be unique within a KeyRing and match the regular expression[a-zA-Z0-9_-]{1,63}

import_job

ImportJob

Required. AnImportJob with initial field values.

CreateKeyHandleMetadata

This type has no fields.

Metadata message forCreateKeyHandle long-running operation response.

CreateKeyHandleRequest

Request message forAutokey.CreateKeyHandle.

Fields
parent

string

Required. Name of the resource project and location to create theKeyHandle in, e.g.projects/{PROJECT_ID}/locations/{LOCATION}.

key_handle_id

string

Optional. Id of theKeyHandle. Must be unique to the resource project and location. If not provided by the caller, a new UUID is used.

key_handle

KeyHandle

Required.KeyHandle to create.

CreateKeyRingRequest

Request message forKeyManagementService.CreateKeyRing.

Fields
parent

string

Required. The resource name of the location associated with theKeyRings, in the formatprojects/*/locations/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.keyRings.create
key_ring_id

string

Required. It must be unique within a location and match the regular expression[a-zA-Z0-9_-]{1,63}

key_ring

KeyRing

Required. AKeyRing with initial field values.

CreateSingleTenantHsmInstanceMetadata

This type has no fields.

Metadata message forCreateSingleTenantHsmInstance long-running operation response.

CreateSingleTenantHsmInstanceProposalMetadata

This type has no fields.

Metadata message forCreateSingleTenantHsmInstanceProposal long-running operation response.

CreateSingleTenantHsmInstanceProposalRequest

Request message forHsmManagement.CreateSingleTenantHsmInstanceProposal.

Fields
parent

string

Required. Thename of theSingleTenantHsmInstance associated with theSingleTenantHsmInstanceProposals.

single_tenant_hsm_instance_proposal_id

string

Optional. It must be unique within a location and match the regular expression[a-zA-Z0-9_-]{1,63}.

single_tenant_hsm_instance_proposal

SingleTenantHsmInstanceProposal

Required. TheSingleTenantHsmInstanceProposal to create.

CreateSingleTenantHsmInstanceRequest

Request message forHsmManagement.CreateSingleTenantHsmInstance.

Fields
parent

string

Required. The resource name of the location associated with theSingleTenantHsmInstance, in the formatprojects/*/locations/*.

single_tenant_hsm_instance_id

string

Optional. It must be unique within a location and match the regular expression[a-zA-Z0-9_-]{1,63}.

single_tenant_hsm_instance

SingleTenantHsmInstance

Required. AnSingleTenantHsmInstance with initial field values.

CryptoKey

ACryptoKey represents a logical key that can be used for cryptographic operations.

ACryptoKey is made up of zero or moreversions, which represent the actual key material used in cryptographic operations.

Fields
name

string

Output only. The resource name for thisCryptoKey in the formatprojects/*/locations/*/keyRings/*/cryptoKeys/*.

primary

CryptoKeyVersion

Output only. A copy of the "primary"CryptoKeyVersion that will be used byEncrypt when thisCryptoKey is given inEncryptRequest.name.

TheCryptoKey's primary version can be updated viaUpdateCryptoKeyPrimaryVersion.

Keys withpurposeENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.

purpose

CryptoKeyPurpose

Immutable. The immutable purpose of thisCryptoKey.

create_time

Timestamp

Output only. The time at which thisCryptoKey was created.

next_rotation_time

Timestamp

Atnext_rotation_time, the Key Management Service will automatically:

  1. Create a new version of thisCryptoKey.
  2. Mark the new version as primary.

Key rotations performed manually viaCreateCryptoKeyVersion andUpdateCryptoKeyPrimaryVersion do not affectnext_rotation_time.

Keys withpurposeENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.

version_template

CryptoKeyVersionTemplate

A template describing settings for newCryptoKeyVersion instances. The properties of newCryptoKeyVersion instances created by eitherCreateCryptoKeyVersion or auto-rotation are controlled by this template.

labels

map<string, string>

Labels with user-defined metadata. For more information, seeLabeling Keys.

import_only

bool

Immutable. Whether this key may contain imported versions only.

destroy_scheduled_duration

Duration

Immutable. The period of time that versions of this key spend in theDESTROY_SCHEDULED state before transitioning toDESTROYED. If not specified at creation time, the default duration is 30 days.

crypto_key_backend

string

Immutable. The resource name of the backend environment where the key material for allCryptoKeyVersions associated with thisCryptoKey reside and where all related cryptographic operations are performed. Only applicable ifCryptoKeyVersions have aProtectionLevel ofEXTERNAL_VPC, with the resource name in the formatprojects/*/locations/*/ekmConnections/*. Only applicable ifCryptoKeyVersions have aProtectionLevel ofHSM_SINGLE_TENANT, with the resource name in the formatprojects/*/locations/*/singleTenantHsmInstances/*. Note, this list is non-exhaustive and may apply to additionalProtectionLevels in the future.

key_access_justifications_policy

KeyAccessJustificationsPolicy

Optional. The policy used for Key Access Justifications Policy Enforcement. If this field is present and this key is enrolled in Key Access Justifications Policy Enforcement, the policy will be evaluated in encrypt, decrypt, and sign operations, and the operation will fail if rejected by the policy. The policy is defined by specifying zero or more allowed justification codes.https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes By default, this field is absent, and all justification codes are allowed.

Union fieldrotation_schedule. Controls the rate of automatic rotation.rotation_schedule can be only one of the following:
rotation_period

Duration

next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.

Ifrotation_period is set,next_rotation_time must also be set.

Keys withpurposeENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.

CryptoKeyPurpose

CryptoKeyPurpose describes the cryptographic capabilities of aCryptoKey. A given key can only be used for the operations allowed by its purpose. For more information, seeKey purposes.

Enums
CRYPTO_KEY_PURPOSE_UNSPECIFIEDNot specified.
ENCRYPT_DECRYPTCryptoKeys with this purpose may be used withEncrypt andDecrypt.
ASYMMETRIC_SIGNCryptoKeys with this purpose may be used withAsymmetricSign andGetPublicKey.
ASYMMETRIC_DECRYPTCryptoKeys with this purpose may be used withAsymmetricDecrypt andGetPublicKey.
RAW_ENCRYPT_DECRYPTCryptoKeys with this purpose may be used withRawEncrypt andRawDecrypt. This purpose is meant to be used for interoperable symmetric encryption and does not support automatic CryptoKey rotation.
MACCryptoKeys with this purpose may be used withMacSign.
KEY_ENCAPSULATIONCryptoKeys with this purpose may be used withGetPublicKey andDecapsulate.

CryptoKeyVersion

ACryptoKeyVersion represents an individual cryptographic key, and the associated key material.

AnENABLED version can be used for cryptographic operations.

For security reasons, the raw cryptographic key material represented by aCryptoKeyVersion 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.

Fields
name

string

Output only. The resource name for thisCryptoKeyVersion in the formatprojects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

state

CryptoKeyVersionState

The current state of theCryptoKeyVersion.

protection_level

ProtectionLevel

Output only. TheProtectionLevel describing how crypto operations are performed with thisCryptoKeyVersion.

algorithm

CryptoKeyVersionAlgorithm

Output only. TheCryptoKeyVersionAlgorithm that thisCryptoKeyVersion supports.

attestation

KeyOperationAttestation

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 withprotection_levelHSM.

create_time

Timestamp

Output only. The time at which thisCryptoKeyVersion was created.

generate_time

Timestamp

Output only. The time thisCryptoKeyVersion's key material was generated.

destroy_time

Timestamp

Output only. The time thisCryptoKeyVersion's key material is scheduled for destruction. Only present ifstate isDESTROY_SCHEDULED.

destroy_event_time

Timestamp

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present ifstate isDESTROYED.

import_job

string

Output only. The name of theImportJob used in the most recent import of thisCryptoKeyVersion. Only present if the underlying key material was imported.

import_time

Timestamp

Output only. The time at which thisCryptoKeyVersion's key material was most recently imported.

import_failure_reason

string

Output only. The root cause of the most recent import failure. Only present ifstate isIMPORT_FAILED.

generation_failure_reason

string

Output only. The root cause of the most recent generation failure. Only present ifstate isGENERATION_FAILED.

external_destruction_failure_reason

string

Output only. The root cause of the most recent external destruction failure. Only present ifstate isEXTERNAL_DESTRUCTION_FAILED.

external_protection_level_options

ExternalProtectionLevelOptions

ExternalProtectionLevelOptions stores a group of additional fields for configuring aCryptoKeyVersion that are specific to theEXTERNAL protection level andEXTERNAL_VPC protection levels.

reimport_eligible

bool

Output only. Whether or not this key version is eligible for reimport, by being specified as a target inImportCryptoKeyVersionRequest.crypto_key_version.

CryptoKeyVersionAlgorithm

The algorithm of theCryptoKeyVersion, indicating what parameters must be used for each cryptographic operation.

TheGOOGLE_SYMMETRIC_ENCRYPTION algorithm is usable withCryptoKey.purposeENCRYPT_DECRYPT.

Algorithms beginning withRSA_SIGN_ are usable withCryptoKey.purposeASYMMETRIC_SIGN.

The fields in the name afterRSA_SIGN_ correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm.

For PSS, the salt length used is equal to the length of digest algorithm. For example,RSA_SIGN_PSS_2048_SHA256 will use PSS with a salt length of 256 bits or 32 bytes.

Algorithms beginning withRSA_DECRYPT_ are usable withCryptoKey.purposeASYMMETRIC_DECRYPT.

The fields in the name afterRSA_DECRYPT_ correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm.

Algorithms beginning withEC_SIGN_ are usable withCryptoKey.purposeASYMMETRIC_SIGN.

The fields in the name afterEC_SIGN_ correspond to the following parameters: elliptic curve, digest algorithm.

Algorithms beginning withHMAC_ are usable withCryptoKey.purposeMAC.

The suffix followingHMAC_ corresponds to the hash algorithm being used (eg. SHA256).

Algorithms beginning withPQ_ are post-quantum.

For more information, seeKey purposes and algorithms.

Enums
CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIEDNot specified.
GOOGLE_SYMMETRIC_ENCRYPTIONCreates symmetric encryption keys.
AES_128_GCMAES-GCM (Galois Counter Mode) using 128-bit keys.
AES_256_GCMAES-GCM (Galois Counter Mode) using 256-bit keys.
AES_128_CBCAES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
AES_256_CBCAES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
AES_128_CTRAES-CTR (Counter Mode) using 128-bit keys.
AES_256_CTRAES-CTR (Counter Mode) using 256-bit keys.
RSA_SIGN_PSS_2048_SHA256RSASSA-PSS 2048 bit key with a SHA256 digest.
RSA_SIGN_PSS_3072_SHA256RSASSA-PSS 3072 bit key with a SHA256 digest.
RSA_SIGN_PSS_4096_SHA256RSASSA-PSS 4096 bit key with a SHA256 digest.
RSA_SIGN_PSS_4096_SHA512RSASSA-PSS 4096 bit key with a SHA512 digest.
RSA_SIGN_PKCS1_2048_SHA256RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_3072_SHA256RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA256RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA512RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
RSA_SIGN_RAW_PKCS1_2048RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
RSA_SIGN_RAW_PKCS1_3072RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
RSA_SIGN_RAW_PKCS1_4096RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
RSA_DECRYPT_OAEP_2048_SHA256RSAES-OAEP 2048 bit key with a SHA256 digest.
RSA_DECRYPT_OAEP_3072_SHA256RSAES-OAEP 3072 bit key with a SHA256 digest.
RSA_DECRYPT_OAEP_4096_SHA256RSAES-OAEP 4096 bit key with a SHA256 digest.
RSA_DECRYPT_OAEP_4096_SHA512RSAES-OAEP 4096 bit key with a SHA512 digest.
RSA_DECRYPT_OAEP_2048_SHA1RSAES-OAEP 2048 bit key with a SHA1 digest.
RSA_DECRYPT_OAEP_3072_SHA1RSAES-OAEP 3072 bit key with a SHA1 digest.
RSA_DECRYPT_OAEP_4096_SHA1RSAES-OAEP 4096 bit key with a SHA1 digest.
EC_SIGN_P256_SHA256ECDSA on the NIST P-256 curve with a SHA256 digest. Other hash functions can also be used:https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
EC_SIGN_P384_SHA384ECDSA on the NIST P-384 curve with a SHA384 digest. Other hash functions can also be used:https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
EC_SIGN_SECP256K1_SHA256ECDSA on the non-NIST secp256k1 curve. This curve is only supported for HSM protection level. Other hash functions can also be used:https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
EC_SIGN_ED25519EdDSA on the Curve25519 in pure mode (taking data as input).
HMAC_SHA256HMAC-SHA256 signing with a 256 bit key.
HMAC_SHA1HMAC-SHA1 signing with a 160 bit key.
HMAC_SHA384HMAC-SHA384 signing with a 384 bit key.
HMAC_SHA512HMAC-SHA512 signing with a 512 bit key.
HMAC_SHA224HMAC-SHA224 signing with a 224 bit key.
EXTERNAL_SYMMETRIC_ENCRYPTIONAlgorithm representing symmetric encryption by an external key manager.
ML_KEM_768ML-KEM-768 (FIPS 203)
ML_KEM_1024ML-KEM-1024 (FIPS 203)
KEM_XWINGX-Wing hybrid KEM combining ML-KEM-768 with X25519 following datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/.
PQ_SIGN_ML_DSA_44The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 1. Randomized version.
PQ_SIGN_ML_DSA_65The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 3. Randomized version.
PQ_SIGN_ML_DSA_87The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 5. Randomized version.
PQ_SIGN_SLH_DSA_SHA2_128SThe post-quantum stateless hash-based digital signature algorithm, at security level 1. Randomized version.
PQ_SIGN_HASH_SLH_DSA_SHA2_128S_SHA256The post-quantum stateless hash-based digital signature algorithm, at security level 1. Randomized pre-hash version supporting SHA256 digests.
PQ_SIGN_ML_DSA_44_EXTERNAL_MUThe post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 1. Randomized version supporting externally-computed message representatives.
PQ_SIGN_ML_DSA_65_EXTERNAL_MUThe post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 3. Randomized version supporting externally-computed message representatives.
PQ_SIGN_ML_DSA_87_EXTERNAL_MUThe post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 5. Randomized version supporting externally-computed message representatives.

CryptoKeyVersionState

The state of aCryptoKeyVersion, indicating if it can be used.

Enums
CRYPTO_KEY_VERSION_STATE_UNSPECIFIEDNot specified.
PENDING_GENERATIONThis version is still being generated. It may not be used, enabled, disabled, or destroyed yet. Cloud KMS will automatically mark this versionENABLED as soon as the version is ready.
ENABLEDThis version may be used for cryptographic operations.
DISABLEDThis version may not be used, but the key material is still available, and the version can be placed back into theENABLED state.
DESTROYEDThe key material of this version is destroyed and no longer stored. This version may only becomeENABLED again if this version isreimport_eligible and the original key material is reimported with a call toKeyManagementService.ImportCryptoKeyVersion.
DESTROY_SCHEDULEDThis version is scheduled for destruction, and will be destroyed soon. CallRestoreCryptoKeyVersion to put it back into theDISABLED state.
PENDING_IMPORTThis version is still being imported. It may not be used, enabled, disabled, or destroyed yet. Cloud KMS will automatically mark this versionENABLED as soon as the version is ready.
IMPORT_FAILEDThis version was not imported successfully. It may not be used, enabled, disabled, or destroyed. The submitted key material has been discarded. Additional details can be found inCryptoKeyVersion.import_failure_reason.
GENERATION_FAILEDThis version was not generated successfully. It may not be used, enabled, disabled, or destroyed. Additional details can be found inCryptoKeyVersion.generation_failure_reason.
PENDING_EXTERNAL_DESTRUCTIONThis version was destroyed, and it may not be used or enabled again. Cloud KMS is waiting for the corresponding key material residing in an external key manager to be destroyed.
EXTERNAL_DESTRUCTION_FAILEDThis version was destroyed, and it may not be used or enabled again. However, Cloud KMS could not confirm that the corresponding key material residing in an external key manager was destroyed. Additional details can be found inCryptoKeyVersion.external_destruction_failure_reason.

CryptoKeyVersionView

A view forCryptoKeyVersions. Controls the level of detail returned forCryptoKeyVersions inKeyManagementService.ListCryptoKeyVersions andKeyManagementService.ListCryptoKeys.

Enums
CRYPTO_KEY_VERSION_VIEW_UNSPECIFIEDDefault view for eachCryptoKeyVersion. Does not include theattestation field.
FULLProvides all fields in eachCryptoKeyVersion, including theattestation.

CryptoKeyVersionTemplate

ACryptoKeyVersionTemplate specifies the properties to use when creating a newCryptoKeyVersion, either manually withCreateCryptoKeyVersion or automatically as a result of auto-rotation.

Fields
protection_level

ProtectionLevel

ProtectionLevel to use when creating aCryptoKeyVersion based on this template. Immutable. Defaults toSOFTWARE.

algorithm

CryptoKeyVersionAlgorithm

Required.Algorithm to use when creating aCryptoKeyVersion based on this template.

For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted andCryptoKey.purpose isENCRYPT_DECRYPT.

DecapsulateRequest

Request message forKeyManagementService.Decapsulate.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for decapsulation.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToDecapsulate
ciphertext

bytes

Required. The ciphertext produced from encapsulation with the namedCryptoKeyVersion public key(s).

ciphertext_crc32c

Int64Value

Optional. A CRC32C checksum of theDecapsulateRequest.ciphertext. If specified,KeyManagementService will verify the integrity of the receivedDecapsulateRequest.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(DecapsulateRequest.ciphertext) is equal toDecapsulateRequest.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.

DecapsulateResponse

Response message forKeyManagementService.Decapsulate.

Fields
name

string

The resource name of theCryptoKeyVersion used for decapsulation. Check this field to verify that the intended resource was used for decapsulation.

shared_secret

bytes

The decapsulated shared_secret originally encapsulated with the matching public key.

verified_ciphertext_crc32c

bool

Integrity verification field. A flag indicating whetherDecapsulateRequest.ciphertext_crc32c was received byKeyManagementService and used for the integrity verification of theciphertext. A false value of this field indicates either thatDecapsulateRequest.ciphertext_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setDecapsulateRequest.ciphertext_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used in decapsulation.

shared_secret_crc32c

int64

Integrity verification field. A CRC32C checksum of the returnedDecapsulateResponse.shared_secret. An integrity check ofDecapsulateResponse.shared_secret can be performed by computing the CRC32C checksum ofDecapsulateResponse.shared_secret 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: receiving this response message indicates thatKeyManagementService is able to successfully decrypt theciphertext. 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.

DecryptRequest

Request message forKeyManagementService.Decrypt.

Fields
name

string

Required. The resource name of theCryptoKey to use for decryption. The server will choose the appropriate version.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToDecrypt
ciphertext

bytes

Required. The encrypted data originally returned inEncryptResponse.ciphertext.

additional_authenticated_data

bytes

Optional. Optional data that must match the data originally supplied inEncryptRequest.additional_authenticated_data.

ciphertext_crc32c

Int64Value

Optional. An optional CRC32C checksum of theDecryptRequest.ciphertext. If specified,KeyManagementService will verify the integrity of the receivedDecryptRequest.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(DecryptRequest.ciphertext) is equal toDecryptRequest.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.

additional_authenticated_data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theDecryptRequest.additional_authenticated_data. If specified,KeyManagementService will verify the integrity of the receivedDecryptRequest.additional_authenticated_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(DecryptRequest.additional_authenticated_data) is equal toDecryptRequest.additional_authenticated_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.

DecryptResponse

Response message forKeyManagementService.Decrypt.

Fields
plaintext

bytes

The decrypted data originally supplied inEncryptRequest.plaintext.

plaintext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedDecryptResponse.plaintext. An integrity check ofDecryptResponse.plaintext can be performed by computing the CRC32C checksum ofDecryptResponse.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: receiving this response message indicates thatKeyManagementService is able to successfully decrypt theciphertext. 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.

used_primary

bool

Whether the Decryption was performed using the primary key version.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used in decryption.

DeleteSingleTenantHsmInstanceProposalRequest

Request message forHsmManagement.DeleteSingleTenantHsmInstanceProposal.

Fields
name

string

Required. Thename of theSingleTenantHsmInstanceProposal to delete.

DestroyCryptoKeyVersionRequest

Request message forKeyManagementService.DestroyCryptoKeyVersion.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to destroy.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.destroy

Digest

ADigest holds a cryptographic message digest.

Fields
Union fielddigest. Required. The message digest.digest can be only one of the following:
sha256

bytes

A message digest produced with the SHA-256 algorithm.

sha384

bytes

A message digest produced with the SHA-384 algorithm.

sha512

bytes

A message digest produced with the SHA-512 algorithm.

EkmConfig

AnEkmConfig is a singleton resource that represents configuration parameters that apply to allCryptoKeys andCryptoKeyVersions with aProtectionLevel ofEXTERNAL_VPC in a given project and location.

Fields
name

string

Output only. The resource name for theEkmConfig in the formatprojects/*/locations/*/ekmConfig.

default_ekm_connection

string

Optional. Resource name of the defaultEkmConnection. Setting this field to the empty string removes the default.

EkmConnection

AnEkmConnection represents an individual EKM connection. It can be used for creatingCryptoKeys andCryptoKeyVersions with aProtectionLevel ofEXTERNAL_VPC, as well as performing cryptographic operations using keys created within theEkmConnection.

Fields
name

string

Output only. The resource name for theEkmConnection in the formatprojects/*/locations/*/ekmConnections/*.

create_time

Timestamp

Output only. The time at which theEkmConnection was created.

service_resolvers[]

ServiceResolver

Optional. A list ofServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a singleServiceResolver is supported.

etag

string

Optional. Etag of the currently storedEkmConnection.

key_management_mode

KeyManagementMode

Optional. Describes who can perform control plane operations on the EKM. If unset, this defaults toMANUAL.

crypto_space_path

string

Optional. Identifies the EKM Crypto Space that thisEkmConnection maps to. Note: This field is required ifKeyManagementMode isCLOUD_KMS.

KeyManagementMode

KeyManagementMode describes who can perform control plane cryptographic operations using thisEkmConnection.

Enums
KEY_MANAGEMENT_MODE_UNSPECIFIEDNot specified.
MANUALEKM-side key management operations onCryptoKeys created with thisEkmConnection must be initiated from the EKM directly and cannot be performed from Cloud KMS. This means that: * When creating aCryptoKeyVersion associated with thisEkmConnection, the caller must supply the key path of pre-existing external key material that will be linked to theCryptoKeyVersion. * Destruction of external key material cannot be requested via the Cloud KMS API and must be performed directly in the EKM. * Automatic rotation of key material is not supported.
CLOUD_KMS

AllCryptoKeys created with thisEkmConnection use EKM-side key management operations initiated from Cloud KMS. This means that:

  • When aCryptoKeyVersion associated with thisEkmConnection is created, the EKM automatically generates new key material and a new key path. The caller cannot supply the key path of pre-existing external key material.
  • Destruction of external key material associated with thisEkmConnection can be requested by callingDestroyCryptoKeyVersion.
  • Automatic rotation of key material is supported.

ServiceResolver

AServiceResolver represents an EKM replica that can be reached within anEkmConnection.

Fields
service_directory_service

string

Required. The resource name of the Service Directory service pointing to an EKM replica, in the formatprojects/*/locations/*/namespaces/*/services/*.

endpoint_filter

string

Optional. The filter applied to the endpoints of the resolved service. If no filter is specified, all endpoints will be considered. An endpoint will be chosen arbitrarily from the filtered list for each request.

For endpoint filter syntax and examples, seehttps://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest.

hostname

string

Required. The hostname of the EKM replica used at TLS and HTTP layers.

server_certificates[]

Certificate

Required. A list of leaf server certificates used to authenticate HTTPS connections to the EKM replica. Currently, a maximum of 10Certificate is supported.

EncryptRequest

Request message forKeyManagementService.Encrypt.

Fields
name

string

Required. The resource name of theCryptoKey orCryptoKeyVersion to use for encryption.

If aCryptoKey is specified, the server will use itsprimary version.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToEncrypt
plaintext

bytes

Required. The data to encrypt. Must be no larger than 64KiB.

The maximum size depends on the key version'sprotection_level. ForSOFTWARE,EXTERNAL, andEXTERNAL_VPC keys, the plaintext must be no larger than 64KiB. ForHSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.

additional_authenticated_data

bytes

Optional. Optional data that, if specified, must also be provided during decryption throughDecryptRequest.additional_authenticated_data.

The maximum size depends on the key version'sprotection_level. ForSOFTWARE,EXTERNAL, andEXTERNAL_VPC keys the AAD must be no larger than 64KiB. ForHSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.

plaintext_crc32c

Int64Value

Optional. An optional CRC32C checksum of theEncryptRequest.plaintext. If specified,KeyManagementService will verify the integrity of the receivedEncryptRequest.plaintext 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(EncryptRequest.plaintext) is equal toEncryptRequest.plaintext_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.

additional_authenticated_data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theEncryptRequest.additional_authenticated_data. If specified,KeyManagementService will verify the integrity of the receivedEncryptRequest.additional_authenticated_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(EncryptRequest.additional_authenticated_data) is equal toEncryptRequest.additional_authenticated_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.

EncryptResponse

Response message forKeyManagementService.Encrypt.

Fields
name

string

The resource name of theCryptoKeyVersion used in encryption. Check this field to verify that the intended resource was used for encryption.

ciphertext

bytes

The encrypted data.

ciphertext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedEncryptResponse.ciphertext. An integrity check ofEncryptResponse.ciphertext can be performed by computing the CRC32C checksum ofEncryptResponse.ciphertext 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.

verified_plaintext_crc32c

bool

Integrity verification field. A flag indicating whetherEncryptRequest.plaintext_crc32c was received byKeyManagementService and used for the integrity verification of theplaintext. A false value of this field indicates either thatEncryptRequest.plaintext_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setEncryptRequest.plaintext_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_additional_authenticated_data_crc32c

bool

Integrity verification field. A flag indicating whetherEncryptRequest.additional_authenticated_data_crc32c was received byKeyManagementService and used for the integrity verification of theAAD. A false value of this field indicates either thatEncryptRequest.additional_authenticated_data_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setEncryptRequest.additional_authenticated_data_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used in encryption.

ExecuteSingleTenantHsmInstanceProposalMetadata

This type has no fields.

Metadata message forExecuteSingleTenantHsmInstanceProposal long-running operation response.

ExecuteSingleTenantHsmInstanceProposalRequest

Request message forHsmManagement.ExecuteSingleTenantHsmInstanceProposal.

Fields
name

string

Required. Thename of theSingleTenantHsmInstanceProposal to execute.

ExecuteSingleTenantHsmInstanceProposalResponse

This type has no fields.

Response message forHsmManagement.ExecuteSingleTenantHsmInstanceProposal.

ExternalProtectionLevelOptions

ExternalProtectionLevelOptions stores a group of additional fields for configuring aCryptoKeyVersion that are specific to theEXTERNAL protection level andEXTERNAL_VPC protection levels.

Fields
external_key_uri

string

The URI for an external resource that thisCryptoKeyVersion represents.

ekm_connection_key_path

string

The path to the external key material on the EKM when usingEkmConnection e.g., "v0/my/key". Set this field instead of external_key_uri when using anEkmConnection.

GenerateRandomBytesRequest

Request message forKeyManagementService.GenerateRandomBytes.

Fields
location

string

The project-specific location in which to generate random bytes. For example, "projects/my-project/locations/us-central1".

length_bytes

int32

The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes.

protection_level

ProtectionLevel

TheProtectionLevel to use when generating the random data. Currently, onlyHSM protection level is supported.

GenerateRandomBytesResponse

Response message forKeyManagementService.GenerateRandomBytes.

Fields
data

bytes

The generated data.

data_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedGenerateRandomBytesResponse.data. An integrity check ofGenerateRandomBytesResponse.data can be performed by computing the CRC32C checksum ofGenerateRandomBytesResponse.data 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.

GetAutokeyConfigRequest

Request message forGetAutokeyConfig.

Fields
name

string

Required. Name of theAutokeyConfig resource, e.g.folders/{FOLDER_NUMBER}/autokeyConfig orprojects/{PROJECT_NUMBER}/autokeyConfig.

GetCryptoKeyRequest

Request message forKeyManagementService.GetCryptoKey.

Fields
name

string

Required. Thename of theCryptoKey to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeys.get

GetCryptoKeyVersionRequest

Request message forKeyManagementService.GetCryptoKeyVersion.

Fields
name

string

Required. Thename of theCryptoKeyVersion to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.get

GetEkmConfigRequest

Request message forEkmService.GetEkmConfig.

Fields
name

string

Required. Thename of theEkmConfig to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.ekmConfigs.get

GetEkmConnectionRequest

Request message forEkmService.GetEkmConnection.

Fields
name

string

Required. Thename of theEkmConnection to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.ekmConnections.get

GetImportJobRequest

Request message forKeyManagementService.GetImportJob.

Fields
name

string

Required. Thename of theImportJob to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.importJobs.get

GetKeyAccessJustificationsPolicyConfigRequest

Request message forKeyAccessJustificationsConfig.GetKeyAccessJustificationsPolicyConfig.

Fields
name

string

Required. Thename of theKeyAccessJustificationsPolicyConfig to get.

GetKeyHandleRequest

Request message forGetKeyHandle.

Fields
name

string

Required. Name of theKeyHandle resource, e.g.projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}.

GetKeyRingRequest

Request message forKeyManagementService.GetKeyRing.

Fields
name

string

Required. Thename of theKeyRing to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.keyRings.get

GetPublicKeyRequest

Request message forKeyManagementService.GetPublicKey.

Fields
name

string

Required. Thename of theCryptoKeyVersion public key to get.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.viewPublicKey
public_key_format

PublicKeyFormat

Optional. ThePublicKey format specified by the user. This field is required for PQC algorithms. If specified, the public key will be exported through thepublic_key field in the requested format. Otherwise, thepem field will be populated for non-PQC algorithms, and an error will be returned for PQC algorithms.

GetSingleTenantHsmInstanceProposalRequest

Request message forHsmManagement.GetSingleTenantHsmInstanceProposal.

Fields
name

string

Required. Thename of theSingleTenantHsmInstanceProposal to get.

GetSingleTenantHsmInstanceRequest

Request message forHsmManagement.GetSingleTenantHsmInstance.

Fields
name

string

Required. Thename of theSingleTenantHsmInstance to get.

ImportCryptoKeyVersionRequest

Request message forKeyManagementService.ImportCryptoKeyVersion.

Fields
parent

string

Required. Thename of theCryptoKey to be imported into.

The create permission is only required on this key when creating a newCryptoKeyVersion.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.cryptoKeyVersions.create
crypto_key_version

string

Optional. The optionalname of an existingCryptoKeyVersion to target for an import operation. If this field is not present, a newCryptoKeyVersion containing the supplied key material is created.

If this field is present, the supplied key material is imported into the existingCryptoKeyVersion. To import into an existingCryptoKeyVersion, theCryptoKeyVersion must be a child ofImportCryptoKeyVersionRequest.parent, have been previously created viaImportCryptoKeyVersion, and be inDESTROYED orIMPORT_FAILED state. The key material and algorithm must match the previousCryptoKeyVersion exactly if theCryptoKeyVersion has ever contained key material.

Authorization requires the followingIAM permission on the specified resourcecryptoKeyVersion:

  • cloudkms.cryptoKeyVersions.update
algorithm

CryptoKeyVersionAlgorithm

Required. Thealgorithm of the key being imported. This does not need to match theversion_template of theCryptoKey this version imports into.

import_job

string

Required. Thename of theImportJob that was used to wrap this key material.

Authorization requires the followingIAM permission on the specified resourceimportJob:

  • cloudkms.importjobs.useToImport
wrapped_key

bytes

Optional. The wrapped key material to import.

Before wrapping, key material must be formatted. If importing symmetric key material, the expected key material format is plain bytes. If importing asymmetric key material, the expected key material format is PKCS#8-encoded DER (the PrivateKeyInfo structure from RFC 5208).

When wrapping with import methods (RSA_OAEP_3072_SHA1_AES_256 orRSA_OAEP_4096_SHA1_AES_256 orRSA_OAEP_3072_SHA256_AES_256 orRSA_OAEP_4096_SHA256_AES_256),

this field must contain the concatenation of:

  1. An ephemeral AES-256 wrapping key wrapped with thepublic_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label.
  2. The formatted key to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649).

This format is the same as the format produced by PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.

When wrapping with import methods (RSA_OAEP_3072_SHA256 orRSA_OAEP_4096_SHA256),

this field must contain the formatted key to be imported, wrapped with thepublic_key using RSAES-OAEP with SHA-256, MGF1 with SHA-256, and an empty label.

Union fieldwrapped_key_material. This field is legacy. Use the fieldwrapped_key instead.wrapped_key_material can be only one of the following:
rsa_aes_wrapped_key

bytes

Optional. This field has the same meaning aswrapped_key. Prefer to use that field in new work. Either that field or this field (but not both) must be specified.

ImportJob

AnImportJob can be used to createCryptoKeys andCryptoKeyVersions using pre-existing key material, generated outside of Cloud KMS.

When anImportJob is created, Cloud KMS will generate a "wrapping key", which is a public/private key pair. You use the wrapping key to encrypt (also known as wrap) the pre-existing key material to protect it during the import process. The nature of the wrapping key depends on the choice ofimport_method. When the wrapping key generation is complete, thestate will be set toACTIVE and thepublic_key can be fetched. The fetched public key can then be used to wrap your pre-existing key material.

Once the key material is wrapped, it can be imported into a newCryptoKeyVersion in an existingCryptoKey by callingImportCryptoKeyVersion. MultipleCryptoKeyVersions can be imported with a singleImportJob. Cloud KMS uses the private key portion of the wrapping key to unwrap the key material. Only Cloud KMS has access to the private key.

AnImportJob expires 3 days after it is created. Once expired, Cloud KMS will no longer be able to import or unwrap any key material that was wrapped with theImportJob's public key.

For more information, seeImporting a key.

Fields
name

string

Output only. The resource name for thisImportJob in the formatprojects/*/locations/*/keyRings/*/importJobs/*.

import_method

ImportMethod

Required. Immutable. The wrapping method to be used for incoming key material.

protection_level

ProtectionLevel

Required. Immutable. The protection level of theImportJob. This must match theprotection_level of theversion_template on theCryptoKey you attempt to import into.

create_time

Timestamp

Output only. The time at which thisImportJob was created.

generate_time

Timestamp

Output only. The time thisImportJob's key material was generated.

expire_time

Timestamp

Output only. The time at which thisImportJob is scheduled for expiration and can no longer be used to import key material.

expire_event_time

Timestamp

Output only. The time thisImportJob expired. Only present ifstate isEXPIRED.

state

ImportJobState

Output only. The current state of theImportJob, indicating if it can be used.

public_key

WrappingPublicKey

Output only. The public key with which to wrap key material prior to import. Only returned ifstate isACTIVE.

attestation

KeyOperationAttestation

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosenImportMethod is one with a protection level ofHSM.

crypto_key_backend

string

Immutable. The resource name of the backend environment where the key material for the wrapping key resides and where all related cryptographic operations are performed. Currently, this field is only populated for keys stored in HSM_SINGLE_TENANT. Note, this list is non-exhaustive and may apply to additionalProtectionLevels in the future. Supported resources: *"projects/*/locations/*/singleTenantHsmInstances/*"

ImportJobState

The state of theImportJob, indicating if it can be used.

Enums
IMPORT_JOB_STATE_UNSPECIFIEDNot specified.
PENDING_GENERATIONThe wrapping key for this job is still being generated. It may not be used. Cloud KMS will automatically mark this job asACTIVE as soon as the wrapping key is generated.
ACTIVEThis job may be used inCreateCryptoKey andCreateCryptoKeyVersion requests.
EXPIREDThis job can no longer be used and may not leave this state once entered.

ImportMethod

ImportMethod describes the key wrapping method chosen for thisImportJob.

Enums
IMPORT_METHOD_UNSPECIFIEDNot specified.
RSA_OAEP_3072_SHA1_AES_256This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit RSA key. For more details, seeRSA AES key wrap mechanism.
RSA_OAEP_4096_SHA1_AES_256This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, seeRSA AES key wrap mechanism.
RSA_OAEP_3072_SHA256_AES_256This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit RSA key. For more details, seeRSA AES key wrap mechanism.
RSA_OAEP_4096_SHA256_AES_256This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, seeRSA AES key wrap mechanism.
RSA_OAEP_3072_SHA256This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The key material to be imported is wrapped directly with the RSA key. Due to technical limitations of RSA wrapping, this method cannot be used to wrap RSA keys for import.
RSA_OAEP_4096_SHA256This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The key material to be imported is wrapped directly with the RSA key. Due to technical limitations of RSA wrapping, this method cannot be used to wrap RSA keys for import.

WrappingPublicKey

The public key component of the wrapping key. For details of the type of key this public key corresponds to, see theImportMethod.

Fields
pem

string

The public key, encoded in PEM format. For more information, see theRFC 7468 sections forGeneral Considerations andTextual Encoding of Subject Public Key Info.

KeyAccessJustificationsEnrollmentConfig

The configuration of a protection level for a project's Key Access Justifications enrollment.

Fields
audit_logging

bool

Whether the project has KAJ logging enabled.

policy_enforcement

bool

Whether the project is enrolled in KAJ policy enforcement.

KeyAccessJustificationsPolicy

AKeyAccessJustificationsPolicy specifies zero or more allowedAccessReason values for encrypt, decrypt, and sign operations on aCryptoKey.

Fields
allowed_access_reasons[]

AccessReason

The list of allowed reasons for access to aCryptoKey. Zero allowed access reasons means all encrypt, decrypt, and sign operations for theCryptoKey associated with this policy will fail.

KeyAccessJustificationsPolicyConfig

A singleton configuration for Key Access Justifications policies.

Fields
name

string

Identifier. The resource name for thisKeyAccessJustificationsPolicyConfig in the format of "{organizations|folders|projects}/*/kajPolicyConfig".

default_key_access_justification_policy

KeyAccessJustificationsPolicy

Optional. The default key access justification policy used when aCryptoKey is created in this folder. This is only used when a Key Access Justifications policy is not provided in theCreateCryptoKeyRequest. This overrides any default policies in its ancestry.

KeyHandle

Resource-oriented representation of a request to Cloud KMS Autokey and the resulting provisioning of aCryptoKey.

Fields
name

string

Identifier. Name of theKeyHandle resource, e.g.projects/{PROJECT_ID}/locations/{LOCATION}/keyHandles/{KEY_HANDLE_ID}.

kms_key

string

Output only. Name of aCryptoKey that has been provisioned for Customer Managed Encryption Key (CMEK) use in theKeyHandle project and location for the requested resource type. TheCryptoKey project will reflect the value configured in theAutokeyConfig on the resource project's ancestor folder at the time of theKeyHandle creation. If more than one ancestor folder has a configuredAutokeyConfig, the nearest of these configurations is used.

resource_type_selector

string

Required. Indicates the resource type that the resultingCryptoKey is meant to protect, e.g.{SERVICE}.googleapis.com/{TYPE}. See documentation for supported resource types.

KeyOperationAttestation

Contains an HSM-generated attestation about a key operation. For more information, seeVerifying attestations.

Fields
format

AttestationFormat

Output only. The format of the attestation data.

content

bytes

Output only. The attestation data provided by the HSM when the key operation was performed.

cert_chains

CertificateChains

Output only. The certificate chains needed to validate the attestation

AttestationFormat

Attestation formats provided by the HSM.

Enums
ATTESTATION_FORMAT_UNSPECIFIEDNot specified.
CAVIUM_V1_COMPRESSED

Cavium HSM attestation compressed with gzip. Note that this format is defined by Cavium and subject to change at any time.

Seehttps://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html.

CAVIUM_V2_COMPRESSEDCavium HSM attestation V2 compressed with gzip. This is a new format introduced in Cavium's version 3.2-08.

CertificateChains

Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based onhttps://tools.ietf.org/html/rfc5246#section-7.4.2.

Fields
cavium_certs[]

string

Cavium certificate chain corresponding to the attestation.

google_card_certs[]

string

Google card certificate chain corresponding to the attestation.

google_partition_certs[]

string

Google partition certificate chain corresponding to the attestation.

KeyRing

AKeyRing is a toplevel logical grouping ofCryptoKeys.

Fields
name

string

Output only. The resource name for theKeyRing in the formatprojects/*/locations/*/keyRings/*.

create_time

Timestamp

Output only. The time at which thisKeyRing was created.

ListCryptoKeyVersionsRequest

Request message forKeyManagementService.ListCryptoKeyVersions.

Fields
parent

string

Required. The resource name of theCryptoKey to list, in the formatprojects/*/locations/*/keyRings/*/cryptoKeys/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.cryptoKeyVersions.list
page_size

int32

Optional. Optional limit on the number ofCryptoKeyVersions to include in the response. FurtherCryptoKeyVersions can subsequently be obtained by including theListCryptoKeyVersionsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListCryptoKeyVersionsResponse.next_page_token.

view

CryptoKeyVersionView

The fields to include in the response.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

ListCryptoKeyVersionsResponse

Response message forKeyManagementService.ListCryptoKeyVersions.

Fields
crypto_key_versions[]

CryptoKeyVersion

The list ofCryptoKeyVersions.

next_page_token

string

A token to retrieve next page of results. Pass this value inListCryptoKeyVersionsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofCryptoKeyVersions that matched the query.

This field is not populated ifListCryptoKeyVersionsRequest.filter is applied.

ListCryptoKeysRequest

Request message forKeyManagementService.ListCryptoKeys.

Fields
parent

string

Required. The resource name of theKeyRing to list, in the formatprojects/*/locations/*/keyRings/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.cryptoKeys.list
page_size

int32

Optional. Optional limit on the number ofCryptoKeys to include in the response. FurtherCryptoKeys can subsequently be obtained by including theListCryptoKeysResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListCryptoKeysResponse.next_page_token.

version_view

CryptoKeyVersionView

The fields of the primary version to include in the response.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

ListCryptoKeysResponse

Response message forKeyManagementService.ListCryptoKeys.

Fields
crypto_keys[]

CryptoKey

The list ofCryptoKeys.

next_page_token

string

A token to retrieve next page of results. Pass this value inListCryptoKeysRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofCryptoKeys that matched the query.

This field is not populated ifListCryptoKeysRequest.filter is applied.

ListEkmConnectionsRequest

Request message forEkmService.ListEkmConnections.

Fields
parent

string

Required. The resource name of the location associated with theEkmConnections to list, in the formatprojects/*/locations/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.ekmConnections.list
page_size

int32

Optional. Optional limit on the number ofEkmConnections to include in the response. FurtherEkmConnections can subsequently be obtained by including theListEkmConnectionsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListEkmConnectionsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

ListEkmConnectionsResponse

Response message forEkmService.ListEkmConnections.

Fields
ekm_connections[]

EkmConnection

The list ofEkmConnections.

next_page_token

string

A token to retrieve next page of results. Pass this value inListEkmConnectionsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofEkmConnections that matched the query.

This field is not populated ifListEkmConnectionsRequest.filter is applied.

ListImportJobsRequest

Request message forKeyManagementService.ListImportJobs.

Fields
parent

string

Required. The resource name of theKeyRing to list, in the formatprojects/*/locations/*/keyRings/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.importJobs.list
page_size

int32

Optional. Optional limit on the number ofImportJobs to include in the response. FurtherImportJobs can subsequently be obtained by including theListImportJobsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListImportJobsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

ListImportJobsResponse

Response message forKeyManagementService.ListImportJobs.

Fields
import_jobs[]

ImportJob

The list ofImportJobs.

next_page_token

string

A token to retrieve next page of results. Pass this value inListImportJobsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofImportJobs that matched the query.

This field is not populated ifListImportJobsRequest.filter is applied.

ListKeyHandlesRequest

Request message forAutokey.ListKeyHandles.

Fields
parent

string

Required. Name of the resource project and location from which to listKeyHandles, e.g.projects/{PROJECT_ID}/locations/{LOCATION}.

page_size

int32

Optional. Optional limit on the number ofKeyHandles to include in the response. The service may return fewer than this value. FurtherKeyHandles can subsequently be obtained by including theListKeyHandlesResponse.next_page_token in a subsequent request. If unspecified, at most 100KeyHandles will be returned.

page_token

string

Optional. Optional pagination token, returned earlier viaListKeyHandlesResponse.next_page_token.

filter

string

Optional. Filter to apply when listingKeyHandles, e.g.resource_type_selector="{SERVICE}.googleapis.com/{TYPE}".

ListKeyHandlesResponse

Response message forAutokey.ListKeyHandles.

Fields
key_handles[]

KeyHandle

ResultingKeyHandles.

next_page_token

string

A token to retrieve next page of results. Pass this value inListKeyHandlesRequest.page_token to retrieve the next page of results.

ListKeyRingsRequest

Request message forKeyManagementService.ListKeyRings.

Fields
parent

string

Required. The resource name of the location associated with theKeyRings, in the formatprojects/*/locations/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • cloudkms.keyRings.list
page_size

int32

Optional. Optional limit on the number ofKeyRings to include in the response. FurtherKeyRings can subsequently be obtained by including theListKeyRingsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListKeyRingsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

ListKeyRingsResponse

Response message forKeyManagementService.ListKeyRings.

Fields
key_rings[]

KeyRing

The list ofKeyRings.

next_page_token

string

A token to retrieve next page of results. Pass this value inListKeyRingsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofKeyRings that matched the query.

This field is not populated ifListKeyRingsRequest.filter is applied.

ListSingleTenantHsmInstanceProposalsRequest

Request message forHsmManagement.ListSingleTenantHsmInstanceProposals.

Fields
parent

string

Required. The resource name of the single tenant HSM instance associated with theSingleTenantHsmInstanceProposals to list, in the formatprojects/*/locations/*/singleTenantHsmInstances/*.

page_size

int32

Optional. Optional limit on the number ofSingleTenantHsmInstanceProposals to include in the response. FurtherSingleTenantHsmInstanceProposals can subsequently be obtained by including theListSingleTenantHsmInstanceProposalsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListSingleTenantHsmInstanceProposalsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

show_deleted

bool

Optional. If set to true,HsmManagement.ListSingleTenantHsmInstanceProposals will also returnSingleTenantHsmInstanceProposals in DELETED state.

ListSingleTenantHsmInstanceProposalsResponse

Response message forHsmManagement.ListSingleTenantHsmInstanceProposals.

Fields
single_tenant_hsm_instance_proposals[]

SingleTenantHsmInstanceProposal

The list ofSingleTenantHsmInstanceProposals.

next_page_token

string

A token to retrieve next page of results. Pass this value inListSingleTenantHsmInstanceProposalsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofSingleTenantHsmInstanceProposals that matched the query.

This field is not populated ifListSingleTenantHsmInstanceProposalsRequest.filter is applied.

ListSingleTenantHsmInstancesRequest

Request message forHsmManagement.ListSingleTenantHsmInstances.

Fields
parent

string

Required. The resource name of the location associated with theSingleTenantHsmInstances to list, in the formatprojects/*/locations/*.

page_size

int32

Optional. Optional limit on the number ofSingleTenantHsmInstances to include in the response. FurtherSingleTenantHsmInstances can subsequently be obtained by including theListSingleTenantHsmInstancesResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier viaListSingleTenantHsmInstancesResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, seeSorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, seeSorting and filtering list results.

show_deleted

bool

Optional. If set to true,HsmManagement.ListSingleTenantHsmInstances will also returnSingleTenantHsmInstances in DELETED state.

ListSingleTenantHsmInstancesResponse

Response message forHsmManagement.ListSingleTenantHsmInstances.

Fields
single_tenant_hsm_instances[]

SingleTenantHsmInstance

The list ofSingleTenantHsmInstances.

next_page_token

string

A token to retrieve next page of results. Pass this value inListSingleTenantHsmInstancesRequest.page_token to retrieve the next page of results.

total_size

int32

The total number ofSingleTenantHsmInstances that matched the query.

This field is not populated ifListSingleTenantHsmInstancesRequest.filter is applied.

LocationMetadata

Cloud KMS metadata for the givengoogle.cloud.location.Location.

Fields
hsm_available

bool

Indicates whetherCryptoKeys withprotection_levelHSM can be created in this location.

ekm_available

bool

Indicates whetherCryptoKeys withprotection_levelEXTERNAL can be created in this location.

hsm_single_tenant_available

bool

Indicates whetherCryptoKeys withprotection_levelHSM_SINGLE_TENANT can be created in this location.

MacSignRequest

Request message forKeyManagementService.MacSign.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for signing.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToSign
data

bytes

Required. The data to sign. The MAC tag is computed over this data field based on the specific algorithm.

data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theMacSignRequest.data. If specified,KeyManagementService will verify the integrity of the receivedMacSignRequest.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 toMacSignRequest.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.

MacSignResponse

Response message forKeyManagementService.MacSign.

Fields
name

string

The resource name of theCryptoKeyVersion used for signing. Check this field to verify that the intended resource was used for signing.

mac

bytes

The created signature.

mac_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedMacSignResponse.mac. An integrity check ofMacSignResponse.mac can be performed by computing the CRC32C checksum ofMacSignResponse.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.

verified_data_crc32c

bool

Integrity verification field. A flag indicating whetherMacSignRequest.data_crc32c was received byKeyManagementService and used for the integrity verification of thedata. A false value of this field indicates either thatMacSignRequest.data_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setMacSignRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used for signing.

MacVerifyRequest

Request message forKeyManagementService.MacVerify.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for verification.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToVerify
data

bytes

Required. The data used previously as aMacSignRequest.data to generate the MAC tag.

data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theMacVerifyRequest.data. If specified,KeyManagementService will verify the integrity of the receivedMacVerifyRequest.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 toMacVerifyRequest.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.

mac

bytes

Required. The signature to verify.

mac_crc32c

Int64Value

Optional. An optional CRC32C checksum of theMacVerifyRequest.mac. If specified,KeyManagementService will verify the integrity of the receivedMacVerifyRequest.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.mac) is equal toMacVerifyRequest.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.

MacVerifyResponse

Response message forKeyManagementService.MacVerify.

Fields
name

string

The resource name of theCryptoKeyVersion used for verification. Check this field to verify that the intended resource was used for verification.

success

bool

This field indicates whether or not the verification operation forMacVerifyRequest.mac overMacVerifyRequest.data was successful.

verified_data_crc32c

bool

Integrity verification field. A flag indicating whetherMacVerifyRequest.data_crc32c was received byKeyManagementService and used for the integrity verification of thedata. A false value of this field indicates either thatMacVerifyRequest.data_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setMacVerifyRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_mac_crc32c

bool

Integrity verification field. A flag indicating whetherMacVerifyRequest.mac_crc32c was received byKeyManagementService and used for the integrity verification of thedata. A false value of this field indicates either thatMacVerifyRequest.mac_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setMacVerifyRequest.mac_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_success_integrity

bool

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.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used for verification.

ProtectionLevel

ProtectionLevel specifies how cryptographic operations are performed. For more information, seeProtection levels.

Enums
PROTECTION_LEVEL_UNSPECIFIEDNot specified.
SOFTWARECrypto operations are performed in software.
HSMCrypto operations are performed in a Hardware Security Module.
EXTERNALCrypto operations are performed by an external key manager.
EXTERNAL_VPCCrypto operations are performed in an EKM-over-VPC backend.
HSM_SINGLE_TENANTCrypto operations are performed in a single-tenant HSM.

PublicKey

The public keys for a givenCryptoKeyVersion. Obtained viaGetPublicKey.

Fields
pem

string

The public key, encoded in PEM format. For more information, see theRFC 7468 sections forGeneral Considerations andTextual Encoding of Subject Public Key Info.

algorithm

CryptoKeyVersionAlgorithm

TheAlgorithm associated with this key.

pem_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedPublicKey.pem. An integrity check ofPublicKey.pem can be performed by computing the CRC32C checksum ofPublicKey.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 exceed2^32-1, and can be safely downconverted to uint32 in languages that support this type.

NOTE: This field is in Beta.

name

string

Thename of theCryptoKeyVersion public key. Provided here for verification.

NOTE: This field is in Beta.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion public key.

public_key_format

PublicKeyFormat

ThePublicKey format specified by the customer through thepublic_key_format field.

public_key

ChecksummedData

This field contains the public key (with integrity verification), formatted according to thepublic_key_format field.

PublicKeyFormat

The supportedPublicKey formats.

Enums
PUBLIC_KEY_FORMAT_UNSPECIFIED

If thepublic_key_format field is not specified: - For PQC algorithms, an error will be returned. - For non-PQC algorithms, the default format is PEM, and the fieldpem will be populated.

Otherwise, the public key will be exported through thepublic_key field in the requested format.

PEMThe returned public key will be encoded in PEM format. See theRFC7468 sections forGeneral Considerations andTextual Encoding of Subject Public Key Info for more information.
DERThe returned public key will be encoded in DER format (the PrivateKeyInfo structure from RFC 5208).
NIST_PQCThis is supported only for PQC algorithms. The key material is returned in the format defined by NIST PQC standards (FIPS 203, FIPS 204, and FIPS 205).
XWING_RAW_BYTESThe returned public key is in raw bytes format defined in its standardhttps://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem.

RawDecryptRequest

Request message forKeyManagementService.RawDecrypt.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for decryption.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToDecrypt
ciphertext

bytes

Required. The encrypted data originally returned inRawEncryptResponse.ciphertext.

additional_authenticated_data

bytes

Optional. Optional data that must match the data originally supplied inRawEncryptRequest.additional_authenticated_data.

initialization_vector

bytes

Required. The initialization vector (IV) used during encryption, which must match the data originally provided inRawEncryptResponse.initialization_vector.

tag_length

int32

The length of the authentication tag that is appended to the end of the ciphertext. If unspecified (0), the default value for the key's algorithm will be used (for AES-GCM, the default value is 16).

ciphertext_crc32c

Int64Value

Optional. An optional CRC32C checksum of theRawDecryptRequest.ciphertext. If specified,KeyManagementService will verify the integrity of the received 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(ciphertext) is equal to 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.

additional_authenticated_data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theRawDecryptRequest.additional_authenticated_data. If specified,KeyManagementService will verify the integrity of the received additional_authenticated_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(additional_authenticated_data) is equal to additional_authenticated_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.

initialization_vector_crc32c

Int64Value

Optional. An optional CRC32C checksum of theRawDecryptRequest.initialization_vector. If specified,KeyManagementService will verify the integrity of the received initialization_vector 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(initialization_vector) is equal to initialization_vector_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.

RawDecryptResponse

Response message forKeyManagementService.RawDecrypt.

Fields
plaintext

bytes

The decrypted data.

plaintext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedRawDecryptResponse.plaintext. An integrity check of plaintext can be performed by computing the CRC32C checksum of 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: receiving this response message indicates thatKeyManagementService is able to successfully decrypt theciphertext. 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.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used in decryption.

verified_ciphertext_crc32c

bool

Integrity verification field. A flag indicating whetherRawDecryptRequest.ciphertext_crc32c was received byKeyManagementService and used for the integrity verification of the ciphertext. A false value of this field indicates either thatRawDecryptRequest.ciphertext_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setRawDecryptRequest.ciphertext_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_additional_authenticated_data_crc32c

bool

Integrity verification field. A flag indicating whetherRawDecryptRequest.additional_authenticated_data_crc32c was received byKeyManagementService and used for the integrity verification of additional_authenticated_data. A false value of this field indicates either that //RawDecryptRequest.additional_authenticated_data_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setRawDecryptRequest.additional_authenticated_data_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_initialization_vector_crc32c

bool

Integrity verification field. A flag indicating whetherRawDecryptRequest.initialization_vector_crc32c was received byKeyManagementService and used for the integrity verification of initialization_vector. A false value of this field indicates either thatRawDecryptRequest.initialization_vector_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setRawDecryptRequest.initialization_vector_crc32c but this field is still false, discard the response and perform a limited number of retries.

RawEncryptRequest

Request message forKeyManagementService.RawEncrypt.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to use for encryption.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.useToEncrypt
plaintext

bytes

Required. The data to encrypt. Must be no larger than 64KiB.

The maximum size depends on the key version'sprotection_level. ForSOFTWARE keys, the plaintext must be no larger than 64KiB. ForHSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.

additional_authenticated_data

bytes

Optional. Optional data that, if specified, must also be provided during decryption throughRawDecryptRequest.additional_authenticated_data.

This field may only be used in conjunction with analgorithm that accepts additional authenticated data (for example, AES-GCM).

The maximum size depends on the key version'sprotection_level. ForSOFTWARE keys, the plaintext must be no larger than 64KiB. ForHSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.

plaintext_crc32c

Int64Value

Optional. An optional CRC32C checksum of theRawEncryptRequest.plaintext. If specified,KeyManagementService will verify the integrity of the received plaintext 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(plaintext) is equal to plaintext_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.

additional_authenticated_data_crc32c

Int64Value

Optional. An optional CRC32C checksum of theRawEncryptRequest.additional_authenticated_data. If specified,KeyManagementService will verify the integrity of the received additional_authenticated_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(additional_authenticated_data) is equal to additional_authenticated_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.

initialization_vector

bytes

Optional. A customer-supplied initialization vector that will be used for encryption. If it is not provided for AES-CBC and AES-CTR, one will be generated. It will be returned inRawEncryptResponse.initialization_vector.

initialization_vector_crc32c

Int64Value

Optional. An optional CRC32C checksum of theRawEncryptRequest.initialization_vector. If specified,KeyManagementService will verify the integrity of the received initialization_vector 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(initialization_vector) is equal to initialization_vector_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.

RawEncryptResponse

Response message forKeyManagementService.RawEncrypt.

Fields
ciphertext

bytes

The encrypted data. In the case of AES-GCM, the authentication tag is thetag_length bytes at the end of this field.

initialization_vector

bytes

The initialization vector (IV) generated by the service during encryption. This value must be stored and provided inRawDecryptRequest.initialization_vector at decryption time.

tag_length

int32

The length of the authentication tag that is appended to the end of the ciphertext.

ciphertext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedRawEncryptResponse.ciphertext. An integrity check of ciphertext can be performed by computing the CRC32C checksum of ciphertext 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.

initialization_vector_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returnedRawEncryptResponse.initialization_vector. An integrity check of initialization_vector can be performed by computing the CRC32C checksum of initialization_vector 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.

verified_plaintext_crc32c

bool

Integrity verification field. A flag indicating whetherRawEncryptRequest.plaintext_crc32c was received byKeyManagementService and used for the integrity verification of the plaintext. A false value of this field indicates either thatRawEncryptRequest.plaintext_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setRawEncryptRequest.plaintext_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_additional_authenticated_data_crc32c

bool

Integrity verification field. A flag indicating whetherRawEncryptRequest.additional_authenticated_data_crc32c was received byKeyManagementService and used for the integrity verification of additional_authenticated_data. A false value of this field indicates either that //RawEncryptRequest.additional_authenticated_data_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setRawEncryptRequest.additional_authenticated_data_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_initialization_vector_crc32c

bool

Integrity verification field. A flag indicating whetherRawEncryptRequest.initialization_vector_crc32c was received byKeyManagementService and used for the integrity verification of initialization_vector. A false value of this field indicates either thatRawEncryptRequest.initialization_vector_crc32c was left unset or that it was not delivered toKeyManagementService. If you've setRawEncryptRequest.initialization_vector_crc32c but this field is still false, discard the response and perform a limited number of retries.

name

string

The resource name of theCryptoKeyVersion used in encryption. Check this field to verify that the intended resource was used for encryption.

protection_level

ProtectionLevel

TheProtectionLevel of theCryptoKeyVersion used in encryption.

RestoreCryptoKeyVersionRequest

Request message forKeyManagementService.RestoreCryptoKeyVersion.

Fields
name

string

Required. The resource name of theCryptoKeyVersion to restore.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeyVersions.restore

ShowEffectiveAutokeyConfigRequest

Request message forShowEffectiveAutokeyConfig.

Fields
parent

string

Required. Name of the resource project to the show effective Cloud KMS Autokey configuration for. This may be helpful for interrogating the effect of nested folder configurations on a given resource project.

ShowEffectiveAutokeyConfigResponse

Response message forShowEffectiveAutokeyConfig.

Fields
key_project

string

Name of the key project configured in the resource project's folder ancestry.

ShowEffectiveKeyAccessJustificationsEnrollmentConfigRequest

Request message forKeyAccessJustificationsConfig.ShowEffectiveKeyAccessJustificationsEnrollmentConfig

Fields
project

string

Required. The number or id of the project to get the effectiveKeyAccessJustificationsEnrollmentConfig for.

ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse

Response message forKeyAccessJustificationsConfig.ShowEffectiveKeyAccessJustificationsEnrollmentConfig

Fields
hardware_config

KeyAccessJustificationsEnrollmentConfig

The effectiveKeyAccessJustificationsEnrollmentConfig for hardware keys.

software_config

KeyAccessJustificationsEnrollmentConfig

The effectiveKeyAccessJustificationsEnrollmentConfig for software keys.

external_config

KeyAccessJustificationsEnrollmentConfig

The effectiveKeyAccessJustificationsEnrollmentConfig for external keys.

ShowEffectiveKeyAccessJustificationsPolicyConfigRequest

Request message forKeyAccessJustificationsConfig.ShowEffectiveKeyAccessJustificationsPolicyConfig.

Fields
project

string

Required. The number or id of the project to get the effectiveKeyAccessJustificationsPolicyConfig. In the format of "projects/{|}"

ShowEffectiveKeyAccessJustificationsPolicyConfigResponse

Response message forKeyAccessJustificationsConfig.ShowEffectiveKeyAccessJustificationsPolicyConfig.

Fields
effective_kaj_policy

KeyAccessJustificationsPolicyConfig

The effectiveKeyAccessJustificationsPolicyConfig.

SingleTenantHsmInstance

ASingleTenantHsmInstance represents a single-tenant HSM instance. It can be used for creatingCryptoKeys with aProtectionLevel of [HSM_SINGLE_TENANT][CryptoKeyVersion.ProtectionLevel.HSM_SINGLE_TENANT], as well as performing cryptographic operations using keys created within theSingleTenantHsmInstance.

Fields
name

string

Identifier. The resource name for thisSingleTenantHsmInstance in the formatprojects/*/locations/*/singleTenantHsmInstances/*.

create_time

Timestamp

Output only. The time at which theSingleTenantHsmInstance was created.

state

State

Output only. The state of theSingleTenantHsmInstance.

quorum_auth

QuorumAuth

Required. The quorum auth configuration for theSingleTenantHsmInstance.

delete_time

Timestamp

Output only. The time at which theSingleTenantHsmInstance was deleted.

unrefreshed_duration_until_disable

Duration

Output only. The system-defined duration that an instance can remain unrefreshed until it is automatically disabled. This will have a value of 120 days.

disable_time

Timestamp

Output only. The time at which the instance will be automatically disabled if not refreshed. This field is updated upon creation and after each successful refresh operation and enable. A [RefreshSingleTenantHsmInstance][] operation must be made via aSingleTenantHsmInstanceProposal before this time otherwise theSingleTenantHsmInstance will become disabled.

QuorumAuth

Configuration for M of N quorum auth.

Fields
total_approver_count

int32

Required. The total number of approvers. This is the N value used for M of N quorum auth. Must be greater than or equal to 3 and less than or equal to 16.

required_approver_count

int32

Output only. The required numbers of approvers. The M value used for M of N quorum auth. Must be greater than or equal to 2 and less than or equal tototal_approver_count - 1.

two_factor_public_key_pems[]

string

Output only. The public keys associated with the 2FA keys for M of N quorum auth.

State

The set of states of aSingleTenantHsmInstance.

Enums
STATE_UNSPECIFIEDNot specified.
CREATINGTheSingleTenantHsmInstance is being created.
PENDING_TWO_FACTOR_AUTH_REGISTRATIONTheSingleTenantHsmInstance is waiting for 2FA keys to be registered. This can be done by callingCreateSingleTenantHsmInstanceProposal with the [RegisterTwoFactorAuthKeys][] operation.
ACTIVETheSingleTenantHsmInstance is ready to use. ASingleTenantHsmInstance must be in theACTIVE state for allCryptoKeys created within theSingleTenantHsmInstance to be usable.
DISABLINGTheSingleTenantHsmInstance is being disabled.
DISABLEDTheSingleTenantHsmInstance is disabled.
DELETINGTheSingleTenantHsmInstance is being deleted. Requests to the instance will be rejected in this state.
DELETEDTheSingleTenantHsmInstance has been deleted.
FAILEDTheSingleTenantHsmInstance has failed and can not be recovered or used.

SingleTenantHsmInstanceProposal

ASingleTenantHsmInstanceProposal represents a proposal to perform an operation on aSingleTenantHsmInstance.

Fields
name

string

Identifier. The resource name for thisSingleTenantHsmInstance in the formatprojects/*/locations/*/singleTenantHsmInstances/*/proposals/*.

create_time

Timestamp

Output only. The time at which theSingleTenantHsmInstanceProposal was created.

state

State

Output only. The state of theSingleTenantHsmInstanceProposal.

failure_reason

string

Output only. The root cause of the most recent failure. Only present ifstate is [FAILED][SingleTenantHsmInstanceProposal.FAILED].

delete_time

Timestamp

Output only. The time at which theSingleTenantHsmInstanceProposal was deleted.

purge_time

Timestamp

Output only. The time at which the soft-deletedSingleTenantHsmInstanceProposal will be permanently purged. This field is only populated when the state is DELETED and will be set a time after expiration of the proposal, i.e. >= expire_time or (create_time + ttl).

Union fieldapproval_parameters. The approval parameters for theSingleTenantHsmInstanceProposal. The type of parameters is determined by the operation being proposed.approval_parameters can be only one of the following:
quorum_parameters

QuorumParameters

Output only. The quorum approval parameters for theSingleTenantHsmInstanceProposal.

required_action_quorum_parameters

RequiredActionQuorumParameters

Output only. Parameters for an approval of aSingleTenantHsmInstanceProposal that has both required challenges and a quorum.

Union fieldexpiration. The expiration of theSingleTenantHsmInstanceProposal. If not set, theSingleTenantHsmInstanceProposal will expire in 1 day. The maximum expire time is 7 days. The minimum expire time is 5 minutes.expiration can be only one of the following:
expire_time

Timestamp

The time at which theSingleTenantHsmInstanceProposal will expire if not approved and executed.

ttl

Duration

Input only. The TTL for theSingleTenantHsmInstanceProposal. Proposals will expire after this duration.

Union fieldoperation. The operation to perform on theSingleTenantHsmInstance.operation can be only one of the following:
register_two_factor_auth_keys

RegisterTwoFactorAuthKeys

Register 2FA keys for theSingleTenantHsmInstance. This operation requires all N Challenges to be signed by 2FA keys. TheSingleTenantHsmInstance must be in thePENDING_TWO_FACTOR_AUTH_REGISTRATION state to perform this operation.

disable_single_tenant_hsm_instance

DisableSingleTenantHsmInstance

Disable theSingleTenantHsmInstance. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

enable_single_tenant_hsm_instance

EnableSingleTenantHsmInstance

Enable theSingleTenantHsmInstance. TheSingleTenantHsmInstance must be in theDISABLED state to perform this operation.

delete_single_tenant_hsm_instance

DeleteSingleTenantHsmInstance

Delete theSingleTenantHsmInstance. Deleting aSingleTenantHsmInstance will make allCryptoKeys attached to theSingleTenantHsmInstance unusable. TheSingleTenantHsmInstance must be in theDISABLED orPENDING_TWO_FACTOR_AUTH_REGISTRATION state to perform this operation.

add_quorum_member

AddQuorumMember

Add a quorum member to theSingleTenantHsmInstance. This will increase thetotal_approver_count by 1. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

remove_quorum_member

RemoveQuorumMember

Remove a quorum member from theSingleTenantHsmInstance. This will reducetotal_approver_count by 1. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

refresh_single_tenant_hsm_instance

RefreshSingleTenantHsmInstance

Refreshes theSingleTenantHsmInstance. This operation must be performed periodically to keep theSingleTenantHsmInstance active. This operation must be performed beforeunrefreshed_duration_until_disable has passed. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

AddQuorumMember

Add a quorum member to theSingleTenantHsmInstance. This will increase thetotal_approver_count by 1. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

Fields
two_factor_public_key_pem

string

Required. The public key associated with the 2FA key for the new quorum member to add. Public keys must be associated with RSA 2048 keys.

DeleteSingleTenantHsmInstance

This type has no fields.

Delete theSingleTenantHsmInstance. Deleting aSingleTenantHsmInstance will make allCryptoKeys attached to theSingleTenantHsmInstance unusable. TheSingleTenantHsmInstance must not be in theDELETING orDELETED state to perform this operation.

DisableSingleTenantHsmInstance

This type has no fields.

Disable theSingleTenantHsmInstance. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

EnableSingleTenantHsmInstance

This type has no fields.

Enable theSingleTenantHsmInstance. TheSingleTenantHsmInstance must be in theDISABLED state to perform this operation.

QuorumParameters

Parameters of quorum approval for theSingleTenantHsmInstanceProposal.

Fields
required_approver_count

int32

Output only. The required numbers of approvers. This is the M value used for M of N quorum auth. It is less than the number of public keys.

challenges[]

Challenge

Output only. The challenges to be signed by 2FA keys for quorum auth. M of N of these challenges are required to be signed to approve the operation.

approved_two_factor_public_key_pems[]

string

Output only. The public keys associated with the 2FA keys that have already approved theSingleTenantHsmInstanceProposal by signing the challenge.

RefreshSingleTenantHsmInstance

This type has no fields.

Refreshes theSingleTenantHsmInstance. This operation must be performed periodically to keep theSingleTenantHsmInstance active. This operation must be performed beforeunrefreshed_duration_until_disable has passed. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

RegisterTwoFactorAuthKeys

Register 2FA keys for theSingleTenantHsmInstance. This operation requires all Challenges to be signed by 2FA keys. TheSingleTenantHsmInstance must be in thePENDING_TWO_FACTOR_AUTH_REGISTRATION state to perform this operation.

Fields
required_approver_count

int32

Required. The required numbers of approvers to set for theSingleTenantHsmInstance. This is the M value used for M of N quorum auth. Must be greater than or equal to 2 and less than or equal tototal_approver_count - 1.

two_factor_public_key_pems[]

string

Required. The public keys associated with the 2FA keys for M of N quorum auth. Public keys must be associated with RSA 2048 keys.

RemoveQuorumMember

Remove a quorum member from theSingleTenantHsmInstance. This will reducetotal_approver_count by 1. TheSingleTenantHsmInstance must be in theACTIVE state to perform this operation.

Fields
two_factor_public_key_pem

string

Required. The public key associated with the 2FA key for the quorum member to remove. Public keys must be associated with RSA 2048 keys.

RequiredActionQuorumParameters

Parameters for an approval that has both required challenges and a quorum.

Fields
required_challenges[]

Challenge

Output only. A list of specific challenges that must be signed. For some operations, this will contain a single challenge.

required_approver_count

int32

Output only. The required number of quorum approvers. This is the M value used for M of N quorum auth. It is less than the number of public keys.

quorum_challenges[]

Challenge

Output only. The challenges to be signed by 2FA keys for quorum auth. M of N of these challenges are required to be signed to approve the operation.

approved_two_factor_public_key_pems[]

string

Output only. The public keys associated with the 2FA keys that have already approved theSingleTenantHsmInstanceProposal by signing the challenge.

State

The set of states of aSingleTenantHsmInstanceProposal.

Enums
STATE_UNSPECIFIEDNot specified.
CREATINGTheSingleTenantHsmInstanceProposal is being created.
PENDINGTheSingleTenantHsmInstanceProposal is pending approval.
APPROVEDTheSingleTenantHsmInstanceProposal has been approved.
RUNNINGTheSingleTenantHsmInstanceProposal is being executed.
SUCCEEDEDTheSingleTenantHsmInstanceProposal has been executed successfully.
FAILEDTheSingleTenantHsmInstanceProposal has failed.
DELETEDTheSingleTenantHsmInstanceProposal has been deleted and will be purged after the purge_time.

UpdateAutokeyConfigRequest

Request message forUpdateAutokeyConfig.

Fields
autokey_config

AutokeyConfig

Required.AutokeyConfig with values to update.

update_mask

FieldMask

Required. Masks which fields of theAutokeyConfig to update, e.g.keyProject.

UpdateCryptoKeyPrimaryVersionRequest

Request message forKeyManagementService.UpdateCryptoKeyPrimaryVersion.

Fields
name

string

Required. The resource name of theCryptoKey to update.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.cryptoKeys.update
crypto_key_version_id

string

Required. The id of the childCryptoKeyVersion to use as primary.

UpdateCryptoKeyRequest

Request message forKeyManagementService.UpdateCryptoKey.

Fields
crypto_key

CryptoKey

Required.CryptoKey with updated values.

Authorization requires the followingIAM permission on the specified resourcecryptoKey:

  • cloudkms.cryptoKeys.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateCryptoKeyVersionRequest

Request message forKeyManagementService.UpdateCryptoKeyVersion.

Fields
crypto_key_version

CryptoKeyVersion

Required.CryptoKeyVersion with updated values.

Authorization requires the followingIAM permission on the specified resourcecryptoKeyVersion:

  • cloudkms.cryptoKeyVersions.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateEkmConfigRequest

Request message forEkmService.UpdateEkmConfig.

Fields
ekm_config

EkmConfig

Required.EkmConfig with updated values.

Authorization requires the followingIAM permission on the specified resourceekmConfig:

  • cloudkms.ekmConfigs.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateEkmConnectionRequest

Request message forEkmService.UpdateEkmConnection.

Fields
ekm_connection

EkmConnection

Required.EkmConnection with updated values.

Authorization requires the followingIAM permission on the specified resourceekmConnection:

  • cloudkms.ekmConnections.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateKeyAccessJustificationsPolicyConfigRequest

Request message forKeyAccessJustificationsConfig.UpdateKeyAccessJustificationsPolicyConfig.

Fields
key_access_justifications_policy_config

KeyAccessJustificationsPolicyConfig

Required.KeyAccessJustificationsPolicyConfig with updated values.

update_mask

FieldMask

Optional. The list of fields to update.

VerifyConnectivityRequest

Request message forEkmService.VerifyConnectivity.

Fields
name

string

Required. Thename of theEkmConnection to verify.

Authorization requires the followingIAM permission on the specified resourcename:

  • cloudkms.ekmConnections.verifyConnectivity

VerifyConnectivityResponse

This type has no fields.

Response message forEkmService.VerifyConnectivity.

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 2026-02-11 UTC.