Class GetPolicy
Inheritance
System.Object
GetPolicy
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 GetPolicy
Methods
View SourceInvokeAsync(GetPolicyArgs, InvokeOptions)
The vsphere..getPolicy data source can be used to discover the UUID of a
vSphere storage policy. This can then be used with resources or data sources that
require a storage policy.
NOTE: Storage policy support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var policy = Output.Create(VSphere.GetPolicy.InvokeAsync(new VSphere.GetPolicyArgs
{
Name = "policy1",
}));
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetPolicyArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetPolicyResult> |