1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getComputeFlavorV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getComputeFlavorV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for ECS flavor you can get at documentation portal

    Use this data source to get the ID of an available OpenTelekomCloud flavor.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const medium_s2 = opentelekomcloud.getComputeFlavorV2({
        ram: 4096,
        resourceType: "IOoptimizedS2",
        vcpus: 1,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    medium_s2 = opentelekomcloud.get_compute_flavor_v2(ram=4096,
        resource_type="IOoptimizedS2",
        vcpus=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.GetComputeFlavorV2(ctx, &opentelekomcloud.GetComputeFlavorV2Args{
    			Ram:          pulumi.Float64Ref(4096),
    			ResourceType: pulumi.StringRef("IOoptimizedS2"),
    			Vcpus:        pulumi.Float64Ref(1),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var medium_s2 = Opentelekomcloud.GetComputeFlavorV2.Invoke(new()
        {
            Ram = 4096,
            ResourceType = "IOoptimizedS2",
            Vcpus = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetComputeFlavorV2Args;
    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 medium-s2 = OpentelekomcloudFunctions.getComputeFlavorV2(GetComputeFlavorV2Args.builder()
                .ram(4096)
                .resourceType("IOoptimizedS2")
                .vcpus(1)
                .build());
    
        }
    }
    
    variables:
      medium-s2:
        fn::invoke:
          function: opentelekomcloud:getComputeFlavorV2
          arguments:
            ram: 4096
            resourceType: IOoptimizedS2
            vcpus: 1
    

    Using getComputeFlavorV2

    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 getComputeFlavorV2(args: GetComputeFlavorV2Args, opts?: InvokeOptions): Promise<GetComputeFlavorV2Result>
    function getComputeFlavorV2Output(args: GetComputeFlavorV2OutputArgs, opts?: InvokeOptions): Output<GetComputeFlavorV2Result>
    def get_compute_flavor_v2(availability_zone: Optional[str] = None,
                              disk: Optional[float] = None,
                              flavor_id: Optional[str] = None,
                              id: Optional[str] = None,
                              min_disk: Optional[float] = None,
                              min_ram: Optional[float] = None,
                              name: Optional[str] = None,
                              ram: Optional[float] = None,
                              region: Optional[str] = None,
                              resource_type: Optional[str] = None,
                              rx_tx_factor: Optional[float] = None,
                              swap: Optional[float] = None,
                              vcpus: Optional[float] = None,
                              opts: Optional[InvokeOptions] = None) -> GetComputeFlavorV2Result
    def get_compute_flavor_v2_output(availability_zone: Optional[pulumi.Input[str]] = None,
                              disk: Optional[pulumi.Input[float]] = None,
                              flavor_id: Optional[pulumi.Input[str]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              min_disk: Optional[pulumi.Input[float]] = None,
                              min_ram: Optional[pulumi.Input[float]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              ram: Optional[pulumi.Input[float]] = None,
                              region: Optional[pulumi.Input[str]] = None,
                              resource_type: Optional[pulumi.Input[str]] = None,
                              rx_tx_factor: Optional[pulumi.Input[float]] = None,
                              swap: Optional[pulumi.Input[float]] = None,
                              vcpus: Optional[pulumi.Input[float]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetComputeFlavorV2Result]
    func GetComputeFlavorV2(ctx *Context, args *GetComputeFlavorV2Args, opts ...InvokeOption) (*GetComputeFlavorV2Result, error)
    func GetComputeFlavorV2Output(ctx *Context, args *GetComputeFlavorV2OutputArgs, opts ...InvokeOption) GetComputeFlavorV2ResultOutput

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

    public static class GetComputeFlavorV2 
    {
        public static Task<GetComputeFlavorV2Result> InvokeAsync(GetComputeFlavorV2Args args, InvokeOptions? opts = null)
        public static Output<GetComputeFlavorV2Result> Invoke(GetComputeFlavorV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetComputeFlavorV2Result> getComputeFlavorV2(GetComputeFlavorV2Args args, InvokeOptions options)
    public static Output<GetComputeFlavorV2Result> getComputeFlavorV2(GetComputeFlavorV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getComputeFlavorV2:getComputeFlavorV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AvailabilityZone string
    Whether flavor should be in normal state.
    Disk double
    The exact amount of disk (in gigabytes).
    FlavorId string
    The ID of the flavor. Conflicts with the name, min_ram and min_disk
    Id string
    MinDisk double
    The minimum amount of disk (in gigabytes). Conflicts with the flavor_id.
    MinRam double
    The minimum amount of RAM (in megabytes). Conflicts with the flavor_id.
    Name string
    The name of the flavor. Conflicts with the flavor_id.
    Ram double
    The exact amount of RAM (in megabytes).
    Region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.
    ResourceType string
    Flavor resource type.
    RxTxFactor double
    The rx_tx_factor of the flavor.
    Swap double
    The amount of swap (in gigabytes).
    Vcpus double
    The amount of VCPUs.
    AvailabilityZone string
    Whether flavor should be in normal state.
    Disk float64
    The exact amount of disk (in gigabytes).
    FlavorId string
    The ID of the flavor. Conflicts with the name, min_ram and min_disk
    Id string
    MinDisk float64
    The minimum amount of disk (in gigabytes). Conflicts with the flavor_id.
    MinRam float64
    The minimum amount of RAM (in megabytes). Conflicts with the flavor_id.
    Name string
    The name of the flavor. Conflicts with the flavor_id.
    Ram float64
    The exact amount of RAM (in megabytes).
    Region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.
    ResourceType string
    Flavor resource type.
    RxTxFactor float64
    The rx_tx_factor of the flavor.
    Swap float64
    The amount of swap (in gigabytes).
    Vcpus float64
    The amount of VCPUs.
    availabilityZone String
    Whether flavor should be in normal state.
    disk Double
    The exact amount of disk (in gigabytes).
    flavorId String
    The ID of the flavor. Conflicts with the name, min_ram and min_disk
    id String
    minDisk Double
    The minimum amount of disk (in gigabytes). Conflicts with the flavor_id.
    minRam Double
    The minimum amount of RAM (in megabytes). Conflicts with the flavor_id.
    name String
    The name of the flavor. Conflicts with the flavor_id.
    ram Double
    The exact amount of RAM (in megabytes).
    region String
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.
    resourceType String
    Flavor resource type.
    rxTxFactor Double
    The rx_tx_factor of the flavor.
    swap Double
    The amount of swap (in gigabytes).
    vcpus Double
    The amount of VCPUs.
    availabilityZone string
    Whether flavor should be in normal state.
    disk number
    The exact amount of disk (in gigabytes).
    flavorId string
    The ID of the flavor. Conflicts with the name, min_ram and min_disk
    id string
    minDisk number
    The minimum amount of disk (in gigabytes). Conflicts with the flavor_id.
    minRam number
    The minimum amount of RAM (in megabytes). Conflicts with the flavor_id.
    name string
    The name of the flavor. Conflicts with the flavor_id.
    ram number
    The exact amount of RAM (in megabytes).
    region string
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.
    resourceType string
    Flavor resource type.
    rxTxFactor number
    The rx_tx_factor of the flavor.
    swap number
    The amount of swap (in gigabytes).
    vcpus number
    The amount of VCPUs.
    availability_zone str
    Whether flavor should be in normal state.
    disk float
    The exact amount of disk (in gigabytes).
    flavor_id str
    The ID of the flavor. Conflicts with the name, min_ram and min_disk
    id str
    min_disk float
    The minimum amount of disk (in gigabytes). Conflicts with the flavor_id.
    min_ram float
    The minimum amount of RAM (in megabytes). Conflicts with the flavor_id.
    name str
    The name of the flavor. Conflicts with the flavor_id.
    ram float
    The exact amount of RAM (in megabytes).
    region str
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.
    resource_type str
    Flavor resource type.
    rx_tx_factor float
    The rx_tx_factor of the flavor.
    swap float
    The amount of swap (in gigabytes).
    vcpus float
    The amount of VCPUs.
    availabilityZone String
    Whether flavor should be in normal state.
    disk Number
    The exact amount of disk (in gigabytes).
    flavorId String
    The ID of the flavor. Conflicts with the name, min_ram and min_disk
    id String
    minDisk Number
    The minimum amount of disk (in gigabytes). Conflicts with the flavor_id.
    minRam Number
    The minimum amount of RAM (in megabytes). Conflicts with the flavor_id.
    name String
    The name of the flavor. Conflicts with the flavor_id.
    ram Number
    The exact amount of RAM (in megabytes).
    region String
    The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.
    resourceType String
    Flavor resource type.
    rxTxFactor Number
    The rx_tx_factor of the flavor.
    swap Number
    The amount of swap (in gigabytes).
    vcpus Number
    The amount of VCPUs.

    getComputeFlavorV2 Result

    The following output properties are available:

    ExtraSpecs Dictionary<string, string>
    Key/Value pairs of metadata for the flavor.
    Id string
    Region string
    AvailabilityZone string
    Disk double
    FlavorId string
    MinDisk double
    MinRam double
    Name string
    Ram double
    ResourceType string
    RxTxFactor double
    Swap double
    Vcpus double
    ExtraSpecs map[string]string
    Key/Value pairs of metadata for the flavor.
    Id string
    Region string
    AvailabilityZone string
    Disk float64
    FlavorId string
    MinDisk float64
    MinRam float64
    Name string
    Ram float64
    ResourceType string
    RxTxFactor float64
    Swap float64
    Vcpus float64
    extraSpecs Map<String,String>
    Key/Value pairs of metadata for the flavor.
    id String
    region String
    availabilityZone String
    disk Double
    flavorId String
    minDisk Double
    minRam Double
    name String
    ram Double
    resourceType String
    rxTxFactor Double
    swap Double
    vcpus Double
    extraSpecs {[key: string]: string}
    Key/Value pairs of metadata for the flavor.
    id string
    region string
    availabilityZone string
    disk number
    flavorId string
    minDisk number
    minRam number
    name string
    ram number
    resourceType string
    rxTxFactor number
    swap number
    vcpus number
    extra_specs Mapping[str, str]
    Key/Value pairs of metadata for the flavor.
    id str
    region str
    availability_zone str
    disk float
    flavor_id str
    min_disk float
    min_ram float
    name str
    ram float
    resource_type str
    rx_tx_factor float
    swap float
    vcpus float
    extraSpecs Map<String>
    Key/Value pairs of metadata for the flavor.
    id String
    region String
    availabilityZone String
    disk Number
    flavorId String
    minDisk Number
    minRam Number
    name String
    ram Number
    resourceType String
    rxTxFactor Number
    swap Number
    vcpus Number

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud