1. Packages
  2. Vultr
  3. API Docs
  4. getPlan
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

vultr.getPlan

Explore with Pulumi AI

vultr logo
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

    Get information about a Vultr plan.

    Example Usage

    Get the information for a plan by

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myPlan = Vultr.GetPlan.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetPlanFilterInputArgs
                {
                    Name = "id",
                    Values = new[]
                    {
                        "vc2-1c-2gb",
                    },
                },
            },
        });
    
    });
    
    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.GetPlan(ctx, &vultr.GetPlanArgs{
    			Filters: []vultr.GetPlanFilter{
    				{
    					Name: "id",
    					Values: []string{
    						"vc2-1c-2gb",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.GetPlanArgs;
    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.getPlan(GetPlanArgs.builder()
                .filters(GetPlanFilterArgs.builder()
                    .name("id")
                    .values("vc2-1c-2gb")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vultr as vultr
    
    my_plan = vultr.get_plan(filters=[vultr.GetPlanFilterArgs(
        name="id",
        values=["vc2-1c-2gb"],
    )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const myPlan = vultr.getPlan({
        filters: [{
            name: "id",
            values: ["vc2-1c-2gb"],
        }],
    });
    
    variables:
      myPlan:
        fn::invoke:
          Function: vultr:getPlan
          Arguments:
            filters:
              - name: id
                values:
                  - vc2-1c-2gb
    

    Using getPlan

    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 getPlan(args: GetPlanArgs, opts?: InvokeOptions): Promise<GetPlanResult>
    function getPlanOutput(args: GetPlanOutputArgs, opts?: InvokeOptions): Output<GetPlanResult>
    def get_plan(filters: Optional[Sequence[GetPlanFilter]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetPlanResult
    def get_plan_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPlanFilterArgs]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetPlanResult]
    func GetPlan(ctx *Context, args *GetPlanArgs, opts ...InvokeOption) (*GetPlanResult, error)
    func GetPlanOutput(ctx *Context, args *GetPlanOutputArgs, opts ...InvokeOption) GetPlanResultOutput

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

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

    The following arguments are supported:

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

    getPlan Result

    The following output properties are available:

    Bandwidth int
    The bandwidth available on the plan in GB.
    Disk int
    The amount of disk space in GB available on the plan.
    DiskCount int
    The number of disks that this plan offers.
    GpuType string
    For GPU plans, the GPU card type.
    GpuVram int
    For GPU plans, the VRAM available in the plan.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations List<string>
    MonthlyCost double
    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.
    VcpuCount int
    The number of virtual CPUs available on the plan.
    Filters List<ediri.Vultr.Outputs.GetPlanFilter>
    Bandwidth int
    The bandwidth available on the plan in GB.
    Disk int
    The amount of disk space in GB available on the plan.
    DiskCount int
    The number of disks that this plan offers.
    GpuType string
    For GPU plans, the GPU card type.
    GpuVram int
    For GPU plans, the VRAM available in the plan.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations []string
    MonthlyCost float64
    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.
    VcpuCount int
    The number of virtual CPUs available on the plan.
    Filters []GetPlanFilter
    bandwidth Integer
    The bandwidth available on the plan in GB.
    disk Integer
    The amount of disk space in GB available on the plan.
    diskCount Integer
    The number of disks that this plan offers.
    gpuType String
    For GPU plans, the GPU card type.
    gpuVram Integer
    For GPU plans, the VRAM available in the plan.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<String>
    monthlyCost Double
    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.
    vcpuCount Integer
    The number of virtual CPUs available on the plan.
    filters List<GetPlanFilter>
    bandwidth number
    The bandwidth available on the plan in GB.
    disk number
    The amount of disk space in GB available on the plan.
    diskCount number
    The number of disks that this plan offers.
    gpuType string
    For GPU plans, the GPU card type.
    gpuVram number
    For GPU plans, the VRAM available in the plan.
    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.
    vcpuCount number
    The number of virtual CPUs available on the plan.
    filters GetPlanFilter[]
    bandwidth int
    The bandwidth available on the plan in GB.
    disk int
    The amount of disk space in GB available on the plan.
    disk_count int
    The number of disks that this plan offers.
    gpu_type str
    For GPU plans, the GPU card type.
    gpu_vram int
    For GPU plans, the VRAM available in the plan.
    id str
    The provider-assigned unique ID for this managed resource.
    locations Sequence[str]
    monthly_cost float
    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.
    vcpu_count int
    The number of virtual CPUs available on the plan.
    filters Sequence[GetPlanFilter]
    bandwidth Number
    The bandwidth available on the plan in GB.
    disk Number
    The amount of disk space in GB available on the plan.
    diskCount Number
    The number of disks that this plan offers.
    gpuType String
    For GPU plans, the GPU card type.
    gpuVram Number
    For GPU plans, the VRAM available in the plan.
    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.
    vcpuCount Number
    The number of virtual CPUs available on the plan.
    filters List<Property Map>

    Supporting Types

    GetPlanFilter

    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.19.0 published on Friday, Jan 5, 2024 by dirien