UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

96 lines (95 loc) 2.94 kB
import * as pulumi from "@pulumi/pulumi"; /** * The `vsphere.Host` data source can be used to discover the ID of an ESXi host. * This can then be used with resources or data sources that require an ESX * host's managed object reference ID. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * ``` */ export declare function getHost(args: GetHostArgs, opts?: pulumi.InvokeOptions): Promise<GetHostResult>; /** * A collection of arguments for invoking getHost. */ export interface GetHostArgs { /** * The managed object reference ID * of a vSphere datacenter object. */ datacenterId: string; /** * The name of the ESXI host. This can be a name or path. * Can be omitted if there is only one host in your inventory. * * > **NOTE:** When used against an ESXi host directly, this data source _always_ * returns the ESXi host's object ID, regardless of what is entered into `name`. */ name?: string; } /** * A collection of values returned by getHost. */ export interface GetHostResult { readonly datacenterId: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly name?: string; /** * The managed object ID of the ESXi * host's root resource pool. */ readonly resourcePoolId: string; } /** * The `vsphere.Host` data source can be used to discover the ID of an ESXi host. * This can then be used with resources or data sources that require an ESX * host's managed object reference ID. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * ``` */ export declare function getHostOutput(args: GetHostOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetHostResult>; /** * A collection of arguments for invoking getHost. */ export interface GetHostOutputArgs { /** * The managed object reference ID * of a vSphere datacenter object. */ datacenterId: pulumi.Input<string>; /** * The name of the ESXI host. This can be a name or path. * Can be omitted if there is only one host in your inventory. * * > **NOTE:** When used against an ESXi host directly, this data source _always_ * returns the ESXi host's object ID, regardless of what is entered into `name`. */ name?: pulumi.Input<string>; }