/
getPolicy.go
41 lines (34 loc) · 1.32 KB
/
getPolicy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// nolint: lll
package vsphere
import (
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// The `.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.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-vsphere/blob/master/website/docs/d/storage_policy.html.markdown.
func GetPolicy(ctx *pulumi.Context, args *GetPolicyArgs, opts ...pulumi.InvokeOption) (*GetPolicyResult, error) {
var rv GetPolicyResult
err := ctx.Invoke("vsphere:index/getPolicy:getPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPolicy.
type GetPolicyArgs struct {
// The name of the storage policy.
Name string `pulumi:"name"`
}
// A collection of values returned by getPolicy.
type GetPolicyResult struct {
// id is the provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
}