1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. simpleapplicationserver
  5. getServerPlans
Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi

alicloud.simpleapplicationserver.getServerPlans

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi

    This data source provides the Simple Application Server Plans of the current Alibaba Cloud user.

    NOTE: Available in v1.135.0+.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.SimpleApplicationServer.GetServerPlans.Invoke(new()
        {
            Memory = 1,
            Bandwidth = 3,
            DiskSize = 40,
            Flow = 6,
            Core = 2,
        });
    
        return new Dictionary<string, object?>
        {
            ["simpleApplicationServerPlanId1"] = data.Alicloud_simple_application_server_plans.Ids.Plans[0].Id,
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/simpleapplicationserver"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := simpleapplicationserver.GetServerPlans(ctx, &simpleapplicationserver.GetServerPlansArgs{
    			Memory:    pulumi.IntRef(1),
    			Bandwidth: pulumi.IntRef(3),
    			DiskSize:  pulumi.IntRef(40),
    			Flow:      pulumi.IntRef(6),
    			Core:      pulumi.IntRef(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("simpleApplicationServerPlanId1", data.Alicloud_simple_application_server_plans.Ids.Plans[0].Id)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.simpleapplicationserver.SimpleapplicationserverFunctions;
    import com.pulumi.alicloud.simpleapplicationserver.inputs.GetServerPlansArgs;
    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 example = SimpleapplicationserverFunctions.getServerPlans(GetServerPlansArgs.builder()
                .memory(1)
                .bandwidth(3)
                .diskSize(40)
                .flow(6)
                .core(2)
                .build());
    
            ctx.export("simpleApplicationServerPlanId1", data.alicloud_simple_application_server_plans().ids().plans()[0].id());
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.simpleapplicationserver.get_server_plans(memory=1,
        bandwidth=3,
        disk_size=40,
        flow=6,
        core=2)
    pulumi.export("simpleApplicationServerPlanId1", data["alicloud_simple_application_server_plans"]["ids"]["plans"][0]["id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.simpleapplicationserver.getServerPlans({
        memory: 1,
        bandwidth: 3,
        diskSize: 40,
        flow: 6,
        core: 2,
    });
    export const simpleApplicationServerPlanId1 = data.alicloud_simple_application_server_plans.ids.plans[0].id;
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:simpleapplicationserver:getServerPlans
          Arguments:
            memory: 1
            bandwidth: 3
            diskSize: 40
            flow: 6
            core: 2
    outputs:
      simpleApplicationServerPlanId1: ${data.alicloud_simple_application_server_plans.ids.plans[0].id}
    

    Using getServerPlans

    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 getServerPlans(args: GetServerPlansArgs, opts?: InvokeOptions): Promise<GetServerPlansResult>
    function getServerPlansOutput(args: GetServerPlansOutputArgs, opts?: InvokeOptions): Output<GetServerPlansResult>
    def get_server_plans(bandwidth: Optional[int] = None,
                         core: Optional[int] = None,
                         disk_size: Optional[int] = None,
                         flow: Optional[int] = None,
                         ids: Optional[Sequence[str]] = None,
                         memory: Optional[int] = None,
                         output_file: Optional[str] = None,
                         platform: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetServerPlansResult
    def get_server_plans_output(bandwidth: Optional[pulumi.Input[int]] = None,
                         core: Optional[pulumi.Input[int]] = None,
                         disk_size: Optional[pulumi.Input[int]] = None,
                         flow: Optional[pulumi.Input[int]] = None,
                         ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         memory: Optional[pulumi.Input[int]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         platform: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetServerPlansResult]
    func GetServerPlans(ctx *Context, args *GetServerPlansArgs, opts ...InvokeOption) (*GetServerPlansResult, error)
    func GetServerPlansOutput(ctx *Context, args *GetServerPlansOutputArgs, opts ...InvokeOption) GetServerPlansResultOutput

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

    public static class GetServerPlans 
    {
        public static Task<GetServerPlansResult> InvokeAsync(GetServerPlansArgs args, InvokeOptions? opts = null)
        public static Output<GetServerPlansResult> Invoke(GetServerPlansInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServerPlansResult> getServerPlans(GetServerPlansArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:simpleapplicationserver/getServerPlans:getServerPlans
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bandwidth int
    The peak bandwidth. Unit: Mbit/s.
    Core int
    The number of CPU cores.
    DiskSize int
    The size of the enhanced SSD (ESSD). Unit: GB.
    Flow int
    The monthly data transfer quota. Unit: GB.
    Ids List<string>
    A list of Instance Plan IDs.
    Memory int
    The memory size. Unit: GB.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Platform string
    The platform of Plan supported. Valid values: ["Linux", "Windows"].
    Bandwidth int
    The peak bandwidth. Unit: Mbit/s.
    Core int
    The number of CPU cores.
    DiskSize int
    The size of the enhanced SSD (ESSD). Unit: GB.
    Flow int
    The monthly data transfer quota. Unit: GB.
    Ids []string
    A list of Instance Plan IDs.
    Memory int
    The memory size. Unit: GB.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Platform string
    The platform of Plan supported. Valid values: ["Linux", "Windows"].
    bandwidth Integer
    The peak bandwidth. Unit: Mbit/s.
    core Integer
    The number of CPU cores.
    diskSize Integer
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow Integer
    The monthly data transfer quota. Unit: GB.
    ids List<String>
    A list of Instance Plan IDs.
    memory Integer
    The memory size. Unit: GB.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    platform String
    The platform of Plan supported. Valid values: ["Linux", "Windows"].
    bandwidth number
    The peak bandwidth. Unit: Mbit/s.
    core number
    The number of CPU cores.
    diskSize number
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow number
    The monthly data transfer quota. Unit: GB.
    ids string[]
    A list of Instance Plan IDs.
    memory number
    The memory size. Unit: GB.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    platform string
    The platform of Plan supported. Valid values: ["Linux", "Windows"].
    bandwidth int
    The peak bandwidth. Unit: Mbit/s.
    core int
    The number of CPU cores.
    disk_size int
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow int
    The monthly data transfer quota. Unit: GB.
    ids Sequence[str]
    A list of Instance Plan IDs.
    memory int
    The memory size. Unit: GB.
    output_file str
    File name where to save data source results (after running pulumi preview).
    platform str
    The platform of Plan supported. Valid values: ["Linux", "Windows"].
    bandwidth Number
    The peak bandwidth. Unit: Mbit/s.
    core Number
    The number of CPU cores.
    diskSize Number
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow Number
    The monthly data transfer quota. Unit: GB.
    ids List<String>
    A list of Instance Plan IDs.
    memory Number
    The memory size. Unit: GB.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    platform String
    The platform of Plan supported. Valid values: ["Linux", "Windows"].

    getServerPlans Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Plans List<Pulumi.AliCloud.SimpleApplicationServer.Outputs.GetServerPlansPlan>
    Bandwidth int
    Core int
    DiskSize int
    Flow int
    Memory int
    OutputFile string
    Platform string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Plans []GetServerPlansPlan
    Bandwidth int
    Core int
    DiskSize int
    Flow int
    Memory int
    OutputFile string
    Platform string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    plans List<GetServerPlansPlan>
    bandwidth Integer
    core Integer
    diskSize Integer
    flow Integer
    memory Integer
    outputFile String
    platform String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    plans GetServerPlansPlan[]
    bandwidth number
    core number
    diskSize number
    flow number
    memory number
    outputFile string
    platform string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    plans Sequence[GetServerPlansPlan]
    bandwidth int
    core int
    disk_size int
    flow int
    memory int
    output_file str
    platform str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    plans List<Property Map>
    bandwidth Number
    core Number
    diskSize Number
    flow Number
    memory Number
    outputFile String
    platform String

    Supporting Types

    GetServerPlansPlan

    Bandwidth int
    The peak bandwidth. Unit: Mbit/s.
    Core int
    The number of CPU cores.
    DiskSize int
    The size of the enhanced SSD (ESSD). Unit: GB.
    Flow int
    The monthly data transfer quota. Unit: GB.
    Id string
    The ID of the Instance Plan.
    Memory int
    The memory size. Unit: GB.
    PlanId string
    The ID of the Instance Plan.
    SupportPlatform string
    The platform of Plan supported.
    Bandwidth int
    The peak bandwidth. Unit: Mbit/s.
    Core int
    The number of CPU cores.
    DiskSize int
    The size of the enhanced SSD (ESSD). Unit: GB.
    Flow int
    The monthly data transfer quota. Unit: GB.
    Id string
    The ID of the Instance Plan.
    Memory int
    The memory size. Unit: GB.
    PlanId string
    The ID of the Instance Plan.
    SupportPlatform string
    The platform of Plan supported.
    bandwidth Integer
    The peak bandwidth. Unit: Mbit/s.
    core Integer
    The number of CPU cores.
    diskSize Integer
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow Integer
    The monthly data transfer quota. Unit: GB.
    id String
    The ID of the Instance Plan.
    memory Integer
    The memory size. Unit: GB.
    planId String
    The ID of the Instance Plan.
    supportPlatform String
    The platform of Plan supported.
    bandwidth number
    The peak bandwidth. Unit: Mbit/s.
    core number
    The number of CPU cores.
    diskSize number
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow number
    The monthly data transfer quota. Unit: GB.
    id string
    The ID of the Instance Plan.
    memory number
    The memory size. Unit: GB.
    planId string
    The ID of the Instance Plan.
    supportPlatform string
    The platform of Plan supported.
    bandwidth int
    The peak bandwidth. Unit: Mbit/s.
    core int
    The number of CPU cores.
    disk_size int
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow int
    The monthly data transfer quota. Unit: GB.
    id str
    The ID of the Instance Plan.
    memory int
    The memory size. Unit: GB.
    plan_id str
    The ID of the Instance Plan.
    support_platform str
    The platform of Plan supported.
    bandwidth Number
    The peak bandwidth. Unit: Mbit/s.
    core Number
    The number of CPU cores.
    diskSize Number
    The size of the enhanced SSD (ESSD). Unit: GB.
    flow Number
    The monthly data transfer quota. Unit: GB.
    id String
    The ID of the Instance Plan.
    memory Number
    The memory size. Unit: GB.
    planId String
    The ID of the Instance Plan.
    supportPlatform String
    The platform of Plan supported.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi