Class GetHost
Inheritance
System.Object
GetHost
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public static class GetHost
Methods
View SourceInvokeAsync(GetHostArgs, InvokeOptions)
The vsphere..Host data source can be used to discover the ID of a vSphere
host. This can then be used with resources or data sources that require a host
managed object reference ID.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var datacenter = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
{
Name = "dc1",
}));
var host = datacenter.Apply(datacenter => Output.Create(VSphere.GetHost.InvokeAsync(new VSphere.GetHostArgs
{
DatacenterId = datacenter.Id,
Name = "esxi1",
})));
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetHostResult> InvokeAsync(GetHostArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetHostArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetHostResult> |