UNPKG

@pulumi/gcp

Version:

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

113 lines (112 loc) 4.95 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Provides access to Google Cloud Platform KMS CryptoKeyVersions. 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). * * ## 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 myCryptoKeyVersions = gcp.kms.getCryptoKeyVersions({ * cryptoKey: myKey.id, * }); * ``` */ export declare function getCryptoKeyVersions(args: GetCryptoKeyVersionsArgs, opts?: pulumi.InvokeOptions): Promise<GetCryptoKeyVersionsResult>; /** * A collection of arguments for invoking getCryptoKeyVersions. */ export interface GetCryptoKeyVersionsArgs { /** * 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 filter argument is used to add a filter query parameter that limits which versions are retrieved by the data source: ?filter={{filter}}. When no value is provided there is no filtering. * * Example filter values if filtering on name. Note: names take the form projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{cryptoKey}}/cryptoKeyVersions. * * * `"name:my-key-"` will retrieve cryptoKeyVersions that contain "my-key-" anywhere in their name. * * `"name=projects/my-project/locations/global/keyRings/my-key-ring/cryptoKeys/my-key-1/cryptoKeyVersions/my-version-1"` will only retrieve a key with that exact name. * * [See the documentation about using filters](https://cloud.google.com/kms/docs/sorting-and-filtering) */ filter?: string; } /** * A collection of values returned by getCryptoKeyVersions. */ export interface GetCryptoKeyVersionsResult { readonly cryptoKey: string; readonly filter?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly publicKeys: outputs.kms.GetCryptoKeyVersionsPublicKey[]; /** * A list of all the retrieved crypto key versions from the provided crypto key. This list is influenced by the provided filter argument. */ readonly versions: outputs.kms.GetCryptoKeyVersionsVersion[]; } /** * Provides access to Google Cloud Platform KMS CryptoKeyVersions. 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). * * ## 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 myCryptoKeyVersions = gcp.kms.getCryptoKeyVersions({ * cryptoKey: myKey.id, * }); * ``` */ export declare function getCryptoKeyVersionsOutput(args: GetCryptoKeyVersionsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCryptoKeyVersionsResult>; /** * A collection of arguments for invoking getCryptoKeyVersions. */ export interface GetCryptoKeyVersionsOutputArgs { /** * 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 filter argument is used to add a filter query parameter that limits which versions are retrieved by the data source: ?filter={{filter}}. When no value is provided there is no filtering. * * Example filter values if filtering on name. Note: names take the form projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{cryptoKey}}/cryptoKeyVersions. * * * `"name:my-key-"` will retrieve cryptoKeyVersions that contain "my-key-" anywhere in their name. * * `"name=projects/my-project/locations/global/keyRings/my-key-ring/cryptoKeys/my-key-1/cryptoKeyVersions/my-version-1"` will only retrieve a key with that exact name. * * [See the documentation about using filters](https://cloud.google.com/kms/docs/sorting-and-filtering) */ filter?: pulumi.Input<string>; }