@pulumi/libvirt
Version:
A Pulumi package for creating and managing libvirt cloud resources.
126 lines (125 loc) • 4.57 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a storage pool in libvirt. Currently only directory-based storage pool are supported. For more information on
* storage pools in libvirt, see [the official documentation](https://libvirt.org/formatstorage.html).
*
* **WARNING:** This is experimental API and may change in the future.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as libvirt from "@pulumi/libvirt";
*
* // A pool for all cluster volumes
* const cluster = new libvirt.Pool("cluster", {
* name: "cluster",
* type: "dir",
* target: {
* path: "/home/user/cluster_storage",
* },
* });
* const opensuseLeap = new libvirt.Volume("opensuse_leap", {
* name: "opensuse_leap",
* pool: cluster.name,
* source: "http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2",
* });
* ```
*/
export declare class Pool extends pulumi.CustomResource {
/**
* Get an existing Pool 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: string, id: pulumi.Input<pulumi.ID>, state?: PoolState, opts?: pulumi.CustomResourceOptions): Pool;
/**
* Returns true if the given object is an instance of Pool. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Pool;
readonly allocation: pulumi.Output<number>;
readonly available: pulumi.Output<number>;
readonly capacity: pulumi.Output<number>;
/**
* A unique name for the resource, required by libvirt.
*/
readonly name: pulumi.Output<string>;
/**
* **Deprecated** (Optional) use `path` in the `target` block.
*
* @deprecated use target.path instead
*/
readonly path: pulumi.Output<string | undefined>;
readonly source: pulumi.Output<outputs.PoolSource | undefined>;
readonly target: pulumi.Output<outputs.PoolTarget>;
/**
* The type of the pool. Currently, "dir" and "logical" are supported.
*/
readonly type: pulumi.Output<string>;
readonly xml: pulumi.Output<outputs.PoolXml | undefined>;
/**
* Create a Pool resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: PoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Pool resources.
*/
export interface PoolState {
allocation?: pulumi.Input<number>;
available?: pulumi.Input<number>;
capacity?: pulumi.Input<number>;
/**
* A unique name for the resource, required by libvirt.
*/
name?: pulumi.Input<string>;
/**
* **Deprecated** (Optional) use `path` in the `target` block.
*
* @deprecated use target.path instead
*/
path?: pulumi.Input<string>;
source?: pulumi.Input<inputs.PoolSource>;
target?: pulumi.Input<inputs.PoolTarget>;
/**
* The type of the pool. Currently, "dir" and "logical" are supported.
*/
type?: pulumi.Input<string>;
xml?: pulumi.Input<inputs.PoolXml>;
}
/**
* The set of arguments for constructing a Pool resource.
*/
export interface PoolArgs {
allocation?: pulumi.Input<number>;
available?: pulumi.Input<number>;
capacity?: pulumi.Input<number>;
/**
* A unique name for the resource, required by libvirt.
*/
name?: pulumi.Input<string>;
/**
* **Deprecated** (Optional) use `path` in the `target` block.
*
* @deprecated use target.path instead
*/
path?: pulumi.Input<string>;
source?: pulumi.Input<inputs.PoolSource>;
target?: pulumi.Input<inputs.PoolTarget>;
/**
* The type of the pool. Currently, "dir" and "logical" are supported.
*/
type: pulumi.Input<string>;
xml?: pulumi.Input<inputs.PoolXml>;
}