@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
92 lines • 4.6 kB
JavaScript
// *** 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.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, Object.assign(Object.assign({}, 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 ? state.booted : undefined;
resourceInputs["comments"] = state ? state.comments : undefined;
resourceInputs["device"] = state ? state.device : undefined;
resourceInputs["devices"] = state ? state.devices : undefined;
resourceInputs["helpers"] = state ? state.helpers : undefined;
resourceInputs["interfaces"] = state ? state.interfaces : undefined;
resourceInputs["kernel"] = state ? state.kernel : undefined;
resourceInputs["label"] = state ? state.label : undefined;
resourceInputs["linodeId"] = state ? state.linodeId : undefined;
resourceInputs["memoryLimit"] = state ? state.memoryLimit : undefined;
resourceInputs["rootDevice"] = state ? state.rootDevice : undefined;
resourceInputs["runLevel"] = state ? state.runLevel : undefined;
resourceInputs["virtMode"] = state ? state.virtMode : undefined;
}
else {
const args = argsOrState;
if ((!args || args.label === undefined) && !opts.urn) {
throw new Error("Missing required property 'label'");
}
if ((!args || args.linodeId === undefined) && !opts.urn) {
throw new Error("Missing required property 'linodeId'");
}
resourceInputs["booted"] = args ? args.booted : undefined;
resourceInputs["comments"] = args ? args.comments : undefined;
resourceInputs["device"] = args ? args.device : undefined;
resourceInputs["devices"] = args ? args.devices : undefined;
resourceInputs["helpers"] = args ? args.helpers : undefined;
resourceInputs["interfaces"] = args ? args.interfaces : undefined;
resourceInputs["kernel"] = args ? args.kernel : undefined;
resourceInputs["label"] = args ? args.label : undefined;
resourceInputs["linodeId"] = args ? args.linodeId : undefined;
resourceInputs["memoryLimit"] = args ? args.memoryLimit : undefined;
resourceInputs["rootDevice"] = args ? args.rootDevice : undefined;
resourceInputs["runLevel"] = args ? args.runLevel : undefined;
resourceInputs["virtMode"] = args ? args.virtMode : undefined;
}
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
;