@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
168 lines • 7.57 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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Job = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* Manages a Proxmox VE cluster backup job.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
*
* const dailyBackup = new proxmoxve.backup.Job("daily_backup", {
* resourceId: "daily-backup",
* schedule: "*-*-* 02:00",
* storage: "local",
* all: true,
* mode: "snapshot",
* compress: "zstd",
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import proxmoxve:backup/job:Job daily_backup daily-backup
* ```
*/
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 });
}
/** @internal */
static __pulumiType = 'proxmoxve:backup/job:Job';
/**
* 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["all"] = state?.all;
resourceInputs["bwlimit"] = state?.bwlimit;
resourceInputs["compress"] = state?.compress;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["excludePaths"] = state?.excludePaths;
resourceInputs["fleecing"] = state?.fleecing;
resourceInputs["ionice"] = state?.ionice;
resourceInputs["lockwait"] = state?.lockwait;
resourceInputs["mailnotification"] = state?.mailnotification;
resourceInputs["mailtos"] = state?.mailtos;
resourceInputs["maxfiles"] = state?.maxfiles;
resourceInputs["mode"] = state?.mode;
resourceInputs["node"] = state?.node;
resourceInputs["notesTemplate"] = state?.notesTemplate;
resourceInputs["pbsChangeDetectionMode"] = state?.pbsChangeDetectionMode;
resourceInputs["performance"] = state?.performance;
resourceInputs["pigz"] = state?.pigz;
resourceInputs["pool"] = state?.pool;
resourceInputs["protected"] = state?.protected;
resourceInputs["pruneBackups"] = state?.pruneBackups;
resourceInputs["remove"] = state?.remove;
resourceInputs["repeatMissed"] = state?.repeatMissed;
resourceInputs["resourceId"] = state?.resourceId;
resourceInputs["schedule"] = state?.schedule;
resourceInputs["script"] = state?.script;
resourceInputs["starttime"] = state?.starttime;
resourceInputs["stdexcludes"] = state?.stdexcludes;
resourceInputs["stopwait"] = state?.stopwait;
resourceInputs["storage"] = state?.storage;
resourceInputs["tmpdir"] = state?.tmpdir;
resourceInputs["vmids"] = state?.vmids;
resourceInputs["zstd"] = state?.zstd;
}
else {
const args = argsOrState;
if (args?.resourceId === undefined && !opts.urn) {
throw new Error("Missing required property 'resourceId'");
}
if (args?.schedule === undefined && !opts.urn) {
throw new Error("Missing required property 'schedule'");
}
if (args?.storage === undefined && !opts.urn) {
throw new Error("Missing required property 'storage'");
}
resourceInputs["all"] = args?.all;
resourceInputs["bwlimit"] = args?.bwlimit;
resourceInputs["compress"] = args?.compress;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["excludePaths"] = args?.excludePaths;
resourceInputs["fleecing"] = args?.fleecing;
resourceInputs["ionice"] = args?.ionice;
resourceInputs["lockwait"] = args?.lockwait;
resourceInputs["mailnotification"] = args?.mailnotification;
resourceInputs["mailtos"] = args?.mailtos;
resourceInputs["maxfiles"] = args?.maxfiles;
resourceInputs["mode"] = args?.mode;
resourceInputs["node"] = args?.node;
resourceInputs["notesTemplate"] = args?.notesTemplate;
resourceInputs["pbsChangeDetectionMode"] = args?.pbsChangeDetectionMode;
resourceInputs["performance"] = args?.performance;
resourceInputs["pigz"] = args?.pigz;
resourceInputs["pool"] = args?.pool;
resourceInputs["protected"] = args?.protected;
resourceInputs["pruneBackups"] = args?.pruneBackups;
resourceInputs["remove"] = args?.remove;
resourceInputs["repeatMissed"] = args?.repeatMissed;
resourceInputs["resourceId"] = args?.resourceId;
resourceInputs["schedule"] = args?.schedule;
resourceInputs["script"] = args?.script;
resourceInputs["starttime"] = args?.starttime;
resourceInputs["stdexcludes"] = args?.stdexcludes;
resourceInputs["stopwait"] = args?.stopwait;
resourceInputs["storage"] = args?.storage;
resourceInputs["tmpdir"] = args?.tmpdir;
resourceInputs["vmids"] = args?.vmids;
resourceInputs["zstd"] = args?.zstd;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Job.__pulumiType, name, resourceInputs, opts);
}
}
exports.Job = Job;
//# sourceMappingURL=job.js.map