263 lines
6.3 KiB
TypeScript
Generated
263 lines
6.3 KiB
TypeScript
Generated
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
import * as pulumi from "@pulumi/pulumi";
|
|
import * as inputs from "./types/input";
|
|
import * as outputs from "./types/output";
|
|
import * as utilities from "./utilities";
|
|
|
|
/**
|
|
* ## # incus.Instance
|
|
*
|
|
* Provides information about an Incus instance.
|
|
* See Incus instance [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/instance_config/) for more details.
|
|
*
|
|
* ## Example Usage
|
|
*
|
|
* ```typescript
|
|
* import * as pulumi from "@pulumi/pulumi";
|
|
* import * as incus from "@kiterun/incus";
|
|
*
|
|
* const _this = incus.getInstance({
|
|
* name: "default",
|
|
* });
|
|
* export const instanceName = _this.then(_this => _this.name);
|
|
* ```
|
|
*/
|
|
export function getInstance(
|
|
args: GetInstanceArgs,
|
|
opts?: pulumi.InvokeOptions,
|
|
): Promise<GetInstanceResult> {
|
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
return pulumi.runtime.invoke(
|
|
"incus:index/getInstance:getInstance",
|
|
{
|
|
architecture: args.architecture,
|
|
description: args.description,
|
|
devices: args.devices,
|
|
ephemeral: args.ephemeral,
|
|
location: args.location,
|
|
name: args.name,
|
|
profiles: args.profiles,
|
|
project: args.project,
|
|
remote: args.remote,
|
|
stateful: args.stateful,
|
|
status: args.status,
|
|
type: args.type,
|
|
},
|
|
opts,
|
|
);
|
|
}
|
|
|
|
/**
|
|
* A collection of arguments for invoking getInstance.
|
|
*/
|
|
export interface GetInstanceArgs {
|
|
/**
|
|
* Architecture name.
|
|
*/
|
|
architecture?: string;
|
|
/**
|
|
* Description of the instance.
|
|
*/
|
|
description?: string;
|
|
/**
|
|
* Device definitions. See reference below.
|
|
*/
|
|
devices?: inputs.GetInstanceDevice[];
|
|
/**
|
|
* Whether the instance is ephemeral (deleted on shutdown).
|
|
*/
|
|
ephemeral?: boolean;
|
|
/**
|
|
* Location of the instance.
|
|
*/
|
|
location?: string;
|
|
/**
|
|
* **Required** - Name of the instance.
|
|
*/
|
|
name: string;
|
|
/**
|
|
* List of profiles applied to the instance.
|
|
*/
|
|
profiles?: string[];
|
|
/**
|
|
* *Optional* - Name of the project where the instance is be stored.
|
|
*/
|
|
project?: string;
|
|
/**
|
|
* *Optional* - The remote in which the resource was created. If
|
|
* not provided, the provider's default remote will be used.
|
|
*/
|
|
remote?: string;
|
|
/**
|
|
* Whether the instance is stateful.
|
|
*/
|
|
stateful?: boolean;
|
|
/**
|
|
* Status of the instance.
|
|
*/
|
|
status?: string;
|
|
/**
|
|
* Type of the device Must be one of none, disk, nic,
|
|
* unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
|
*/
|
|
type?: string;
|
|
}
|
|
|
|
/**
|
|
* A collection of values returned by getInstance.
|
|
*/
|
|
export interface GetInstanceResult {
|
|
/**
|
|
* Architecture name.
|
|
*/
|
|
readonly architecture: string;
|
|
/**
|
|
* Map of key/value pairs of config settings.
|
|
* [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/)
|
|
*/
|
|
readonly config: { [key: string]: string };
|
|
/**
|
|
* Description of the instance.
|
|
*/
|
|
readonly description: string;
|
|
/**
|
|
* Device definitions. See reference below.
|
|
*/
|
|
readonly devices?: outputs.GetInstanceDevice[];
|
|
/**
|
|
* Whether the instance is ephemeral (deleted on shutdown).
|
|
*/
|
|
readonly ephemeral: boolean;
|
|
/**
|
|
* The provider-assigned unique ID for this managed resource.
|
|
*/
|
|
readonly id: string;
|
|
/**
|
|
* Location of the instance.
|
|
*/
|
|
readonly location: string;
|
|
/**
|
|
* Name of the device.
|
|
*/
|
|
readonly name: string;
|
|
/**
|
|
* List of profiles applied to the instance.
|
|
*/
|
|
readonly profiles: string[];
|
|
readonly project?: string;
|
|
readonly remote?: string;
|
|
/**
|
|
* Whether the instance is stateful.
|
|
*/
|
|
readonly stateful: boolean;
|
|
/**
|
|
* Status of the instance.
|
|
*/
|
|
readonly status: string;
|
|
/**
|
|
* Type of the device Must be one of none, disk, nic,
|
|
* unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
|
*/
|
|
readonly type: string;
|
|
}
|
|
/**
|
|
* ## # incus.Instance
|
|
*
|
|
* Provides information about an Incus instance.
|
|
* See Incus instance [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/instance_config/) for more details.
|
|
*
|
|
* ## Example Usage
|
|
*
|
|
* ```typescript
|
|
* import * as pulumi from "@pulumi/pulumi";
|
|
* import * as incus from "@kiterun/incus";
|
|
*
|
|
* const _this = incus.getInstance({
|
|
* name: "default",
|
|
* });
|
|
* export const instanceName = _this.then(_this => _this.name);
|
|
* ```
|
|
*/
|
|
export function getInstanceOutput(
|
|
args: GetInstanceOutputArgs,
|
|
opts?: pulumi.InvokeOutputOptions,
|
|
): pulumi.Output<GetInstanceResult> {
|
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
return pulumi.runtime.invokeOutput(
|
|
"incus:index/getInstance:getInstance",
|
|
{
|
|
architecture: args.architecture,
|
|
description: args.description,
|
|
devices: args.devices,
|
|
ephemeral: args.ephemeral,
|
|
location: args.location,
|
|
name: args.name,
|
|
profiles: args.profiles,
|
|
project: args.project,
|
|
remote: args.remote,
|
|
stateful: args.stateful,
|
|
status: args.status,
|
|
type: args.type,
|
|
},
|
|
opts,
|
|
);
|
|
}
|
|
|
|
/**
|
|
* A collection of arguments for invoking getInstance.
|
|
*/
|
|
export interface GetInstanceOutputArgs {
|
|
/**
|
|
* Architecture name.
|
|
*/
|
|
architecture?: pulumi.Input<string>;
|
|
/**
|
|
* Description of the instance.
|
|
*/
|
|
description?: pulumi.Input<string>;
|
|
/**
|
|
* Device definitions. See reference below.
|
|
*/
|
|
devices?: pulumi.Input<pulumi.Input<inputs.GetInstanceDeviceArgs>[]>;
|
|
/**
|
|
* Whether the instance is ephemeral (deleted on shutdown).
|
|
*/
|
|
ephemeral?: pulumi.Input<boolean>;
|
|
/**
|
|
* Location of the instance.
|
|
*/
|
|
location?: pulumi.Input<string>;
|
|
/**
|
|
* **Required** - Name of the instance.
|
|
*/
|
|
name: pulumi.Input<string>;
|
|
/**
|
|
* List of profiles applied to the instance.
|
|
*/
|
|
profiles?: pulumi.Input<pulumi.Input<string>[]>;
|
|
/**
|
|
* *Optional* - Name of the project where the instance is be stored.
|
|
*/
|
|
project?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - The remote in which the resource was created. If
|
|
* not provided, the provider's default remote will be used.
|
|
*/
|
|
remote?: pulumi.Input<string>;
|
|
/**
|
|
* Whether the instance is stateful.
|
|
*/
|
|
stateful?: pulumi.Input<boolean>;
|
|
/**
|
|
* Status of the instance.
|
|
*/
|
|
status?: pulumi.Input<string>;
|
|
/**
|
|
* Type of the device Must be one of none, disk, nic,
|
|
* unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
|
*/
|
|
type?: pulumi.Input<string>;
|
|
}
|