Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.polardb.getNodeClasses
Explore with Pulumi AI
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:
- Pay
Type string - Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. - Category string
- The PolarDB node cluster series.
- Db
Node stringClass - The PolarDB node class type by the user.
- Db
Type string - Database type. Options are
MySQL
,PostgreSQL
,Oracle
. If db_type is set, db_version also needs to be set. - Db
Version 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. - Output
File string - File name where to save data source results (after running
pulumi up
). - Region
Id string - The Region to launch the PolarDB cluster.
- Zone
Id string - The Zone to launch the PolarDB cluster.
- Pay
Type string - Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. - Category string
- The PolarDB node cluster series.
- Db
Node stringClass - The PolarDB node class type by the user.
- Db
Type string - Database type. Options are
MySQL
,PostgreSQL
,Oracle
. If db_type is set, db_version also needs to be set. - Db
Version 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. - Output
File string - File name where to save data source results (after running
pulumi up
). - Region
Id string - The Region to launch the PolarDB cluster.
- Zone
Id string - The Zone to launch the PolarDB cluster.
- pay
Type String - Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. - category String
- The PolarDB node cluster series.
- db
Node StringClass - The PolarDB node class type by the user.
- db
Type String - Database type. Options are
MySQL
,PostgreSQL
,Oracle
. If db_type is set, db_version also needs to be set. - db
Version 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. - output
File String - File name where to save data source results (after running
pulumi up
). - region
Id String - The Region to launch the PolarDB cluster.
- zone
Id String - The Zone to launch the PolarDB cluster.
- pay
Type string - Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. - category string
- The PolarDB node cluster series.
- db
Node stringClass - The PolarDB node class type by the user.
- db
Type string - Database type. Options are
MySQL
,PostgreSQL
,Oracle
. If db_type is set, db_version also needs to be set. - db
Version 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. - output
File string - File name where to save data source results (after running
pulumi up
). - region
Id string - The Region to launch the PolarDB cluster.
- zone
Id string - The Zone to launch the PolarDB cluster.
- pay_
type str - Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. - category str
- The PolarDB node cluster series.
- db_
node_ strclass - 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.
- pay
Type String - Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. - category String
- The PolarDB node cluster series.
- db
Node StringClass - The PolarDB node class type by the user.
- db
Type String - Database type. Options are
MySQL
,PostgreSQL
,Oracle
. If db_type is set, db_version also needs to be set. - db
Version 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. - output
File String - File name where to save data source results (after running
pulumi up
). - region
Id String - The Region to launch the PolarDB cluster.
- zone
Id String - The Zone to launch the PolarDB cluster.
getNodeClasses Result
The following output properties are available:
- Classes
List<Pulumi.
Ali Cloud. Polar DB. Outputs. Get Node Classes Class> - A list of PolarDB node classes. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Pay
Type string - Category string
- Db
Node stringClass - PolarDB node available class.
- Db
Type string - Db
Version string - Output
File string - Region
Id string - Zone
Id string - The Zone to launch the PolarDB cluster.
- Classes
[]Get
Node Classes Class - A list of PolarDB node classes. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Pay
Type string - Category string
- Db
Node stringClass - PolarDB node available class.
- Db
Type string - Db
Version string - Output
File string - Region
Id string - Zone
Id string - The Zone to launch the PolarDB cluster.
- classes
List<Get
Node Classes Class> - A list of PolarDB node classes. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- pay
Type String - category String
- db
Node StringClass - PolarDB node available class.
- db
Type String - db
Version String - output
File String - region
Id String - zone
Id String - The Zone to launch the PolarDB cluster.
- classes
Get
Node Classes Class[] - A list of PolarDB node classes. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- pay
Type string - category string
- db
Node stringClass - PolarDB node available class.
- db
Type string - db
Version string - output
File string - region
Id string - zone
Id string - The Zone to launch the PolarDB cluster.
- classes
Sequence[Get
Node Classes Class] - 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_ strclass - 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.
- pay
Type String - category String
- db
Node StringClass - PolarDB node available class.
- db
Type String - db
Version String - output
File String - region
Id String - zone
Id String - The Zone to launch the PolarDB cluster.
Supporting Types
GetNodeClassesClass
- Supported
Engines List<Pulumi.Ali Cloud. Polar DB. Inputs. Get Node Classes Class Supported Engine> - A list of PolarDB node classes in the zone.
- Zone
Id string - The Zone to launch the PolarDB cluster.
- Supported
Engines []GetNode Classes Class Supported Engine - A list of PolarDB node classes in the zone.
- Zone
Id string - The Zone to launch the PolarDB cluster.
- supported
Engines List<GetNode Classes Class Supported Engine> - A list of PolarDB node classes in the zone.
- zone
Id String - The Zone to launch the PolarDB cluster.
- supported
Engines GetNode Classes Class Supported Engine[] - A list of PolarDB node classes in the zone.
- zone
Id string - The Zone to launch the PolarDB cluster.
- supported_
engines Sequence[GetNode Classes Class Supported Engine] - A list of PolarDB node classes in the zone.
- zone_
id str - The Zone to launch the PolarDB cluster.
- supported
Engines List<Property Map> - A list of PolarDB node classes in the zone.
- zone
Id String - The Zone to launch the PolarDB cluster.
GetNodeClassesClassSupportedEngine
- Available
Resources List<Pulumi.Ali Cloud. Polar DB. Inputs. Get Node Classes Class Supported Engine Available Resource> - A list of PolarDB node available classes.
- Engine string
- In the zone, the database type supports classes in the following available_resources.
- Available
Resources []GetNode Classes Class Supported Engine Available Resource - A list of PolarDB node available classes.
- Engine string
- In the zone, the database type supports classes in the following available_resources.
- available
Resources List<GetNode Classes Class Supported Engine Available Resource> - A list of PolarDB node available classes.
- engine String
- In the zone, the database type supports classes in the following available_resources.
- available
Resources GetNode Classes Class Supported Engine Available Resource[] - 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[GetNode Classes Class Supported Engine Available Resource] - A list of PolarDB node available classes.
- engine str
- In the zone, the database type supports classes in the following available_resources.
- available
Resources 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
- Db
Node stringClass - The PolarDB node class type by the user.
- Db
Node stringClass - The PolarDB node class type by the user.
- db
Node StringClass - The PolarDB node class type by the user.
- db
Node stringClass - The PolarDB node class type by the user.
- db_
node_ strclass - The PolarDB node class type by the user.
- db
Node StringClass - 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.