1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. getInstanceClassInfos
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.rds.getInstanceClassInfos

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source operation to query the instance types that are available to specific instances of Alibaba Cloud.

    NOTE: Available in v1.196.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const resources = alicloud.rds.getInstanceClassInfos({
        commodityCode: "bards",
        orderType: "BUY",
        outputFile: "./classes.txt",
    });
    export const firstDbInstanceClass = resources.then(resources => resources.infos?.[0]);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    resources = alicloud.rds.get_instance_class_infos(commodity_code="bards",
        order_type="BUY",
        output_file="./classes.txt")
    pulumi.export("firstDbInstanceClass", resources.infos[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		resources, err := rds.GetInstanceClassInfos(ctx, &rds.GetInstanceClassInfosArgs{
    			CommodityCode: "bards",
    			OrderType:     "BUY",
    			OutputFile:    pulumi.StringRef("./classes.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstDbInstanceClass", resources.Infos[0])
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var resources = AliCloud.Rds.GetInstanceClassInfos.Invoke(new()
        {
            CommodityCode = "bards",
            OrderType = "BUY",
            OutputFile = "./classes.txt",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstDbInstanceClass"] = resources.Apply(getInstanceClassInfosResult => getInstanceClassInfosResult.Infos[0]),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetInstanceClassInfosArgs;
    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 resources = RdsFunctions.getInstanceClassInfos(GetInstanceClassInfosArgs.builder()
                .commodityCode("bards")
                .orderType("BUY")
                .outputFile("./classes.txt")
                .build());
    
            ctx.export("firstDbInstanceClass", resources.applyValue(getInstanceClassInfosResult -> getInstanceClassInfosResult.infos()[0]));
        }
    }
    
    variables:
      resources:
        fn::invoke:
          Function: alicloud:rds:getInstanceClassInfos
          Arguments:
            commodityCode: bards
            orderType: BUY
            outputFile: ./classes.txt
    outputs:
      firstDbInstanceClass: ${resources.infos[0]}
    

    Using getInstanceClassInfos

    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 getInstanceClassInfos(args: GetInstanceClassInfosArgs, opts?: InvokeOptions): Promise<GetInstanceClassInfosResult>
    function getInstanceClassInfosOutput(args: GetInstanceClassInfosOutputArgs, opts?: InvokeOptions): Output<GetInstanceClassInfosResult>
    def get_instance_class_infos(commodity_code: Optional[str] = None,
                                 db_instance_id: Optional[str] = None,
                                 infos: Optional[Sequence[GetInstanceClassInfosInfo]] = None,
                                 order_type: Optional[str] = None,
                                 output_file: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetInstanceClassInfosResult
    def get_instance_class_infos_output(commodity_code: Optional[pulumi.Input[str]] = None,
                                 db_instance_id: Optional[pulumi.Input[str]] = None,
                                 infos: Optional[pulumi.Input[Sequence[pulumi.Input[GetInstanceClassInfosInfoArgs]]]] = None,
                                 order_type: Optional[pulumi.Input[str]] = None,
                                 output_file: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetInstanceClassInfosResult]
    func GetInstanceClassInfos(ctx *Context, args *GetInstanceClassInfosArgs, opts ...InvokeOption) (*GetInstanceClassInfosResult, error)
    func GetInstanceClassInfosOutput(ctx *Context, args *GetInstanceClassInfosOutputArgs, opts ...InvokeOption) GetInstanceClassInfosResultOutput

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

    public static class GetInstanceClassInfos 
    {
        public static Task<GetInstanceClassInfosResult> InvokeAsync(GetInstanceClassInfosArgs args, InvokeOptions? opts = null)
        public static Output<GetInstanceClassInfosResult> Invoke(GetInstanceClassInfosInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstanceClassInfosResult> getInstanceClassInfos(GetInstanceClassInfosArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:rds/getInstanceClassInfos:getInstanceClassInfos
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CommodityCode string
    The commodity code of the instance. Valid values:

    • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
    • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
    • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
    • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
    • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
    • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
    • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
    • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
    OrderType string
    FThe type of order that you want to query. Valid values:

    • BUY: specifies the query orders that are used to purchase instances.
    • UPGRADE: specifies the query orders that are used to change the specifications of instances.
    • RENEW: specifies the query orders that are used to renew instances.
    • CONVERT: specifies the query orders that are used to change the billing methods of instances.
    DbInstanceId string
    The ID of the primary instance.
    Infos List<Pulumi.AliCloud.Rds.Inputs.GetInstanceClassInfosInfo>
    A list of Rds available resource. Each element contains the following attributes:
    OutputFile string

    File name where to save data source results (after running pulumi up).

    NOTE: If you use the CommodityCode parameter to query the instance types that are available to read-only instances, you must specify the DBInstanceId parameter.

    CommodityCode string
    The commodity code of the instance. Valid values:

    • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
    • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
    • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
    • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
    • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
    • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
    • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
    • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
    OrderType string
    FThe type of order that you want to query. Valid values:

    • BUY: specifies the query orders that are used to purchase instances.
    • UPGRADE: specifies the query orders that are used to change the specifications of instances.
    • RENEW: specifies the query orders that are used to renew instances.
    • CONVERT: specifies the query orders that are used to change the billing methods of instances.
    DbInstanceId string
    The ID of the primary instance.
    Infos []GetInstanceClassInfosInfo
    A list of Rds available resource. Each element contains the following attributes:
    OutputFile string

    File name where to save data source results (after running pulumi up).

    NOTE: If you use the CommodityCode parameter to query the instance types that are available to read-only instances, you must specify the DBInstanceId parameter.

    commodityCode String
    The commodity code of the instance. Valid values:

    • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
    • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
    • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
    • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
    • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
    • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
    • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
    • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
    orderType String
    FThe type of order that you want to query. Valid values:

    • BUY: specifies the query orders that are used to purchase instances.
    • UPGRADE: specifies the query orders that are used to change the specifications of instances.
    • RENEW: specifies the query orders that are used to renew instances.
    • CONVERT: specifies the query orders that are used to change the billing methods of instances.
    dbInstanceId String
    The ID of the primary instance.
    infos List<GetInstanceClassInfosInfo>
    A list of Rds available resource. Each element contains the following attributes:
    outputFile String

    File name where to save data source results (after running pulumi up).

    NOTE: If you use the CommodityCode parameter to query the instance types that are available to read-only instances, you must specify the DBInstanceId parameter.

    commodityCode string
    The commodity code of the instance. Valid values:

    • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
    • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
    • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
    • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
    • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
    • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
    • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
    • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
    orderType string
    FThe type of order that you want to query. Valid values:

    • BUY: specifies the query orders that are used to purchase instances.
    • UPGRADE: specifies the query orders that are used to change the specifications of instances.
    • RENEW: specifies the query orders that are used to renew instances.
    • CONVERT: specifies the query orders that are used to change the billing methods of instances.
    dbInstanceId string
    The ID of the primary instance.
    infos GetInstanceClassInfosInfo[]
    A list of Rds available resource. Each element contains the following attributes:
    outputFile string

    File name where to save data source results (after running pulumi up).

    NOTE: If you use the CommodityCode parameter to query the instance types that are available to read-only instances, you must specify the DBInstanceId parameter.

    commodity_code str
    The commodity code of the instance. Valid values:

    • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
    • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
    • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
    • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
    • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
    • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
    • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
    • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
    order_type str
    FThe type of order that you want to query. Valid values:

    • BUY: specifies the query orders that are used to purchase instances.
    • UPGRADE: specifies the query orders that are used to change the specifications of instances.
    • RENEW: specifies the query orders that are used to renew instances.
    • CONVERT: specifies the query orders that are used to change the billing methods of instances.
    db_instance_id str
    The ID of the primary instance.
    infos Sequence[GetInstanceClassInfosInfo]
    A list of Rds available resource. Each element contains the following attributes:
    output_file str

    File name where to save data source results (after running pulumi up).

    NOTE: If you use the CommodityCode parameter to query the instance types that are available to read-only instances, you must specify the DBInstanceId parameter.

    commodityCode String
    The commodity code of the instance. Valid values:

    • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
    • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
    • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
    • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
    • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
    • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
    • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
    • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
    orderType String
    FThe type of order that you want to query. Valid values:

    • BUY: specifies the query orders that are used to purchase instances.
    • UPGRADE: specifies the query orders that are used to change the specifications of instances.
    • RENEW: specifies the query orders that are used to renew instances.
    • CONVERT: specifies the query orders that are used to change the billing methods of instances.
    dbInstanceId String
    The ID of the primary instance.
    infos List<Property Map>
    A list of Rds available resource. Each element contains the following attributes:
    outputFile String

    File name where to save data source results (after running pulumi up).

    NOTE: If you use the CommodityCode parameter to query the instance types that are available to read-only instances, you must specify the DBInstanceId parameter.

    getInstanceClassInfos Result

    The following output properties are available:

    CommodityCode string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Rds instance class codes.
    OrderType string
    DbInstanceId string
    Infos List<Pulumi.AliCloud.Rds.Outputs.GetInstanceClassInfosInfo>
    A list of Rds available resource. Each element contains the following attributes:
    OutputFile string
    CommodityCode string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Rds instance class codes.
    OrderType string
    DbInstanceId string
    Infos []GetInstanceClassInfosInfo
    A list of Rds available resource. Each element contains the following attributes:
    OutputFile string
    commodityCode String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Rds instance class codes.
    orderType String
    dbInstanceId String
    infos List<GetInstanceClassInfosInfo>
    A list of Rds available resource. Each element contains the following attributes:
    outputFile String
    commodityCode string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Rds instance class codes.
    orderType string
    dbInstanceId string
    infos GetInstanceClassInfosInfo[]
    A list of Rds available resource. Each element contains the following attributes:
    outputFile string
    commodity_code str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Rds instance class codes.
    order_type str
    db_instance_id str
    infos Sequence[GetInstanceClassInfosInfo]
    A list of Rds available resource. Each element contains the following attributes:
    output_file str
    commodityCode String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Rds instance class codes.
    orderType String
    dbInstanceId String
    infos List<Property Map>
    A list of Rds available resource. Each element contains the following attributes:
    outputFile String

    Supporting Types

    GetInstanceClassInfosInfo

    ClassCode string
    The code of the instance type.
    ClassGroup string
    The instance family of the instance.
    Cpu string
    The number of cores that are supported by the instance type. Unit: cores.
    InstructionSetArch string
    The architecture of the instance type.
    MaxConnections string
    The maximum number of connections that are supported by the instance type. Unit: connections.
    MaxIombps string
    The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s.
    MaxIops string
    The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second.
    MemoryClass string
    The memory capacity that is supported by the instance type. Unit: GB.
    ReferencePrice string
    The fee that you must pay for the instance type. Unit: cent (USD).
    ClassCode string
    The code of the instance type.
    ClassGroup string
    The instance family of the instance.
    Cpu string
    The number of cores that are supported by the instance type. Unit: cores.
    InstructionSetArch string
    The architecture of the instance type.
    MaxConnections string
    The maximum number of connections that are supported by the instance type. Unit: connections.
    MaxIombps string
    The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s.
    MaxIops string
    The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second.
    MemoryClass string
    The memory capacity that is supported by the instance type. Unit: GB.
    ReferencePrice string
    The fee that you must pay for the instance type. Unit: cent (USD).
    classCode String
    The code of the instance type.
    classGroup String
    The instance family of the instance.
    cpu String
    The number of cores that are supported by the instance type. Unit: cores.
    instructionSetArch String
    The architecture of the instance type.
    maxConnections String
    The maximum number of connections that are supported by the instance type. Unit: connections.
    maxIombps String
    The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s.
    maxIops String
    The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second.
    memoryClass String
    The memory capacity that is supported by the instance type. Unit: GB.
    referencePrice String
    The fee that you must pay for the instance type. Unit: cent (USD).
    classCode string
    The code of the instance type.
    classGroup string
    The instance family of the instance.
    cpu string
    The number of cores that are supported by the instance type. Unit: cores.
    instructionSetArch string
    The architecture of the instance type.
    maxConnections string
    The maximum number of connections that are supported by the instance type. Unit: connections.
    maxIombps string
    The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s.
    maxIops string
    The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second.
    memoryClass string
    The memory capacity that is supported by the instance type. Unit: GB.
    referencePrice string
    The fee that you must pay for the instance type. Unit: cent (USD).
    class_code str
    The code of the instance type.
    class_group str
    The instance family of the instance.
    cpu str
    The number of cores that are supported by the instance type. Unit: cores.
    instruction_set_arch str
    The architecture of the instance type.
    max_connections str
    The maximum number of connections that are supported by the instance type. Unit: connections.
    max_iombps str
    The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s.
    max_iops str
    The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second.
    memory_class str
    The memory capacity that is supported by the instance type. Unit: GB.
    reference_price str
    The fee that you must pay for the instance type. Unit: cent (USD).
    classCode String
    The code of the instance type.
    classGroup String
    The instance family of the instance.
    cpu String
    The number of cores that are supported by the instance type. Unit: cores.
    instructionSetArch String
    The architecture of the instance type.
    maxConnections String
    The maximum number of connections that are supported by the instance type. Unit: connections.
    maxIombps String
    The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s.
    maxIops String
    The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second.
    memoryClass String
    The memory capacity that is supported by the instance type. Unit: GB.
    referencePrice String
    The fee that you must pay for the instance type. Unit: cent (USD).

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi