UNPKG

@pulumi/libvirt

Version:

A Pulumi package for creating and managing libvirt cloud resources.

120 lines 6.72 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Domain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a VM domain resource within libvirt. For more information see * [the official documentation](https://libvirt.org/formatdomain.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as libvirt from "@pulumi/libvirt"; * * const _default = new libvirt.Domain("default", {name: "test"}); * ``` */ class Domain extends pulumi.CustomResource { /** * Get an existing Domain 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 Domain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Domain. 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'] === Domain.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arch"] = state ? state.arch : undefined; resourceInputs["autostart"] = state ? state.autostart : undefined; resourceInputs["bootDevices"] = state ? state.bootDevices : undefined; resourceInputs["cloudinit"] = state ? state.cloudinit : undefined; resourceInputs["cmdlines"] = state ? state.cmdlines : undefined; resourceInputs["consoles"] = state ? state.consoles : undefined; resourceInputs["coreosIgnition"] = state ? state.coreosIgnition : undefined; resourceInputs["cpu"] = state ? state.cpu : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["disks"] = state ? state.disks : undefined; resourceInputs["emulator"] = state ? state.emulator : undefined; resourceInputs["filesystems"] = state ? state.filesystems : undefined; resourceInputs["firmware"] = state ? state.firmware : undefined; resourceInputs["fwCfgName"] = state ? state.fwCfgName : undefined; resourceInputs["graphics"] = state ? state.graphics : undefined; resourceInputs["initrd"] = state ? state.initrd : undefined; resourceInputs["kernel"] = state ? state.kernel : undefined; resourceInputs["machine"] = state ? state.machine : undefined; resourceInputs["memory"] = state ? state.memory : undefined; resourceInputs["metadata"] = state ? state.metadata : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkInterfaces"] = state ? state.networkInterfaces : undefined; resourceInputs["nvram"] = state ? state.nvram : undefined; resourceInputs["qemuAgent"] = state ? state.qemuAgent : undefined; resourceInputs["running"] = state ? state.running : undefined; resourceInputs["tpm"] = state ? state.tpm : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["vcpu"] = state ? state.vcpu : undefined; resourceInputs["video"] = state ? state.video : undefined; resourceInputs["xml"] = state ? state.xml : undefined; } else { const args = argsOrState; resourceInputs["arch"] = args ? args.arch : undefined; resourceInputs["autostart"] = args ? args.autostart : undefined; resourceInputs["bootDevices"] = args ? args.bootDevices : undefined; resourceInputs["cloudinit"] = args ? args.cloudinit : undefined; resourceInputs["cmdlines"] = args ? args.cmdlines : undefined; resourceInputs["consoles"] = args ? args.consoles : undefined; resourceInputs["coreosIgnition"] = args ? args.coreosIgnition : undefined; resourceInputs["cpu"] = args ? args.cpu : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["disks"] = args ? args.disks : undefined; resourceInputs["emulator"] = args ? args.emulator : undefined; resourceInputs["filesystems"] = args ? args.filesystems : undefined; resourceInputs["firmware"] = args ? args.firmware : undefined; resourceInputs["fwCfgName"] = args ? args.fwCfgName : undefined; resourceInputs["graphics"] = args ? args.graphics : undefined; resourceInputs["initrd"] = args ? args.initrd : undefined; resourceInputs["kernel"] = args ? args.kernel : undefined; resourceInputs["machine"] = args ? args.machine : undefined; resourceInputs["memory"] = args ? args.memory : undefined; resourceInputs["metadata"] = args ? args.metadata : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkInterfaces"] = args ? args.networkInterfaces : undefined; resourceInputs["nvram"] = args ? args.nvram : undefined; resourceInputs["qemuAgent"] = args ? args.qemuAgent : undefined; resourceInputs["running"] = args ? args.running : undefined; resourceInputs["tpm"] = args ? args.tpm : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["vcpu"] = args ? args.vcpu : undefined; resourceInputs["video"] = args ? args.video : undefined; resourceInputs["xml"] = args ? args.xml : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Domain.__pulumiType, name, resourceInputs, opts); } } exports.Domain = Domain; /** @internal */ Domain.__pulumiType = 'libvirt:index/domain:Domain'; //# sourceMappingURL=domain.js.map