get Clusters
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
A collection of arguments for invoking getClusters.
Return
A collection of values returned by getClusters.
See also
Parameters
The description of the ADB cluster.
A regex string to filter results by cluster description.
A list of ADB cluster IDs.
File name where to save data source results (after running pulumi preview
).
The status of the cluster. Valid values: Preparing
, Creating
, Restoring
, Running
, Deleting
, ClassChanging
, NetAddressCreating
, NetAddressDeleting
. For more information, see Cluster status.
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.
Return
A collection of values returned by getClusters.
See also
Parameters
Builder for com.pulumi.alicloud.adb.kotlin.inputs.GetClustersPlainArgs.