vcd.getVmSizingPolicy
Explore with Pulumi AI
Provides a VMware Cloud Director VM sizing policy data source. This can be used to read VM sizing policy.
Supported in provider v3.0+ and requires VCD 10.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const tf_policy_name = vcd.getVmSizingPolicy({
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_sizing_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.LookupVmSizingPolicy(ctx, &vcd.LookupVmSizingPolicyArgs{
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.GetVmSizingPolicy.Invoke(new()
{
Name = "my-rule",
});
return new Dictionary<string, object?>
{
["policyId"] = tf_policy_name.Apply(tf_policy_name => tf_policy_name.Apply(getVmSizingPolicyResult => getVmSizingPolicyResult.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.GetVmSizingPolicyArgs;
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.getVmSizingPolicy(GetVmSizingPolicyArgs.builder()
.name("my-rule")
.build());
ctx.export("policyId", tf_policy_name.id());
}
}
variables:
tf-policy-name:
fn::invoke:
function: vcd:getVmSizingPolicy
arguments:
name: my-rule
outputs:
policyId: ${["tf-policy-name"].id}
Using getVmSizingPolicy
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 getVmSizingPolicy(args: GetVmSizingPolicyArgs, opts?: InvokeOptions): Promise<GetVmSizingPolicyResult>
function getVmSizingPolicyOutput(args: GetVmSizingPolicyOutputArgs, opts?: InvokeOptions): Output<GetVmSizingPolicyResult>
def get_vm_sizing_policy(id: Optional[str] = None,
name: Optional[str] = None,
org: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVmSizingPolicyResult
def get_vm_sizing_policy_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVmSizingPolicyResult]
func LookupVmSizingPolicy(ctx *Context, args *LookupVmSizingPolicyArgs, opts ...InvokeOption) (*LookupVmSizingPolicyResult, error)
func LookupVmSizingPolicyOutput(ctx *Context, args *LookupVmSizingPolicyOutputArgs, opts ...InvokeOption) LookupVmSizingPolicyResultOutput
> Note: This function is named LookupVmSizingPolicy
in the Go SDK.
public static class GetVmSizingPolicy
{
public static Task<GetVmSizingPolicyResult> InvokeAsync(GetVmSizingPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetVmSizingPolicyResult> Invoke(GetVmSizingPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVmSizingPolicyResult> getVmSizingPolicy(GetVmSizingPolicyArgs args, InvokeOptions options)
public static Output<GetVmSizingPolicyResult> getVmSizingPolicy(GetVmSizingPolicyArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getVmSizingPolicy:getVmSizingPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
The name VM sizing policy
Note: Previously, it was incorrectly stated that the
org
argument was required. In fact, it is not, and it has been deprecated in the resource schema. To preserve compatibility until the next release, though, the parameter is still parsed, but ignored.All arguments defined in
vcd.VmSizingPolicy
are supported.- Id string
- Org string
- Name string
The name VM sizing policy
Note: Previously, it was incorrectly stated that the
org
argument was required. In fact, it is not, and it has been deprecated in the resource schema. To preserve compatibility until the next release, though, the parameter is still parsed, but ignored.All arguments defined in
vcd.VmSizingPolicy
are supported.- Id string
- Org string
- name String
The name VM sizing policy
Note: Previously, it was incorrectly stated that the
org
argument was required. In fact, it is not, and it has been deprecated in the resource schema. To preserve compatibility until the next release, though, the parameter is still parsed, but ignored.All arguments defined in
vcd.VmSizingPolicy
are supported.- id String
- org String
- name string
The name VM sizing policy
Note: Previously, it was incorrectly stated that the
org
argument was required. In fact, it is not, and it has been deprecated in the resource schema. To preserve compatibility until the next release, though, the parameter is still parsed, but ignored.All arguments defined in
vcd.VmSizingPolicy
are supported.- id string
- org string
- name str
The name VM sizing policy
Note: Previously, it was incorrectly stated that the
org
argument was required. In fact, it is not, and it has been deprecated in the resource schema. To preserve compatibility until the next release, though, the parameter is still parsed, but ignored.All arguments defined in
vcd.VmSizingPolicy
are supported.- id str
- org str
- name String
The name VM sizing policy
Note: Previously, it was incorrectly stated that the
org
argument was required. In fact, it is not, and it has been deprecated in the resource schema. To preserve compatibility until the next release, though, the parameter is still parsed, but ignored.All arguments defined in
vcd.VmSizingPolicy
are supported.- id String
- org String
getVmSizingPolicy Result
The following output properties are available:
- Cpus
List<Get
Vm Sizing Policy Cpus> - Description string
- Id string
- Memories
List<Get
Vm Sizing Policy Memory> - Name string
- Org string
- Cpus
[]Get
Vm Sizing Policy Cpus - Description string
- Id string
- Memories
[]Get
Vm Sizing Policy Memory - Name string
- Org string
- cpus
List<Get
Vm Sizing Policy Cpus> - description String
- id String
- memories
List<Get
Vm Sizing Policy Memory> - name String
- org String
- cpus
Get
Vm Sizing Policy Cpus[] - description string
- id string
- memories
Get
Vm Sizing Policy Memory[] - name string
- org string
- cpus List<Property Map>
- description String
- id String
- memories List<Property Map>
- name String
- org String
Supporting Types
GetVmSizingPolicyCpus
- 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
GetVmSizingPolicyMemory
- 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
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.