vcd.getVmVgpuPolicy
Explore with Pulumi AI
Experimental in provider 3.11.
Provides a data source to read vGPU policies in VMware Cloud Director.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const tf_policy_name = vcd.getVmVgpuPolicy({
name: "my-rule",
});
export const policyId = tf_policy_name.then(tf_policy_name => tf_policy_name.id);
import pulumi
import pulumi_vcd as vcd
tf_policy_name = vcd.get_vm_vgpu_policy(name="my-rule")
pulumi.export("policyId", tf_policy_name.id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tf_policy_name, err := vcd.LookupVmVgpuPolicy(ctx, &vcd.LookupVmVgpuPolicyArgs{
Name: "my-rule",
}, nil)
if err != nil {
return err
}
ctx.Export("policyId", tf_policy_name.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var tf_policy_name = Vcd.GetVmVgpuPolicy.Invoke(new()
{
Name = "my-rule",
});
return new Dictionary<string, object?>
{
["policyId"] = tf_policy_name.Apply(tf_policy_name => tf_policy_name.Apply(getVmVgpuPolicyResult => getVmVgpuPolicyResult.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetVmVgpuPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var tf-policy-name = VcdFunctions.getVmVgpuPolicy(GetVmVgpuPolicyArgs.builder()
.name("my-rule")
.build());
ctx.export("policyId", tf_policy_name.id());
}
}
variables:
tf-policy-name:
fn::invoke:
function: vcd:getVmVgpuPolicy
arguments:
name: my-rule
outputs:
policyId: ${["tf-policy-name"].id}
Using getVmVgpuPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVmVgpuPolicy(args: GetVmVgpuPolicyArgs, opts?: InvokeOptions): Promise<GetVmVgpuPolicyResult>
function getVmVgpuPolicyOutput(args: GetVmVgpuPolicyOutputArgs, opts?: InvokeOptions): Output<GetVmVgpuPolicyResult>
def get_vm_vgpu_policy(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVmVgpuPolicyResult
def get_vm_vgpu_policy_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVmVgpuPolicyResult]
func LookupVmVgpuPolicy(ctx *Context, args *LookupVmVgpuPolicyArgs, opts ...InvokeOption) (*LookupVmVgpuPolicyResult, error)
func LookupVmVgpuPolicyOutput(ctx *Context, args *LookupVmVgpuPolicyOutputArgs, opts ...InvokeOption) LookupVmVgpuPolicyResultOutput
> Note: This function is named LookupVmVgpuPolicy
in the Go SDK.
public static class GetVmVgpuPolicy
{
public static Task<GetVmVgpuPolicyResult> InvokeAsync(GetVmVgpuPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetVmVgpuPolicyResult> Invoke(GetVmVgpuPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVmVgpuPolicyResult> getVmVgpuPolicy(GetVmVgpuPolicyArgs args, InvokeOptions options)
public static Output<GetVmVgpuPolicyResult> getVmVgpuPolicy(GetVmVgpuPolicyArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getVmVgpuPolicy:getVmVgpuPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
The name of the VM vGPU policy.
All arguments defined in
vcd.VmVgpuPolicy
are supported.- Id string
- Name string
The name of the VM vGPU policy.
All arguments defined in
vcd.VmVgpuPolicy
are supported.- Id string
- name String
The name of the VM vGPU policy.
All arguments defined in
vcd.VmVgpuPolicy
are supported.- id String
- name string
The name of the VM vGPU policy.
All arguments defined in
vcd.VmVgpuPolicy
are supported.- id string
- name str
The name of the VM vGPU policy.
All arguments defined in
vcd.VmVgpuPolicy
are supported.- id str
- name String
The name of the VM vGPU policy.
All arguments defined in
vcd.VmVgpuPolicy
are supported.- id String
getVmVgpuPolicy Result
The following output properties are available:
Supporting Types
GetVmVgpuPolicyCpus
- Cores
Per stringSocket - Count string
- Limit
In stringMhz - Reservation
Guarantee string - string
- Speed
In stringMhz
- Cores
Per stringSocket - Count string
- Limit
In stringMhz - Reservation
Guarantee string - string
- Speed
In stringMhz
- cores
Per StringSocket - count String
- limit
In StringMhz - reservation
Guarantee String - String
- speed
In StringMhz
- cores
Per stringSocket - count string
- limit
In stringMhz - reservation
Guarantee string - string
- speed
In stringMhz
- cores_
per_ strsocket - count str
- limit_
in_ strmhz - reservation_
guarantee str - str
- speed_
in_ strmhz
- cores
Per StringSocket - count String
- limit
In StringMhz - reservation
Guarantee String - String
- speed
In StringMhz
GetVmVgpuPolicyMemory
- Limit
In stringMb - Reservation
Guarantee string - string
- Size
In stringMb
- Limit
In stringMb - Reservation
Guarantee string - string
- Size
In stringMb
- limit
In StringMb - reservation
Guarantee String - String
- size
In StringMb
- limit
In stringMb - reservation
Guarantee string - string
- size
In stringMb
- limit_
in_ strmb - reservation_
guarantee str - str
- size_
in_ strmb
- limit
In StringMb - reservation
Guarantee String - String
- size
In StringMb
GetVmVgpuPolicyProviderVdcScope
- Cluster
Names List<string> - Provider
Vdc stringId - Vm
Group stringId
- Cluster
Names []string - Provider
Vdc stringId - Vm
Group stringId
- cluster
Names List<String> - provider
Vdc StringId - vm
Group StringId
- cluster
Names string[] - provider
Vdc stringId - vm
Group stringId
- cluster_
names Sequence[str] - provider_
vdc_ strid - vm_
group_ strid
- cluster
Names List<String> - provider
Vdc StringId - vm
Group StringId
GetVmVgpuPolicyVgpuProfile
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.