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:

Name string

The name of the storage policy.

Name string

The name of the storage policy.

name string

The name of the storage policy.

name str

The name of the storage policy.

GetPolicy Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Id string

The provider-assigned unique ID for this managed resource.

Name string
id string

The provider-assigned unique ID for this managed resource.

name string
id str

The provider-assigned unique ID for this managed resource.

name str

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.