@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
82 lines (81 loc) • 2.85 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `vsphere.Datacenter` data source can be used to discover the ID of a
* vSphere datacenter object. This can then be used with resources or data sources
* that require a datacenter, such as the `vsphere.Host`
* data source.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* ```
*/
export declare function getDatacenter(args?: GetDatacenterArgs, opts?: pulumi.InvokeOptions): Promise<GetDatacenterResult>;
/**
* A collection of arguments for invoking getDatacenter.
*/
export interface GetDatacenterArgs {
/**
* The name of the datacenter. This can be a name or path.
* Can be omitted if there is only one datacenter in the inventory.
*
* > **NOTE:** When used with an ESXi host, this data source _always_ returns the
* host's "default" datacenter, which is a special datacenter name unrelated to the
* datacenters that exist in the vSphere inventory when managed by a vCenter Server
* instance. Hence, the `name` attribute is completely ignored.
*/
name?: string;
}
/**
* A collection of values returned by getDatacenter.
*/
export interface GetDatacenterResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name?: string;
/**
* List of all virtual machines included in the vSphere datacenter object.
*/
readonly virtualMachines: string[];
}
/**
* The `vsphere.Datacenter` data source can be used to discover the ID of a
* vSphere datacenter object. This can then be used with resources or data sources
* that require a datacenter, such as the `vsphere.Host`
* data source.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* ```
*/
export declare function getDatacenterOutput(args?: GetDatacenterOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDatacenterResult>;
/**
* A collection of arguments for invoking getDatacenter.
*/
export interface GetDatacenterOutputArgs {
/**
* The name of the datacenter. This can be a name or path.
* Can be omitted if there is only one datacenter in the inventory.
*
* > **NOTE:** When used with an ESXi host, this data source _always_ returns the
* host's "default" datacenter, which is a special datacenter name unrelated to the
* datacenters that exist in the vSphere inventory when managed by a vCenter Server
* instance. Hence, the `name` attribute is completely ignored.
*/
name?: pulumi.Input<string>;
}