@pulumi/nomad
Version:
A Pulumi package for creating and managing nomad cloud resources.
112 lines • 6.79 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.CsiVolume = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class CsiVolume extends pulumi.CustomResource {
/**
* Get an existing CsiVolume 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 CsiVolume(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CsiVolume. 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'] === CsiVolume.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["capabilities"] = state ? state.capabilities : undefined;
resourceInputs["capacity"] = state ? state.capacity : undefined;
resourceInputs["capacityMax"] = state ? state.capacityMax : undefined;
resourceInputs["capacityMaxBytes"] = state ? state.capacityMaxBytes : undefined;
resourceInputs["capacityMin"] = state ? state.capacityMin : undefined;
resourceInputs["capacityMinBytes"] = state ? state.capacityMinBytes : undefined;
resourceInputs["cloneId"] = state ? state.cloneId : undefined;
resourceInputs["context"] = state ? state.context : undefined;
resourceInputs["controllerRequired"] = state ? state.controllerRequired : undefined;
resourceInputs["controllersExpected"] = state ? state.controllersExpected : undefined;
resourceInputs["controllersHealthy"] = state ? state.controllersHealthy : undefined;
resourceInputs["externalId"] = state ? state.externalId : undefined;
resourceInputs["mountOptions"] = state ? state.mountOptions : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["namespace"] = state ? state.namespace : undefined;
resourceInputs["nodesExpected"] = state ? state.nodesExpected : undefined;
resourceInputs["nodesHealthy"] = state ? state.nodesHealthy : undefined;
resourceInputs["parameters"] = state ? state.parameters : undefined;
resourceInputs["pluginId"] = state ? state.pluginId : undefined;
resourceInputs["pluginProvider"] = state ? state.pluginProvider : undefined;
resourceInputs["pluginProviderVersion"] = state ? state.pluginProviderVersion : undefined;
resourceInputs["schedulable"] = state ? state.schedulable : undefined;
resourceInputs["secrets"] = state ? state.secrets : undefined;
resourceInputs["snapshotId"] = state ? state.snapshotId : undefined;
resourceInputs["topologies"] = state ? state.topologies : undefined;
resourceInputs["topologyRequest"] = state ? state.topologyRequest : undefined;
resourceInputs["volumeId"] = state ? state.volumeId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.capabilities === undefined) && !opts.urn) {
throw new Error("Missing required property 'capabilities'");
}
if ((!args || args.pluginId === undefined) && !opts.urn) {
throw new Error("Missing required property 'pluginId'");
}
if ((!args || args.volumeId === undefined) && !opts.urn) {
throw new Error("Missing required property 'volumeId'");
}
resourceInputs["capabilities"] = args ? args.capabilities : undefined;
resourceInputs["capacityMax"] = args ? args.capacityMax : undefined;
resourceInputs["capacityMin"] = args ? args.capacityMin : undefined;
resourceInputs["cloneId"] = args ? args.cloneId : undefined;
resourceInputs["mountOptions"] = args ? args.mountOptions : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["namespace"] = args ? args.namespace : undefined;
resourceInputs["parameters"] = args ? args.parameters : undefined;
resourceInputs["pluginId"] = args ? args.pluginId : undefined;
resourceInputs["secrets"] = (args === null || args === void 0 ? void 0 : args.secrets) ? pulumi.secret(args.secrets) : undefined;
resourceInputs["snapshotId"] = args ? args.snapshotId : undefined;
resourceInputs["topologyRequest"] = args ? args.topologyRequest : undefined;
resourceInputs["volumeId"] = args ? args.volumeId : undefined;
resourceInputs["capacity"] = undefined /*out*/;
resourceInputs["capacityMaxBytes"] = undefined /*out*/;
resourceInputs["capacityMinBytes"] = undefined /*out*/;
resourceInputs["context"] = undefined /*out*/;
resourceInputs["controllerRequired"] = undefined /*out*/;
resourceInputs["controllersExpected"] = undefined /*out*/;
resourceInputs["controllersHealthy"] = undefined /*out*/;
resourceInputs["externalId"] = undefined /*out*/;
resourceInputs["nodesExpected"] = undefined /*out*/;
resourceInputs["nodesHealthy"] = undefined /*out*/;
resourceInputs["pluginProvider"] = undefined /*out*/;
resourceInputs["pluginProviderVersion"] = undefined /*out*/;
resourceInputs["schedulable"] = undefined /*out*/;
resourceInputs["topologies"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["secrets"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(CsiVolume.__pulumiType, name, resourceInputs, opts);
}
}
exports.CsiVolume = CsiVolume;
/** @internal */
CsiVolume.__pulumiType = 'nomad:index/csiVolume:CsiVolume';
//# sourceMappingURL=csiVolume.js.map