UNPKG

@ediri/vultr

Version:

A Pulumi package for creating and managing Vultr cloud resources.

82 lines 3.41 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.StartupScript = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Vultr Startup Script resource. This can be used to create, read, modify, and delete Startup Scripts. * * ## Example Usage * * Create a new Startup Script * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myScript = new vultr.StartupScript("myScript", {script: "ZWNobyAkUEFUSAo="}); * ``` * * ## Import * * Startup Scripts can be imported using the Startup Scripts `ID`, e.g. * * ```sh * $ pulumi import vultr:index/startupScript:StartupScript my_script ff8f36a8-eb86-4b8d-8667-b9d5459b6390 * ``` */ class StartupScript extends pulumi.CustomResource { /** * Get an existing StartupScript 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 StartupScript(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of StartupScript. 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'] === StartupScript.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["dateModified"] = state ? state.dateModified : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["script"] = state ? state.script : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.script === undefined) && !opts.urn) { throw new Error("Missing required property 'script'"); } resourceInputs["name"] = args ? args.name : undefined; resourceInputs["script"] = args ? args.script : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["dateModified"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(StartupScript.__pulumiType, name, resourceInputs, opts); } } exports.StartupScript = StartupScript; /** @internal */ StartupScript.__pulumiType = 'vultr:index/startupScript:StartupScript'; //# sourceMappingURL=startupScript.js.map