@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
100 lines • 4.16 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.Repository = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../../utilities");
/**
* Manages an APT standard repository of a Proxmox VE node.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
*
* const exampleRepository = new proxmoxve.apt.standard.Repository("exampleRepository", {
* handle: "no-subscription",
* node: "pve",
* });
* const exampleApt_repositoryRepository = new proxmoxve.apt.Repository("exampleApt/repositoryRepository", {
* enabled: true,
* filePath: exampleRepository.filePath,
* index: exampleRepository.index,
* node: exampleRepository.node,
* });
* ```
*
* ## Import
*
* #!/usr/bin/env sh
*
* An APT standard repository can be imported using a comma-separated list consisting of the name of the Proxmox VE node,
*
* and the standard repository handle in the exact same order, e.g.:
*
* ```sh
* $ pulumi import proxmoxve:Apt/standard/repository:Repository example pve,no-subscription
* ```
*/
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["description"] = state ? state.description : undefined;
resourceInputs["filePath"] = state ? state.filePath : undefined;
resourceInputs["handle"] = state ? state.handle : undefined;
resourceInputs["index"] = state ? state.index : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["node"] = state ? state.node : undefined;
resourceInputs["status"] = state ? state.status : undefined;
}
else {
const args = argsOrState;
if ((!args || args.handle === undefined) && !opts.urn) {
throw new Error("Missing required property 'handle'");
}
if ((!args || args.node === undefined) && !opts.urn) {
throw new Error("Missing required property 'node'");
}
resourceInputs["handle"] = args ? args.handle : undefined;
resourceInputs["node"] = args ? args.node : undefined;
resourceInputs["description"] = undefined /*out*/;
resourceInputs["filePath"] = undefined /*out*/;
resourceInputs["index"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Repository.__pulumiType, name, resourceInputs, opts);
}
}
exports.Repository = Repository;
/** @internal */
Repository.__pulumiType = 'proxmoxve:Apt/standard/repository:Repository';
//# sourceMappingURL=repository.js.map