UNPKG

@muhlba91/pulumi-proxmoxve

Version:

A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.

105 lines 4.5 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.Repository = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an APT repository of a Proxmox VE node. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * * const example = new proxmoxve.apt.Repository("example", { * enabled: true, * filePath: "/etc/apt/sources.list", * index: 0, * node: "pve", * }); * ``` * * ## Import * * #!/usr/bin/env sh * * An APT repository can be imported using a comma-separated list consisting of the name of the Proxmox VE node, * * the absolute source list file path, and the index in the exact same order, e.g.: * * ```sh * $ pulumi import proxmoxve:Apt/repository:Repository example pve,/etc/apt/sources.list,0 * ``` */ class Repository extends pulumi.CustomResource { /** * Get an existing Repository 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 Repository(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Repository. 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'] === Repository.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["comment"] = state ? state.comment : undefined; resourceInputs["components"] = state ? state.components : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["filePath"] = state ? state.filePath : undefined; resourceInputs["fileType"] = state ? state.fileType : undefined; resourceInputs["index"] = state ? state.index : undefined; resourceInputs["node"] = state ? state.node : undefined; resourceInputs["packageTypes"] = state ? state.packageTypes : undefined; resourceInputs["suites"] = state ? state.suites : undefined; resourceInputs["uris"] = state ? state.uris : undefined; } else { const args = argsOrState; if ((!args || args.filePath === undefined) && !opts.urn) { throw new Error("Missing required property 'filePath'"); } if ((!args || args.index === undefined) && !opts.urn) { throw new Error("Missing required property 'index'"); } if ((!args || args.node === undefined) && !opts.urn) { throw new Error("Missing required property 'node'"); } resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["filePath"] = args ? args.filePath : undefined; resourceInputs["index"] = args ? args.index : undefined; resourceInputs["node"] = args ? args.node : undefined; resourceInputs["comment"] = undefined /*out*/; resourceInputs["components"] = undefined /*out*/; resourceInputs["fileType"] = undefined /*out*/; resourceInputs["packageTypes"] = undefined /*out*/; resourceInputs["suites"] = undefined /*out*/; resourceInputs["uris"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Repository.__pulumiType, name, resourceInputs, opts); } } exports.Repository = Repository; /** @internal */ Repository.__pulumiType = 'proxmoxve:Apt/repository:Repository'; //# sourceMappingURL=repository.js.map