UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

80 lines 3.96 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.SecretVersion = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Import * * The Secret Version can be imported using the `{region}/{id}/{revision}`, e.g. ~> **Important:** Be aware if you import with revision `latest` you will overwrite the version you used before. bash * * ```sh * $ pulumi import scaleway:index/secretVersion:SecretVersion main fr-par/11111111-1111-1111-1111-111111111111/2 * ``` */ class SecretVersion extends pulumi.CustomResource { /** * Get an existing SecretVersion 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 SecretVersion(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SecretVersion. 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'] === SecretVersion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["revision"] = state ? state.revision : undefined; resourceInputs["secretId"] = state ? state.secretId : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; } else { const args = argsOrState; if ((!args || args.data === undefined) && !opts.urn) { throw new Error("Missing required property 'data'"); } if ((!args || args.secretId === undefined) && !opts.urn) { throw new Error("Missing required property 'secretId'"); } resourceInputs["data"] = (args === null || args === void 0 ? void 0 : args.data) ? pulumi.secret(args.data) : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["secretId"] = args ? args.secretId : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["revision"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["data"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SecretVersion.__pulumiType, name, resourceInputs, opts); } } exports.SecretVersion = SecretVersion; /** @internal */ SecretVersion.__pulumiType = 'scaleway:index/secretVersion:SecretVersion'; //# sourceMappingURL=secretVersion.js.map