UNPKG

@upcloud/pulumi-upcloud

Version:

A Pulumi package for creating and managing UpCloud resources.

93 lines 4.08 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.Storage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages UpCloud [Block Storage](https://upcloud.com/products/block-storage) devices. * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import upcloud:index/storage:Storage example_storage 0128ae5a-91dd-4ebf-bd1e-304c47f2c652 * ``` */ class Storage extends pulumi.CustomResource { /** * Get an existing Storage 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 Storage(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Storage. 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'] === Storage.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["backupRule"] = state?.backupRule; resourceInputs["clone"] = state?.clone; resourceInputs["deleteAutoresizeBackup"] = state?.deleteAutoresizeBackup; resourceInputs["encrypt"] = state?.encrypt; resourceInputs["filesystemAutoresize"] = state?.filesystemAutoresize; resourceInputs["import"] = state?.import; resourceInputs["labels"] = state?.labels; resourceInputs["size"] = state?.size; resourceInputs["systemLabels"] = state?.systemLabels; resourceInputs["tier"] = state?.tier; resourceInputs["title"] = state?.title; resourceInputs["type"] = state?.type; resourceInputs["zone"] = state?.zone; } else { const args = argsOrState; if (args?.size === undefined && !opts.urn) { throw new Error("Missing required property 'size'"); } if (args?.title === undefined && !opts.urn) { throw new Error("Missing required property 'title'"); } if (args?.zone === undefined && !opts.urn) { throw new Error("Missing required property 'zone'"); } resourceInputs["backupRule"] = args?.backupRule; resourceInputs["clone"] = args?.clone; resourceInputs["deleteAutoresizeBackup"] = args?.deleteAutoresizeBackup; resourceInputs["encrypt"] = args?.encrypt; resourceInputs["filesystemAutoresize"] = args?.filesystemAutoresize; resourceInputs["import"] = args?.import; resourceInputs["labels"] = args?.labels; resourceInputs["size"] = args?.size; resourceInputs["tier"] = args?.tier; resourceInputs["title"] = args?.title; resourceInputs["zone"] = args?.zone; resourceInputs["systemLabels"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Storage.__pulumiType, name, resourceInputs, opts); } } exports.Storage = Storage; /** @internal */ Storage.__pulumiType = 'upcloud:index/storage:Storage'; //# sourceMappingURL=storage.js.map