@ediri/vultr
Version:
A Pulumi package for creating and managing Vultr cloud resources.
108 lines • 4.95 kB
JavaScript
;
// *** 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.VirtualFileSystemStorage = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a Vultr virtual file system storage resource. This can be used to create, read, modify and delete a virtual file system storage.
*
* ## Example Usage
*
* Define a virtual file system storage resource:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vultr from "@ediri/vultr";
*
* const myVfsStorage = new vultr.VirtualFileSystemStorage("myVfsStorage", {
* label: "vultr-vfs-storage",
* region: "ewr",
* sizeGb: 10,
* tags: [
* "terraform",
* "important",
* ],
* });
* ```
*
* ## Import
*
* Virtual file system storage can be imported using the `ID`, e.g.
*
* ```sh
* $ pulumi import vultr:index/virtualFileSystemStorage:VirtualFileSystemStorage my_vfs_storage 79210a84-bc58-494f-8dd1-953685654f7f
* ```
*/
class VirtualFileSystemStorage extends pulumi.CustomResource {
/**
* Get an existing VirtualFileSystemStorage 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 VirtualFileSystemStorage(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of VirtualFileSystemStorage. 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'] === VirtualFileSystemStorage.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["attachedInstances"] = state ? state.attachedInstances : undefined;
resourceInputs["attachments"] = state ? state.attachments : undefined;
resourceInputs["charges"] = state ? state.charges : undefined;
resourceInputs["cost"] = state ? state.cost : undefined;
resourceInputs["dateCreated"] = state ? state.dateCreated : undefined;
resourceInputs["diskType"] = state ? state.diskType : undefined;
resourceInputs["label"] = state ? state.label : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["sizeGb"] = state ? state.sizeGb : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
}
else {
const args = argsOrState;
if ((!args || args.label === undefined) && !opts.urn) {
throw new Error("Missing required property 'label'");
}
if ((!args || args.region === undefined) && !opts.urn) {
throw new Error("Missing required property 'region'");
}
if ((!args || args.sizeGb === undefined) && !opts.urn) {
throw new Error("Missing required property 'sizeGb'");
}
resourceInputs["attachedInstances"] = args ? args.attachedInstances : undefined;
resourceInputs["diskType"] = args ? args.diskType : undefined;
resourceInputs["label"] = args ? args.label : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["sizeGb"] = args ? args.sizeGb : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["attachments"] = undefined /*out*/;
resourceInputs["charges"] = undefined /*out*/;
resourceInputs["cost"] = undefined /*out*/;
resourceInputs["dateCreated"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VirtualFileSystemStorage.__pulumiType, name, resourceInputs, opts);
}
}
exports.VirtualFileSystemStorage = VirtualFileSystemStorage;
/** @internal */
VirtualFileSystemStorage.__pulumiType = 'vultr:index/virtualFileSystemStorage:VirtualFileSystemStorage';
//# sourceMappingURL=virtualFileSystemStorage.js.map