Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getNodeClasses

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

NOTE: Available in v1.81.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var resourcesZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
        {
            AvailableResourceCreation = "PolarDB",
        }));
        var resourcesNodeClasses = resourcesZones.Apply(resourcesZones => Output.Create(AliCloud.PolarDB.GetNodeClasses.InvokeAsync(new AliCloud.PolarDB.GetNodeClassesArgs
        {
            ZoneId = resourcesZones.Zones?[0]?.Id,
            PayType = "PostPaid",
            DbType = "MySQL",
            DbVersion = "5.6",
        })));
        this.PolardbNodeClasses = resourcesNodeClasses.Apply(resourcesNodeClasses => resourcesNodeClasses.Classes);
    }

    [Output("polardbNodeClasses")]
    public Output<string> PolardbNodeClasses { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"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 {
		resourcesZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("PolarDB"),
		}, nil)
		if err != nil {
			return err
		}
		resourcesNodeClasses, err := polardb.GetNodeClasses(ctx, &polardb.GetNodeClassesArgs{
			ZoneId:    pulumi.StringRef(resourcesZones.Zones[0].Id),
			PayType:   "PostPaid",
			DbType:    pulumi.StringRef("MySQL"),
			DbVersion: pulumi.StringRef("5.6"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("polardbNodeClasses", resourcesNodeClasses.Classes)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.adb.inputs.GetZonesArgs;
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 resourcesZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("PolarDB")
            .build());

        final var resourcesNodeClasses = PolardbFunctions.getNodeClasses(GetNodeClassesArgs.builder()
            .zoneId(resourcesZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .payType("PostPaid")
            .dbType("MySQL")
            .dbVersion("5.6")
            .build());

        ctx.export("polardbNodeClasses", resourcesNodeClasses.applyValue(getNodeClassesResult -> getNodeClassesResult.classes()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

resources_zones = alicloud.get_zones(available_resource_creation="PolarDB")
resources_node_classes = alicloud.polardb.get_node_classes(zone_id=resources_zones.zones[0].id,
    pay_type="PostPaid",
    db_type="MySQL",
    db_version="5.6")
pulumi.export("polardbNodeClasses", resources_node_classes.classes)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const resourcesZones = alicloud.getZones({
    availableResourceCreation: "PolarDB",
});
const resourcesNodeClasses = resourcesZones.then(resourcesZones => alicloud.polardb.getNodeClasses({
    zoneId: resourcesZones.zones?[0]?.id,
    payType: "PostPaid",
    dbType: "MySQL",
    dbVersion: "5.6",
}));
export const polardbNodeClasses = resourcesNodeClasses.then(resourcesNodeClasses => resourcesNodeClasses.classes);
variables:
  resourcesZones:
    Fn::Invoke:
      Function: alicloud:getZones
      Arguments:
        availableResourceCreation: PolarDB
  resourcesNodeClasses:
    Fn::Invoke:
      Function: alicloud:polardb:getNodeClasses
      Arguments:
        zoneId: ${resourcesZones.zones[0].id}
        payType: PostPaid
        dbType: MySQL
        dbVersion: 5.6
outputs:
  polardbNodeClasses: ${resourcesNodeClasses.classes}

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(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(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.

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
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.

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
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.

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
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.

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
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.

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
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.

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
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
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
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
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
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
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
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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.