GetClusters

The alicloud.adb.getClusters data source provides a collection of ADB clusters available in Alibaba Cloud account. Filters support regular expression for the cluster description, searches by tags, and other filters which are listed below.

NOTE: Available in v1.71.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var adbClustersDs = Output.Create(AliCloud.Adb.GetClusters.InvokeAsync(new AliCloud.Adb.GetClustersArgs
        {
            DescriptionRegex = "am-\\w+",
            Status = "Running",
        }));
        this.FirstAdbClusterId = adbClustersDs.Apply(adbClustersDs => adbClustersDs.Clusters[0].Id);
    }

    [Output("firstAdbClusterId")]
    public Output<string> FirstAdbClusterId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

adb_clusters_ds = alicloud.adb.get_clusters(description_regex="am-\\w+",
    status="Running")
pulumi.export("firstAdbClusterId", adb_clusters_ds.clusters[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const adbClustersDs = pulumi.output(alicloud.adb.getClusters({
    descriptionRegex: "am-\\w+",
    status: "Running",
}, { async: true }));

export const firstAdbClusterId = adbClustersDs.clusters[0].id;

Using GetClusters

function getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>
function  get_clusters(description_regex=None, ids=None, output_file=None, tags=None, opts=None)
func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)
public static class GetClusters {
    public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DescriptionRegex string

A regex string to filter results by cluster description.

Ids List<string>

A list of ADB cluster IDs.

OutputFile string
Tags Dictionary<string, object>

A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.

DescriptionRegex string

A regex string to filter results by cluster description.

Ids []string

A list of ADB cluster IDs.

OutputFile string
Tags map[string]interface{}

A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.

descriptionRegex string

A regex string to filter results by cluster description.

ids string[]

A list of ADB cluster IDs.

outputFile string
tags {[key: string]: any}

A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.

description_regex str

A regex string to filter results by cluster description.

ids List[str]

A list of ADB cluster IDs.

output_file str
tags Dict[str, Any]

A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.

GetClusters Result

The following output properties are available:

Clusters List<Pulumi.AliCloud.Adb.Outputs.GetClustersCluster>

A list of ADB clusters. Each element contains the following attributes:

Descriptions List<string>

A list of ADB cluster descriptions.

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of ADB cluster IDs.

DescriptionRegex string
OutputFile string
Tags Dictionary<string, object>
Clusters []GetClustersCluster

A list of ADB clusters. Each element contains the following attributes:

Descriptions []string

A list of ADB cluster descriptions.

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of ADB cluster IDs.

DescriptionRegex string
OutputFile string
Tags map[string]interface{}
clusters GetClustersCluster[]

A list of ADB clusters. Each element contains the following attributes:

descriptions string[]

A list of ADB cluster descriptions.

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of ADB cluster IDs.

descriptionRegex string
outputFile string
tags {[key: string]: any}
clusters List[GetClustersCluster]

A list of ADB clusters. Each element contains the following attributes:

descriptions List[str]

A list of ADB cluster descriptions.

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of ADB cluster IDs.

description_regex str
output_file str
tags Dict[str, Any]

Supporting Types

GetClustersCluster

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ChargeType string

Billing method. Value options: PostPaid for Pay-As-You-Go and PrePaid for subscription.

CreateTime string

The CreateTime of the ADB cluster.

DbNodeClass string

The DBNodeClass of the ADB cluster.

DbNodeCount int

The DBNodeCount of the ADB cluster.

DbNodeStorage int

The DBNodeStorage of the ADB cluster.

Description string

The description of the ADB cluster.

ExpireTime string

Expiration time. Pay-As-You-Go clusters never expire.

Expired string

The expired of the ADB cluster.

Id string

The ID of the ADB cluster.

LockMode string

The LockMode of the ADB cluster.

NetworkType string

The DBClusterNetworkType of the ADB cluster.

RegionId string

Region ID the cluster belongs to.

Status string

Status of the cluster.

VpcId string

ID of the VPC the cluster belongs to.

ZoneId string

The ZoneId of the ADB cluster.

ChargeType string

Billing method. Value options: PostPaid for Pay-As-You-Go and PrePaid for subscription.

CreateTime string

The CreateTime of the ADB cluster.

DbNodeClass string

The DBNodeClass of the ADB cluster.

DbNodeCount int

The DBNodeCount of the ADB cluster.

DbNodeStorage int

The DBNodeStorage of the ADB cluster.

Description string

The description of the ADB cluster.

ExpireTime string

Expiration time. Pay-As-You-Go clusters never expire.

Expired string

The expired of the ADB cluster.

Id string

The ID of the ADB cluster.

LockMode string

The LockMode of the ADB cluster.

NetworkType string

The DBClusterNetworkType of the ADB cluster.

RegionId string

Region ID the cluster belongs to.

Status string

Status of the cluster.

VpcId string

ID of the VPC the cluster belongs to.

ZoneId string

The ZoneId of the ADB cluster.

chargeType string

Billing method. Value options: PostPaid for Pay-As-You-Go and PrePaid for subscription.

createTime string

The CreateTime of the ADB cluster.

dbNodeClass string

The DBNodeClass of the ADB cluster.

dbNodeCount number

The DBNodeCount of the ADB cluster.

dbNodeStorage number

The DBNodeStorage of the ADB cluster.

description string

The description of the ADB cluster.

expireTime string

Expiration time. Pay-As-You-Go clusters never expire.

expired string

The expired of the ADB cluster.

id string

The ID of the ADB cluster.

lockMode string

The LockMode of the ADB cluster.

networkType string

The DBClusterNetworkType of the ADB cluster.

regionId string

Region ID the cluster belongs to.

status string

Status of the cluster.

vpcId string

ID of the VPC the cluster belongs to.

zoneId string

The ZoneId of the ADB cluster.

charge_type str

Billing method. Value options: PostPaid for Pay-As-You-Go and PrePaid for subscription.

create_time str

The CreateTime of the ADB cluster.

db_node_class str

The DBNodeClass of the ADB cluster.

db_node_count float

The DBNodeCount of the ADB cluster.

db_node_storage float

The DBNodeStorage of the ADB cluster.

description str

The description of the ADB cluster.

expire_time str

Expiration time. Pay-As-You-Go clusters never expire.

expired str

The expired of the ADB cluster.

id str

The ID of the ADB cluster.

lockMode str

The LockMode of the ADB cluster.

network_type str

The DBClusterNetworkType of the ADB cluster.

regionId str

Region ID the cluster belongs to.

status str

Status of the cluster.

vpc_id str

ID of the VPC the cluster belongs to.

zone_id str

The ZoneId of the ADB cluster.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.