UNPKG

@pulumi/gcp

Version:

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

107 lines 4.88 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.KeyRingImportJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A `KeyRingImportJob` can be used to create `CryptoKeys` and `CryptoKeyVersions` using pre-existing * key material, generated outside of Cloud KMS. A `KeyRingImportJob` expires 3 days after it is created. * Once expired, Cloud KMS will no longer be able to import or unwrap any key material that * was wrapped with the `KeyRingImportJob`'s public key. * * > **Note:** KeyRingImportJobs cannot be deleted from Google Cloud Platform. * Destroying a provider-managed KeyRingImportJob will remove it from state but * *will not delete the resource from the project.* * * To get more information about KeyRingImportJob, see: * * * [API documentation](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.importJobs) * * How-to Guides * * [Importing a key](https://cloud.google.com/kms/docs/importing-a-key) * * ## Example Usage * * ## Import * * KeyRingImportJob can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, KeyRingImportJob can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:kms/keyRingImportJob:KeyRingImportJob default {{name}} * ``` */ class KeyRingImportJob extends pulumi.CustomResource { /** * Get an existing KeyRingImportJob resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new KeyRingImportJob(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of KeyRingImportJob. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === KeyRingImportJob.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["attestations"] = state?.attestations; resourceInputs["expireTime"] = state?.expireTime; resourceInputs["importJobId"] = state?.importJobId; resourceInputs["importMethod"] = state?.importMethod; resourceInputs["keyRing"] = state?.keyRing; resourceInputs["name"] = state?.name; resourceInputs["protectionLevel"] = state?.protectionLevel; resourceInputs["publicKeys"] = state?.publicKeys; resourceInputs["state"] = state?.state; } else { const args = argsOrState; if (args?.importJobId === undefined && !opts.urn) { throw new Error("Missing required property 'importJobId'"); } if (args?.importMethod === undefined && !opts.urn) { throw new Error("Missing required property 'importMethod'"); } if (args?.keyRing === undefined && !opts.urn) { throw new Error("Missing required property 'keyRing'"); } if (args?.protectionLevel === undefined && !opts.urn) { throw new Error("Missing required property 'protectionLevel'"); } resourceInputs["importJobId"] = args?.importJobId; resourceInputs["importMethod"] = args?.importMethod; resourceInputs["keyRing"] = args?.keyRing; resourceInputs["protectionLevel"] = args?.protectionLevel; resourceInputs["attestations"] = undefined /*out*/; resourceInputs["expireTime"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["publicKeys"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(KeyRingImportJob.__pulumiType, name, resourceInputs, opts); } } exports.KeyRingImportJob = KeyRingImportJob; /** @internal */ KeyRingImportJob.__pulumiType = 'gcp:kms/keyRingImportJob:KeyRingImportJob'; //# sourceMappingURL=keyRingImportJob.js.map