UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

92 lines 4.05 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.InstanceConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * Creating a simple bootable Linode Instance Configuration Profile: * * ## Import * * Instance Configs can be imported using the `linode_id` followed by the Instance Config `id` separated by a comma, e.g. * * ```sh * $ pulumi import linode:index/instanceConfig:InstanceConfig my-config 1234567,7654321 * ``` */ class InstanceConfig extends pulumi.CustomResource { /** * Get an existing InstanceConfig 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 InstanceConfig(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of InstanceConfig. 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'] === InstanceConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["booted"] = state?.booted; resourceInputs["comments"] = state?.comments; resourceInputs["device"] = state?.device; resourceInputs["devices"] = state?.devices; resourceInputs["helpers"] = state?.helpers; resourceInputs["interfaces"] = state?.interfaces; resourceInputs["kernel"] = state?.kernel; resourceInputs["label"] = state?.label; resourceInputs["linodeId"] = state?.linodeId; resourceInputs["memoryLimit"] = state?.memoryLimit; resourceInputs["rootDevice"] = state?.rootDevice; resourceInputs["runLevel"] = state?.runLevel; resourceInputs["virtMode"] = state?.virtMode; } else { const args = argsOrState; if (args?.label === undefined && !opts.urn) { throw new Error("Missing required property 'label'"); } if (args?.linodeId === undefined && !opts.urn) { throw new Error("Missing required property 'linodeId'"); } resourceInputs["booted"] = args?.booted; resourceInputs["comments"] = args?.comments; resourceInputs["device"] = args?.device; resourceInputs["devices"] = args?.devices; resourceInputs["helpers"] = args?.helpers; resourceInputs["interfaces"] = args?.interfaces; resourceInputs["kernel"] = args?.kernel; resourceInputs["label"] = args?.label; resourceInputs["linodeId"] = args?.linodeId; resourceInputs["memoryLimit"] = args?.memoryLimit; resourceInputs["rootDevice"] = args?.rootDevice; resourceInputs["runLevel"] = args?.runLevel; resourceInputs["virtMode"] = args?.virtMode; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(InstanceConfig.__pulumiType, name, resourceInputs, opts); } } exports.InstanceConfig = InstanceConfig; /** @internal */ InstanceConfig.__pulumiType = 'linode:index/instanceConfig:InstanceConfig'; //# sourceMappingURL=instanceConfig.js.map