# Source: https://docs.datadoghq.com/ddsql_reference/data_directory/gcp/gcp.kms_crypto_key.dataset.md

---
title: KMS Crypto Key
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > DDSQL Reference > Data Directory > KMS Crypto Key
---

# KMS Crypto Key

This table represents the KMS Crypto Key resource from Google Cloud Platform.

```
gcp.kms_crypto_key
```

## Fields

| Title                      | ID   | Type          | Data Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Description |
| -------------------------- | ---- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| _key                       | core | string        |
| ancestors                  | core | array<string> |
| create_time                | core | timestamp     | Output only. The time at which this CryptoKey was created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| crypto_key_backend         | core | string        | Immutable. The resource name of the backend environment where the key material for all CryptoKeyVersions associated with this CryptoKey reside and where all related cryptographic operations are performed. Only applicable if CryptoKeyVersions have a ProtectionLevel of EXTERNAL_VPC, with the resource name in the format `projects/*/locations/*/ekmConnections/*`. Only applicable if CryptoKeyVersions have a ProtectionLevel of HSM_SINGLE_TENANT, with the resource name in the format `projects/*/locations/*/singleTenantHsmInstances/*`. Note, this list is non-exhaustive and may apply to additional ProtectionLevels in the future.                                                                                                                                                                                                          |
| datadog_display_name       | core | string        |
| destroy_scheduled_duration | core | string        | Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 30 days.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| import_only                | core | bool          | Immutable. Whether this key may contain imported versions only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| labels                     | core | array<string> |
| name                       | core | string        | Output only. The resource name for this CryptoKey in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| next_rotation_time         | core | timestamp     | At next_rotation_time, the Key Management Service will automatically: 1. Create a new version of this CryptoKey. 2. Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| organization_id            | core | string        |
| parent                     | core | string        |
| primary                    | core | json          | Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| project_id                 | core | string        |
| project_number             | core | string        |
| purpose                    | core | string        | Immutable. The immutable purpose of this CryptoKey. Possible values: ['CRYPTO_KEY_PURPOSE_UNSPECIFIED', 'ENCRYPT_DECRYPT', 'ASYMMETRIC_SIGN', 'ASYMMETRIC_DECRYPT', 'RAW_ENCRYPT_DECRYPT', 'MAC', 'KEY_ENCAPSULATION']. Values descriptions: ['Not specified.', 'CryptoKeys with this purpose may be used with Encrypt and Decrypt.', 'CryptoKeys with this purpose may be used with AsymmetricSign and GetPublicKey.', 'CryptoKeys with this purpose may be used with AsymmetricDecrypt and GetPublicKey.', 'CryptoKeys with this purpose may be used with RawEncrypt and RawDecrypt. This purpose is meant to be used for interoperable symmetric encryption and does not support automatic CryptoKey rotation.', 'CryptoKeys with this purpose may be used with MacSign.', 'CryptoKeys with this purpose may be used with GetPublicKey and Decapsulate.'] |
| region_id                  | core | string        |
| resource_name              | core | string        |
| rotation_period            | core | string        | 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. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| tags                       | core | hstore_csv    |
| version_template           | core | json          | A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| zone_id                    | core | string        |