UNPKG

@upcloud/pulumi-upcloud

Version:

A Pulumi package for creating and managing UpCloud resources.

91 lines 4.54 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.Storage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages UpCloud [Block Storage](https://upcloud.com/products/block-storage) devices. * * ## Import * * ```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, Object.assign(Object.assign({}, 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 ? state.backupRule : undefined; resourceInputs["clone"] = state ? state.clone : undefined; resourceInputs["deleteAutoresizeBackup"] = state ? state.deleteAutoresizeBackup : undefined; resourceInputs["encrypt"] = state ? state.encrypt : undefined; resourceInputs["filesystemAutoresize"] = state ? state.filesystemAutoresize : undefined; resourceInputs["import"] = state ? state.import : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["size"] = state ? state.size : undefined; resourceInputs["systemLabels"] = state ? state.systemLabels : undefined; resourceInputs["tier"] = state ? state.tier : undefined; resourceInputs["title"] = state ? state.title : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["zone"] = state ? state.zone : undefined; } else { const args = argsOrState; if ((!args || args.size === undefined) && !opts.urn) { throw new Error("Missing required property 'size'"); } if ((!args || args.title === undefined) && !opts.urn) { throw new Error("Missing required property 'title'"); } if ((!args || args.zone === undefined) && !opts.urn) { throw new Error("Missing required property 'zone'"); } resourceInputs["backupRule"] = args ? args.backupRule : undefined; resourceInputs["clone"] = args ? args.clone : undefined; resourceInputs["deleteAutoresizeBackup"] = args ? args.deleteAutoresizeBackup : undefined; resourceInputs["encrypt"] = args ? args.encrypt : undefined; resourceInputs["filesystemAutoresize"] = args ? args.filesystemAutoresize : undefined; resourceInputs["import"] = args ? args.import : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["size"] = args ? args.size : undefined; resourceInputs["tier"] = args ? args.tier : undefined; resourceInputs["title"] = args ? args.title : undefined; resourceInputs["zone"] = args ? args.zone : undefined; 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