1. Packages
  2. Vultr
  3. API Docs
  4. getBareMetalPlan
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

vultr.getBareMetalPlan

Explore with Pulumi AI

vultr logo
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

    Get information about a Vultr bare metal server plan.

    Example Usage

    Get the information for a plan by id:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const myPlan = vultr.getBareMetalPlan({
        filters: [{
            name: "id",
            values: ["vbm-4c-32gb"],
        }],
    });
    
    import pulumi
    import pulumi_vultr as vultr
    
    my_plan = vultr.get_bare_metal_plan(filters=[vultr.GetBareMetalPlanFilterArgs(
        name="id",
        values=["vbm-4c-32gb"],
    )])
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.GetBareMetalPlan(ctx, &vultr.GetBareMetalPlanArgs{
    			Filters: []vultr.GetBareMetalPlanFilter{
    				{
    					Name: "id",
    					Values: []string{
    						"vbm-4c-32gb",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myPlan = Vultr.GetBareMetalPlan.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetBareMetalPlanFilterInputArgs
                {
                    Name = "id",
                    Values = new[]
                    {
                        "vbm-4c-32gb",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    import com.pulumi.vultr.inputs.GetBareMetalPlanArgs;
    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 myPlan = VultrFunctions.getBareMetalPlan(GetBareMetalPlanArgs.builder()
                .filters(GetBareMetalPlanFilterArgs.builder()
                    .name("id")
                    .values("vbm-4c-32gb")
                    .build())
                .build());
    
        }
    }
    
    variables:
      myPlan:
        fn::invoke:
          Function: vultr:getBareMetalPlan
          Arguments:
            filters:
              - name: id
                values:
                  - vbm-4c-32gb
    

    Using getBareMetalPlan

    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 getBareMetalPlan(args: GetBareMetalPlanArgs, opts?: InvokeOptions): Promise<GetBareMetalPlanResult>
    function getBareMetalPlanOutput(args: GetBareMetalPlanOutputArgs, opts?: InvokeOptions): Output<GetBareMetalPlanResult>
    def get_bare_metal_plan(filters: Optional[Sequence[GetBareMetalPlanFilter]] = None,
                            opts: Optional[InvokeOptions] = None) -> GetBareMetalPlanResult
    def get_bare_metal_plan_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetBareMetalPlanFilterArgs]]]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetBareMetalPlanResult]
    func GetBareMetalPlan(ctx *Context, args *GetBareMetalPlanArgs, opts ...InvokeOption) (*GetBareMetalPlanResult, error)
    func GetBareMetalPlanOutput(ctx *Context, args *GetBareMetalPlanOutputArgs, opts ...InvokeOption) GetBareMetalPlanResultOutput

    > Note: This function is named GetBareMetalPlan in the Go SDK.

    public static class GetBareMetalPlan 
    {
        public static Task<GetBareMetalPlanResult> InvokeAsync(GetBareMetalPlanArgs args, InvokeOptions? opts = null)
        public static Output<GetBareMetalPlanResult> Invoke(GetBareMetalPlanInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBareMetalPlanResult> getBareMetalPlan(GetBareMetalPlanArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getBareMetalPlan:getBareMetalPlan
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetBareMetalPlanFilter>
    Query parameters for finding plans.
    Filters []GetBareMetalPlanFilter
    Query parameters for finding plans.
    filters List<GetBareMetalPlanFilter>
    Query parameters for finding plans.
    filters GetBareMetalPlanFilter[]
    Query parameters for finding plans.
    filters Sequence[GetBareMetalPlanFilter]
    Query parameters for finding plans.
    filters List<Property Map>
    Query parameters for finding plans.

    getBareMetalPlan Result

    The following output properties are available:

    Bandwidth int
    The bandwidth available on the plan.
    CpuCount int
    The number of CPUs available on the plan.
    CpuModel string
    The CPU model of the plan.
    CpuThreads int
    The number of CPU threads.
    Disk int
    The description of the disk(s) on the plan.
    DiskCount int
    The number of disks that this plan offers.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations List<string>
    MonthlyCost int
    The price per month of the plan in USD.
    Ram int
    The amount of memory available on the plan in MB.
    Type string
    The type of plan it is.
    Filters List<ediri.Vultr.Outputs.GetBareMetalPlanFilter>
    Bandwidth int
    The bandwidth available on the plan.
    CpuCount int
    The number of CPUs available on the plan.
    CpuModel string
    The CPU model of the plan.
    CpuThreads int
    The number of CPU threads.
    Disk int
    The description of the disk(s) on the plan.
    DiskCount int
    The number of disks that this plan offers.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations []string
    MonthlyCost int
    The price per month of the plan in USD.
    Ram int
    The amount of memory available on the plan in MB.
    Type string
    The type of plan it is.
    Filters []GetBareMetalPlanFilter
    bandwidth Integer
    The bandwidth available on the plan.
    cpuCount Integer
    The number of CPUs available on the plan.
    cpuModel String
    The CPU model of the plan.
    cpuThreads Integer
    The number of CPU threads.
    disk Integer
    The description of the disk(s) on the plan.
    diskCount Integer
    The number of disks that this plan offers.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<String>
    monthlyCost Integer
    The price per month of the plan in USD.
    ram Integer
    The amount of memory available on the plan in MB.
    type String
    The type of plan it is.
    filters List<GetBareMetalPlanFilter>
    bandwidth number
    The bandwidth available on the plan.
    cpuCount number
    The number of CPUs available on the plan.
    cpuModel string
    The CPU model of the plan.
    cpuThreads number
    The number of CPU threads.
    disk number
    The description of the disk(s) on the plan.
    diskCount number
    The number of disks that this plan offers.
    id string
    The provider-assigned unique ID for this managed resource.
    locations string[]
    monthlyCost number
    The price per month of the plan in USD.
    ram number
    The amount of memory available on the plan in MB.
    type string
    The type of plan it is.
    filters GetBareMetalPlanFilter[]
    bandwidth int
    The bandwidth available on the plan.
    cpu_count int
    The number of CPUs available on the plan.
    cpu_model str
    The CPU model of the plan.
    cpu_threads int
    The number of CPU threads.
    disk int
    The description of the disk(s) on the plan.
    disk_count int
    The number of disks that this plan offers.
    id str
    The provider-assigned unique ID for this managed resource.
    locations Sequence[str]
    monthly_cost int
    The price per month of the plan in USD.
    ram int
    The amount of memory available on the plan in MB.
    type str
    The type of plan it is.
    filters Sequence[GetBareMetalPlanFilter]
    bandwidth Number
    The bandwidth available on the plan.
    cpuCount Number
    The number of CPUs available on the plan.
    cpuModel String
    The CPU model of the plan.
    cpuThreads Number
    The number of CPU threads.
    disk Number
    The description of the disk(s) on the plan.
    diskCount Number
    The number of disks that this plan offers.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<String>
    monthlyCost Number
    The price per month of the plan in USD.
    ram Number
    The amount of memory available on the plan in MB.
    type String
    The type of plan it is.
    filters List<Property Map>

    Supporting Types

    GetBareMetalPlanFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien