UNPKG

@pulumi/nomad

Version:

A Pulumi package for creating and managing nomad cloud resources.

112 lines 5.95 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.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, { ...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?.capabilities; resourceInputs["capacity"] = state?.capacity; resourceInputs["capacityMax"] = state?.capacityMax; resourceInputs["capacityMaxBytes"] = state?.capacityMaxBytes; resourceInputs["capacityMin"] = state?.capacityMin; resourceInputs["capacityMinBytes"] = state?.capacityMinBytes; resourceInputs["cloneId"] = state?.cloneId; resourceInputs["context"] = state?.context; resourceInputs["controllerRequired"] = state?.controllerRequired; resourceInputs["controllersExpected"] = state?.controllersExpected; resourceInputs["controllersHealthy"] = state?.controllersHealthy; resourceInputs["externalId"] = state?.externalId; resourceInputs["mountOptions"] = state?.mountOptions; resourceInputs["name"] = state?.name; resourceInputs["namespace"] = state?.namespace; resourceInputs["nodesExpected"] = state?.nodesExpected; resourceInputs["nodesHealthy"] = state?.nodesHealthy; resourceInputs["parameters"] = state?.parameters; resourceInputs["pluginId"] = state?.pluginId; resourceInputs["pluginProvider"] = state?.pluginProvider; resourceInputs["pluginProviderVersion"] = state?.pluginProviderVersion; resourceInputs["schedulable"] = state?.schedulable; resourceInputs["secrets"] = state?.secrets; resourceInputs["snapshotId"] = state?.snapshotId; resourceInputs["topologies"] = state?.topologies; resourceInputs["topologyRequest"] = state?.topologyRequest; resourceInputs["volumeId"] = state?.volumeId; } else { const args = argsOrState; if (args?.capabilities === undefined && !opts.urn) { throw new Error("Missing required property 'capabilities'"); } if (args?.pluginId === undefined && !opts.urn) { throw new Error("Missing required property 'pluginId'"); } if (args?.volumeId === undefined && !opts.urn) { throw new Error("Missing required property 'volumeId'"); } resourceInputs["capabilities"] = args?.capabilities; resourceInputs["capacityMax"] = args?.capacityMax; resourceInputs["capacityMin"] = args?.capacityMin; resourceInputs["cloneId"] = args?.cloneId; resourceInputs["mountOptions"] = args?.mountOptions; resourceInputs["name"] = args?.name; resourceInputs["namespace"] = args?.namespace; resourceInputs["parameters"] = args?.parameters; resourceInputs["pluginId"] = args?.pluginId; resourceInputs["secrets"] = args?.secrets ? pulumi.secret(args.secrets) : undefined; resourceInputs["snapshotId"] = args?.snapshotId; resourceInputs["topologyRequest"] = args?.topologyRequest; resourceInputs["volumeId"] = args?.volumeId; 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