UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

118 lines (117 loc) 4.63 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see * [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) * and * [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). * * A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myKeyRing = gcp.kms.getKMSKeyRing({ * name: "my-key-ring", * location: "us-central1", * }); * const myCryptoKey = myKeyRing.then(myKeyRing => gcp.kms.getKMSCryptoKey({ * name: "my-crypto-key", * keyRing: myKeyRing.id, * })); * const myCryptoKeyVersion = gcp.kms.getKMSCryptoKeyVersion({ * cryptoKey: myKey.id, * }); * ``` */ export declare function getKMSCryptoKeyVersion(args: GetKMSCryptoKeyVersionArgs, opts?: pulumi.InvokeOptions): Promise<GetKMSCryptoKeyVersionResult>; /** * A collection of arguments for invoking getKMSCryptoKeyVersion. */ export interface GetKMSCryptoKeyVersionArgs { /** * The `id` of the Google Cloud Platform CryptoKey to which the key version belongs. This is also the `id` field of the * `gcp.kms.CryptoKey` resource/datasource. */ cryptoKey: string; /** * The version number for this CryptoKeyVersion. Defaults to `1`. */ version?: number; } /** * A collection of values returned by getKMSCryptoKeyVersion. */ export interface GetKMSCryptoKeyVersionResult { /** * The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports. */ readonly algorithm: string; readonly cryptoKey: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The resource name for this CryptoKeyVersion in the format `projects/*&#47;locations/*&#47;keyRings/*&#47;cryptoKeys/*&#47;cryptoKeyVersions/*` */ readonly name: string; /** * The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion. See the [protectionLevel reference](https://cloud.google.com/kms/docs/reference/rest/v1/ProtectionLevel) for possible outputs. */ readonly protectionLevel: string; /** * If the enclosing CryptoKey has purpose `ASYMMETRIC_SIGN` or `ASYMMETRIC_DECRYPT`, this block contains details about the public key associated to this CryptoKeyVersion. Structure is documented below. */ readonly publicKeys: outputs.kms.GetKMSCryptoKeyVersionPublicKey[]; /** * The current state of the CryptoKeyVersion. See the [state reference](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions#CryptoKeyVersion.CryptoKeyVersionState) for possible outputs. */ readonly state: string; readonly version?: number; } /** * Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see * [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) * and * [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). * * A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myKeyRing = gcp.kms.getKMSKeyRing({ * name: "my-key-ring", * location: "us-central1", * }); * const myCryptoKey = myKeyRing.then(myKeyRing => gcp.kms.getKMSCryptoKey({ * name: "my-crypto-key", * keyRing: myKeyRing.id, * })); * const myCryptoKeyVersion = gcp.kms.getKMSCryptoKeyVersion({ * cryptoKey: myKey.id, * }); * ``` */ export declare function getKMSCryptoKeyVersionOutput(args: GetKMSCryptoKeyVersionOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetKMSCryptoKeyVersionResult>; /** * A collection of arguments for invoking getKMSCryptoKeyVersion. */ export interface GetKMSCryptoKeyVersionOutputArgs { /** * The `id` of the Google Cloud Platform CryptoKey to which the key version belongs. This is also the `id` field of the * `gcp.kms.CryptoKey` resource/datasource. */ cryptoKey: pulumi.Input<string>; /** * The version number for this CryptoKeyVersion. Defaults to `1`. */ version?: pulumi.Input<number>; }