1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. polardb
  5. getNodeClasses
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.polardb.getNodeClasses

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the PolarDB node classes resource available info of Alibaba Cloud.

    NOTE: Available since v1.81.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const resources = alicloud.polardb.getNodeClasses({
        payType: "PostPaid",
        dbType: "MySQL",
        dbVersion: "5.6",
    });
    export const polardbNodeClasses = resources.then(resources => resources.classes);
    export const polardbAvailableZoneId = resources.then(resources => resources.classes?.[0]?.zoneId);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    resources = alicloud.polardb.get_node_classes(pay_type="PostPaid",
        db_type="MySQL",
        db_version="5.6")
    pulumi.export("polardbNodeClasses", resources.classes)
    pulumi.export("polardbAvailableZoneId", resources.classes[0].zone_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		resources, err := polardb.GetNodeClasses(ctx, &polardb.GetNodeClassesArgs{
    			PayType:   "PostPaid",
    			DbType:    pulumi.StringRef("MySQL"),
    			DbVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("polardbNodeClasses", resources.Classes)
    		ctx.Export("polardbAvailableZoneId", resources.Classes[0].ZoneId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var resources = AliCloud.PolarDB.GetNodeClasses.Invoke(new()
        {
            PayType = "PostPaid",
            DbType = "MySQL",
            DbVersion = "5.6",
        });
    
        return new Dictionary<string, object?>
        {
            ["polardbNodeClasses"] = resources.Apply(getNodeClassesResult => getNodeClassesResult.Classes),
            ["polardbAvailableZoneId"] = resources.Apply(getNodeClassesResult => getNodeClassesResult.Classes[0]?.ZoneId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.polardb.PolardbFunctions;
    import com.pulumi.alicloud.polardb.inputs.GetNodeClassesArgs;
    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 = PolardbFunctions.getNodeClasses(GetNodeClassesArgs.builder()
                .payType("PostPaid")
                .dbType("MySQL")
                .dbVersion("5.6")
                .build());
    
            ctx.export("polardbNodeClasses", resources.applyValue(getNodeClassesResult -> getNodeClassesResult.classes()));
            ctx.export("polardbAvailableZoneId", resources.applyValue(getNodeClassesResult -> getNodeClassesResult.classes()[0].zoneId()));
        }
    }
    
    variables:
      resources:
        fn::invoke:
          Function: alicloud:polardb:getNodeClasses
          Arguments:
            payType: PostPaid
            dbType: MySQL
            dbVersion: '5.6'
    outputs:
      polardbNodeClasses: ${resources.classes}
      polardbAvailableZoneId: ${resources.classes[0].zoneId}
    

    Using getNodeClasses

    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 getNodeClasses(args: GetNodeClassesArgs, opts?: InvokeOptions): Promise<GetNodeClassesResult>
    function getNodeClassesOutput(args: GetNodeClassesOutputArgs, opts?: InvokeOptions): Output<GetNodeClassesResult>
    def get_node_classes(category: Optional[str] = None,
                         db_node_class: Optional[str] = None,
                         db_type: Optional[str] = None,
                         db_version: Optional[str] = None,
                         output_file: Optional[str] = None,
                         pay_type: Optional[str] = None,
                         region_id: Optional[str] = None,
                         zone_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNodeClassesResult
    def get_node_classes_output(category: Optional[pulumi.Input[str]] = None,
                         db_node_class: Optional[pulumi.Input[str]] = None,
                         db_type: Optional[pulumi.Input[str]] = None,
                         db_version: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         pay_type: Optional[pulumi.Input[str]] = None,
                         region_id: Optional[pulumi.Input[str]] = None,
                         zone_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetNodeClassesResult]
    func GetNodeClasses(ctx *Context, args *GetNodeClassesArgs, opts ...InvokeOption) (*GetNodeClassesResult, error)
    func GetNodeClassesOutput(ctx *Context, args *GetNodeClassesOutputArgs, opts ...InvokeOption) GetNodeClassesResultOutput

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

    public static class GetNodeClasses 
    {
        public static Task<GetNodeClassesResult> InvokeAsync(GetNodeClassesArgs args, InvokeOptions? opts = null)
        public static Output<GetNodeClassesResult> Invoke(GetNodeClassesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNodeClassesResult> getNodeClasses(GetNodeClassesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:polardb/getNodeClasses:getNodeClasses
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PayType string
    Filter the results by charge type. Valid values: PrePaid and PostPaid.
    Category string
    The PolarDB node cluster series.
    DbNodeClass string
    The PolarDB node class type by the user.
    DbType string
    Database type. Options are MySQL, PostgreSQL, Oracle. If db_type is set, db_version also needs to be set.
    DbVersion string
    Database version required by the user. Value options can refer to the latest docs detail info DBVersion. If db_version is set, db_type also needs to be set.
    OutputFile string
    File name where to save data source results (after running pulumi up).
    RegionId string
    The Region to launch the PolarDB cluster.
    ZoneId string
    The Zone to launch the PolarDB cluster.
    PayType string
    Filter the results by charge type. Valid values: PrePaid and PostPaid.
    Category string
    The PolarDB node cluster series.
    DbNodeClass string
    The PolarDB node class type by the user.
    DbType string
    Database type. Options are MySQL, PostgreSQL, Oracle. If db_type is set, db_version also needs to be set.
    DbVersion string
    Database version required by the user. Value options can refer to the latest docs detail info DBVersion. If db_version is set, db_type also needs to be set.
    OutputFile string
    File name where to save data source results (after running pulumi up).
    RegionId string
    The Region to launch the PolarDB cluster.
    ZoneId string
    The Zone to launch the PolarDB cluster.
    payType String
    Filter the results by charge type. Valid values: PrePaid and PostPaid.
    category String
    The PolarDB node cluster series.
    dbNodeClass String
    The PolarDB node class type by the user.
    dbType String
    Database type. Options are MySQL, PostgreSQL, Oracle. If db_type is set, db_version also needs to be set.
    dbVersion String
    Database version required by the user. Value options can refer to the latest docs detail info DBVersion. If db_version is set, db_type also needs to be set.
    outputFile String
    File name where to save data source results (after running pulumi up).
    regionId String
    The Region to launch the PolarDB cluster.
    zoneId String
    The Zone to launch the PolarDB cluster.
    payType string
    Filter the results by charge type. Valid values: PrePaid and PostPaid.
    category string
    The PolarDB node cluster series.
    dbNodeClass string
    The PolarDB node class type by the user.
    dbType string
    Database type. Options are MySQL, PostgreSQL, Oracle. If db_type is set, db_version also needs to be set.
    dbVersion string
    Database version required by the user. Value options can refer to the latest docs detail info DBVersion. If db_version is set, db_type also needs to be set.
    outputFile string
    File name where to save data source results (after running pulumi up).
    regionId string
    The Region to launch the PolarDB cluster.
    zoneId string
    The Zone to launch the PolarDB cluster.
    pay_type str
    Filter the results by charge type. Valid values: PrePaid and PostPaid.
    category str
    The PolarDB node cluster series.
    db_node_class str
    The PolarDB node class type by the user.
    db_type str
    Database type. Options are MySQL, PostgreSQL, Oracle. If db_type is set, db_version also needs to be set.
    db_version str
    Database version required by the user. Value options can refer to the latest docs detail info DBVersion. If db_version is set, db_type also needs to be set.
    output_file str
    File name where to save data source results (after running pulumi up).
    region_id str
    The Region to launch the PolarDB cluster.
    zone_id str
    The Zone to launch the PolarDB cluster.
    payType String
    Filter the results by charge type. Valid values: PrePaid and PostPaid.
    category String
    The PolarDB node cluster series.
    dbNodeClass String
    The PolarDB node class type by the user.
    dbType String
    Database type. Options are MySQL, PostgreSQL, Oracle. If db_type is set, db_version also needs to be set.
    dbVersion String
    Database version required by the user. Value options can refer to the latest docs detail info DBVersion. If db_version is set, db_type also needs to be set.
    outputFile String
    File name where to save data source results (after running pulumi up).
    regionId String
    The Region to launch the PolarDB cluster.
    zoneId String
    The Zone to launch the PolarDB cluster.

    getNodeClasses Result

    The following output properties are available:

    Classes List<Pulumi.AliCloud.PolarDB.Outputs.GetNodeClassesClass>
    A list of PolarDB node classes. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    PayType string
    Category string
    DbNodeClass string
    PolarDB node available class.
    DbType string
    DbVersion string
    OutputFile string
    RegionId string
    ZoneId string
    The Zone to launch the PolarDB cluster.
    Classes []GetNodeClassesClass
    A list of PolarDB node classes. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    PayType string
    Category string
    DbNodeClass string
    PolarDB node available class.
    DbType string
    DbVersion string
    OutputFile string
    RegionId string
    ZoneId string
    The Zone to launch the PolarDB cluster.
    classes List<GetNodeClassesClass>
    A list of PolarDB node classes. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    payType String
    category String
    dbNodeClass String
    PolarDB node available class.
    dbType String
    dbVersion String
    outputFile String
    regionId String
    zoneId String
    The Zone to launch the PolarDB cluster.
    classes GetNodeClassesClass[]
    A list of PolarDB node classes. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    payType string
    category string
    dbNodeClass string
    PolarDB node available class.
    dbType string
    dbVersion string
    outputFile string
    regionId string
    zoneId string
    The Zone to launch the PolarDB cluster.
    classes Sequence[GetNodeClassesClass]
    A list of PolarDB node classes. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    pay_type str
    category str
    db_node_class str
    PolarDB node available class.
    db_type str
    db_version str
    output_file str
    region_id str
    zone_id str
    The Zone to launch the PolarDB cluster.
    classes List<Property Map>
    A list of PolarDB node classes. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    payType String
    category String
    dbNodeClass String
    PolarDB node available class.
    dbType String
    dbVersion String
    outputFile String
    regionId String
    zoneId String
    The Zone to launch the PolarDB cluster.

    Supporting Types

    GetNodeClassesClass

    SupportedEngines List<Pulumi.AliCloud.PolarDB.Inputs.GetNodeClassesClassSupportedEngine>
    A list of PolarDB node classes in the zone.
    ZoneId string
    The Zone to launch the PolarDB cluster.
    SupportedEngines []GetNodeClassesClassSupportedEngine
    A list of PolarDB node classes in the zone.
    ZoneId string
    The Zone to launch the PolarDB cluster.
    supportedEngines List<GetNodeClassesClassSupportedEngine>
    A list of PolarDB node classes in the zone.
    zoneId String
    The Zone to launch the PolarDB cluster.
    supportedEngines GetNodeClassesClassSupportedEngine[]
    A list of PolarDB node classes in the zone.
    zoneId string
    The Zone to launch the PolarDB cluster.
    supported_engines Sequence[GetNodeClassesClassSupportedEngine]
    A list of PolarDB node classes in the zone.
    zone_id str
    The Zone to launch the PolarDB cluster.
    supportedEngines List<Property Map>
    A list of PolarDB node classes in the zone.
    zoneId String
    The Zone to launch the PolarDB cluster.

    GetNodeClassesClassSupportedEngine

    AvailableResources List<Pulumi.AliCloud.PolarDB.Inputs.GetNodeClassesClassSupportedEngineAvailableResource>
    A list of PolarDB node available classes.
    Engine string
    In the zone, the database type supports classes in the following available_resources.
    AvailableResources []GetNodeClassesClassSupportedEngineAvailableResource
    A list of PolarDB node available classes.
    Engine string
    In the zone, the database type supports classes in the following available_resources.
    availableResources List<GetNodeClassesClassSupportedEngineAvailableResource>
    A list of PolarDB node available classes.
    engine String
    In the zone, the database type supports classes in the following available_resources.
    availableResources GetNodeClassesClassSupportedEngineAvailableResource[]
    A list of PolarDB node available classes.
    engine string
    In the zone, the database type supports classes in the following available_resources.
    available_resources Sequence[GetNodeClassesClassSupportedEngineAvailableResource]
    A list of PolarDB node available classes.
    engine str
    In the zone, the database type supports classes in the following available_resources.
    availableResources List<Property Map>
    A list of PolarDB node available classes.
    engine String
    In the zone, the database type supports classes in the following available_resources.

    GetNodeClassesClassSupportedEngineAvailableResource

    DbNodeClass string
    The PolarDB node class type by the user.
    DbNodeClass string
    The PolarDB node class type by the user.
    dbNodeClass String
    The PolarDB node class type by the user.
    dbNodeClass string
    The PolarDB node class type by the user.
    db_node_class str
    The PolarDB node class type by the user.
    dbNodeClass String
    The PolarDB node class type by the user.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi