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.

DEPRECATED: This resource has been deprecated from version 1.121.0. Please use new datasource alicloud_adb_db_clusters. NOTE: Available in v1.71.0+.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.adb.AdbFunctions;
import com.pulumi.alicloud.adb.inputs.GetClustersArgs;
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 adbClustersDs = AdbFunctions.getClusters(GetClustersArgs.builder()
.descriptionRegex("am-\\w+")
.status("Running")
.build());
ctx.export("firstAdbClusterId", adbClustersDs.applyValue(getClustersResult -> getClustersResult.clusters()[0].id()));
}
}

Return

A collection of values returned by getClusters.

Parameters

argument

A collection of arguments for invoking getClusters.


suspend fun getClusters(description: String? = null, descriptionRegex: String? = null, enableDetails: Boolean? = null, ids: List<String>? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, resourceGroupId: String? = null, status: String? = null, tags: Map<String, Any>? = null): GetClustersResult

Return

A collection of values returned by getClusters.

See also

Parameters

description

The description of the ADB cluster.

descriptionRegex

A regex string to filter results by cluster description.

enableDetails
ids

A list of ADB cluster IDs.

outputFile

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

pageNumber
pageSize
resourceGroupId
status

The status of the cluster. Valid values: Preparing, Creating, Restoring, Running, Deleting, ClassChanging, NetAddressCreating, NetAddressDeleting. For more information, see Cluster status.

tags

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.


suspend fun getClusters(argument: suspend GetClustersPlainArgsBuilder.() -> Unit): GetClustersResult

Return

A collection of values returned by getClusters.

See also

Parameters

argument

Builder for com.pulumi.alicloud.adb.kotlin.inputs.GetClustersPlainArgs.