UNPKG

@pulumi/gcp

Version:

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

74 lines 2.79 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getCryptoKeyVersionsOutput = exports.getCryptoKeyVersions = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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, * }); * ``` */ function getCryptoKeyVersions(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:kms/getCryptoKeyVersions:getCryptoKeyVersions", { "cryptoKey": args.cryptoKey, "filter": args.filter, }, opts); } exports.getCryptoKeyVersions = getCryptoKeyVersions; /** * 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, * }); * ``` */ function getCryptoKeyVersionsOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:kms/getCryptoKeyVersions:getCryptoKeyVersions", { "cryptoKey": args.cryptoKey, "filter": args.filter, }, opts); } exports.getCryptoKeyVersionsOutput = getCryptoKeyVersionsOutput; //# sourceMappingURL=getCryptoKeyVersions.js.map