import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../../types/output"; /** * Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion. */ export declare function getCryptoKey(args: GetCryptoKeyArgs, opts?: pulumi.InvokeOptions): Promise; export interface GetCryptoKeyArgs { cryptoKeyId: string; keyRingId: string; location: string; project?: string; } export interface GetCryptoKeyResult { /** * The time at which this CryptoKey was created. */ readonly createTime: 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/*`. Note, this list is non-exhaustive and may apply to additional ProtectionLevels in the future. */ readonly cryptoKeyBackend: 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 24 hours. */ readonly destroyScheduledDuration: string; /** * Immutable. Whether this key may contain imported versions only. */ readonly importOnly: boolean; /** * Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). */ readonly labels: { [key: string]: string; }; /** * The resource name for this CryptoKey in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. */ readonly name: string; /** * 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. */ readonly nextRotationTime: string; /** * 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. */ readonly primary: outputs.cloudkms.v1.CryptoKeyVersionResponse; /** * Immutable. The immutable purpose of this CryptoKey. */ readonly purpose: 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. */ readonly rotationPeriod: string; /** * 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. */ readonly versionTemplate: outputs.cloudkms.v1.CryptoKeyVersionTemplateResponse; } /** * Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion. */ export declare function getCryptoKeyOutput(args: GetCryptoKeyOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output; export interface GetCryptoKeyOutputArgs { cryptoKeyId: pulumi.Input; keyRingId: pulumi.Input; location: pulumi.Input; project?: pulumi.Input; }