GetPolicy
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.
Example Usage
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var policy = Output.Create(VSphere.GetPolicy.InvokeAsync(new VSphere.GetPolicyArgs
{
Name = "policy1",
}));
}
}
Coming soon!
import pulumi
import pulumi_vsphere as vsphere
policy = vsphere.get_policy(name="policy1")import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const policy = pulumi.output(vsphere.getPolicy({
name: "policy1",
}, { async: true }));Using GetPolicy
function getPolicy(args: GetPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyResult>function get_policy(name=None, opts=None)func GetPolicy(ctx *Context, args *GetPolicyArgs, opts ...InvokeOption) (*GetPolicyResult, error)public static class GetPolicy {
public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetPolicy Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphereTerraform Provider.