UNPKG

@ediri/vultr

Version:

A Pulumi package for creating and managing Vultr cloud resources.

101 lines 4.51 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.ObjectStorage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Vultr private object storage resource. This can be used to create, read, update and delete object storage resources on your Vultr account. * * ## Example Usage * * Create a new object storage subscription. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const tf = new vultr.ObjectStorage("tf", { * clusterId: 9, * label: "vultr-object-storage", * tierId: 4, * }); * ``` * * ## Import * * Object Storage can be imported using the object storage `ID`, e.g. * * ```sh * $ pulumi import vultr:index/objectStorage:ObjectStorage my_s3 0e04f918-575e-41cb-86f6-d729b354a5a1 * ``` */ class ObjectStorage extends pulumi.CustomResource { /** * Get an existing ObjectStorage 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 ObjectStorage(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ObjectStorage. 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'] === ObjectStorage.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["s3AccessKey"] = state ? state.s3AccessKey : undefined; resourceInputs["s3Hostname"] = state ? state.s3Hostname : undefined; resourceInputs["s3SecretKey"] = state ? state.s3SecretKey : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tierId"] = state ? state.tierId : undefined; } else { const args = argsOrState; if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } if ((!args || args.tierId === undefined) && !opts.urn) { throw new Error("Missing required property 'tierId'"); } resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["label"] = args ? args.label : undefined; resourceInputs["tierId"] = args ? args.tierId : undefined; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["location"] = undefined /*out*/; resourceInputs["region"] = undefined /*out*/; resourceInputs["s3AccessKey"] = undefined /*out*/; resourceInputs["s3Hostname"] = undefined /*out*/; resourceInputs["s3SecretKey"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["s3AccessKey", "s3SecretKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ObjectStorage.__pulumiType, name, resourceInputs, opts); } } exports.ObjectStorage = ObjectStorage; /** @internal */ ObjectStorage.__pulumiType = 'vultr:index/objectStorage:ObjectStorage'; //# sourceMappingURL=objectStorage.js.map