UNPKG

@pulumi/nomad

Version:

A Pulumi package for creating and managing nomad cloud resources.

92 lines 4.57 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.Job = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); class Job extends pulumi.CustomResource { /** * Get an existing Job 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 Job(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Job. 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'] === Job.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allocationIds"] = state?.allocationIds; resourceInputs["datacenters"] = state?.datacenters; resourceInputs["deploymentId"] = state?.deploymentId; resourceInputs["deploymentStatus"] = state?.deploymentStatus; resourceInputs["deregisterOnDestroy"] = state?.deregisterOnDestroy; resourceInputs["deregisterOnIdChange"] = state?.deregisterOnIdChange; resourceInputs["detach"] = state?.detach; resourceInputs["hcl2"] = state?.hcl2; resourceInputs["jobspec"] = state?.jobspec; resourceInputs["json"] = state?.json; resourceInputs["modifyIndex"] = state?.modifyIndex; resourceInputs["name"] = state?.name; resourceInputs["namespace"] = state?.namespace; resourceInputs["policyOverride"] = state?.policyOverride; resourceInputs["purgeOnDestroy"] = state?.purgeOnDestroy; resourceInputs["readAllocationIds"] = state?.readAllocationIds; resourceInputs["region"] = state?.region; resourceInputs["rerunIfDead"] = state?.rerunIfDead; resourceInputs["status"] = state?.status; resourceInputs["taskGroups"] = state?.taskGroups; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.jobspec === undefined && !opts.urn) { throw new Error("Missing required property 'jobspec'"); } resourceInputs["deregisterOnDestroy"] = args?.deregisterOnDestroy; resourceInputs["deregisterOnIdChange"] = args?.deregisterOnIdChange; resourceInputs["detach"] = args?.detach; resourceInputs["hcl2"] = args?.hcl2; resourceInputs["jobspec"] = args?.jobspec; resourceInputs["json"] = args?.json; resourceInputs["policyOverride"] = args?.policyOverride; resourceInputs["purgeOnDestroy"] = args?.purgeOnDestroy; resourceInputs["readAllocationIds"] = args?.readAllocationIds; resourceInputs["rerunIfDead"] = args?.rerunIfDead; resourceInputs["allocationIds"] = undefined /*out*/; resourceInputs["datacenters"] = undefined /*out*/; resourceInputs["deploymentId"] = undefined /*out*/; resourceInputs["deploymentStatus"] = undefined /*out*/; resourceInputs["modifyIndex"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["namespace"] = undefined /*out*/; resourceInputs["region"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["taskGroups"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Job.__pulumiType, name, resourceInputs, opts); } } exports.Job = Job; /** @internal */ Job.__pulumiType = 'nomad:index/job:Job'; //# sourceMappingURL=job.js.map