1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cassandra
  5. getClusters
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cassandra.getClusters

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

The alicloud.cassandra.getClusters data source provides a collection of Cassandra clusters available in Alicloud account. Filters support regular expression for the cluster name, ids or tags.

NOTE: Available in 1.88.0+.

DEPRECATED: This data source has been deprecated from version 1.220.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const cassandra = alicloud.cassandra.getClusters({
    nameRegex: "tf_testAccCassandra",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

cassandra = alicloud.cassandra.get_clusters(name_regex="tf_testAccCassandra")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cassandra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cassandra.GetClusters(ctx, &cassandra.GetClustersArgs{
			NameRegex: pulumi.StringRef("tf_testAccCassandra"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var cassandra = AliCloud.Cassandra.GetClusters.Invoke(new()
    {
        NameRegex = "tf_testAccCassandra",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cassandra.CassandraFunctions;
import com.pulumi.alicloud.cassandra.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 cassandra = CassandraFunctions.getClusters(GetClustersArgs.builder()
            .nameRegex("tf_testAccCassandra")
            .build());

    }
}
Copy
variables:
  cassandra:
    fn::invoke:
      function: alicloud:cassandra:getClusters
      arguments:
        nameRegex: tf_testAccCassandra
Copy

Using getClusters

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 getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>
function getClustersOutput(args: GetClustersOutputArgs, opts?: InvokeOptions): Output<GetClustersResult>
Copy
def get_clusters(ids: Optional[Sequence[str]] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetClustersResult
def get_clusters_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name_regex: Optional[pulumi.Input[str]] = None,
                 output_file: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetClustersResult]
Copy
func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)
func GetClustersOutput(ctx *Context, args *GetClustersOutputArgs, opts ...InvokeOption) GetClustersResultOutput
Copy

> Note: This function is named GetClusters in the Go SDK.

public static class GetClusters 
{
    public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
    public static Output<GetClustersResult> Invoke(GetClustersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
public static Output<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cassandra/getClusters:getClusters
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
The list of Cassandra cluster ids.
NameRegex Changes to this property will trigger replacement. string
A regex string to apply to the cluster name.
OutputFile string
The name of file that can save the collection of clusters after running pulumi preview.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
Ids Changes to this property will trigger replacement. []string
The list of Cassandra cluster ids.
NameRegex Changes to this property will trigger replacement. string
A regex string to apply to the cluster name.
OutputFile string
The name of file that can save the collection of clusters after running pulumi preview.
Tags map[string]string
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. List<String>
The list of Cassandra cluster ids.
nameRegex Changes to this property will trigger replacement. String
A regex string to apply to the cluster name.
outputFile String
The name of file that can save the collection of clusters after running pulumi preview.
tags Map<String,String>
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. string[]
The list of Cassandra cluster ids.
nameRegex Changes to this property will trigger replacement. string
A regex string to apply to the cluster name.
outputFile string
The name of file that can save the collection of clusters after running pulumi preview.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. Sequence[str]
The list of Cassandra cluster ids.
name_regex Changes to this property will trigger replacement. str
A regex string to apply to the cluster name.
output_file str
The name of file that can save the collection of clusters after running pulumi preview.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
ids Changes to this property will trigger replacement. List<String>
The list of Cassandra cluster ids.
nameRegex Changes to this property will trigger replacement. String
A regex string to apply to the cluster name.
outputFile String
The name of file that can save the collection of clusters after running pulumi preview.
tags Map<String>
A mapping of tags to assign to the resource.

getClusters Result

The following output properties are available:

Clusters List<Pulumi.AliCloud.Cassandra.Outputs.GetClustersCluster>
A list of Cassandra clusters. Its every element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
The list of Cassandra cluster ids.
Names List<string>
The name list of Cassandra clusters.
NameRegex string
OutputFile string
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
Clusters []GetClustersCluster
A list of Cassandra clusters. Its every element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
The list of Cassandra cluster ids.
Names []string
The name list of Cassandra clusters.
NameRegex string
OutputFile string
Tags map[string]string
A mapping of tags to assign to the resource.
clusters List<GetClustersCluster>
A list of Cassandra clusters. Its every element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
The list of Cassandra cluster ids.
names List<String>
The name list of Cassandra clusters.
nameRegex String
outputFile String
tags Map<String,String>
A mapping of tags to assign to the resource.
clusters GetClustersCluster[]
A list of Cassandra clusters. Its every element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
The list of Cassandra cluster ids.
names string[]
The name list of Cassandra clusters.
nameRegex string
outputFile string
tags {[key: string]: string}
A mapping of tags to assign to the resource.
clusters Sequence[GetClustersCluster]
A list of Cassandra clusters. Its every element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
The list of Cassandra cluster ids.
names Sequence[str]
The name list of Cassandra clusters.
name_regex str
output_file str
tags Mapping[str, str]
A mapping of tags to assign to the resource.
clusters List<Property Map>
A list of Cassandra clusters. Its every element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
The list of Cassandra cluster ids.
names List<String>
The name list of Cassandra clusters.
nameRegex String
outputFile String
tags Map<String>
A mapping of tags to assign to the resource.

Supporting Types

GetClustersCluster

ClusterId This property is required. string
The ID of the Cassandra cluster.
ClusterName This property is required. string
The name of the Cassandra cluster.
CreatedTime This property is required. string
DataCenterCount This property is required. int
The count of data centers
ExpireTime This property is required. string
The expire time of the cluster.
Id This property is required. string
The ID of the Cassandra cluster.
LockMode This property is required. string
The lock mode of the cluster.
MajorVersion This property is required. string
The major version of the cluster.
MinorVersion This property is required. string
The minor version of the cluster.
PayType This property is required. string
Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
Status This property is required. string
Status of the cluster.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
ClusterId This property is required. string
The ID of the Cassandra cluster.
ClusterName This property is required. string
The name of the Cassandra cluster.
CreatedTime This property is required. string
DataCenterCount This property is required. int
The count of data centers
ExpireTime This property is required. string
The expire time of the cluster.
Id This property is required. string
The ID of the Cassandra cluster.
LockMode This property is required. string
The lock mode of the cluster.
MajorVersion This property is required. string
The major version of the cluster.
MinorVersion This property is required. string
The minor version of the cluster.
PayType This property is required. string
Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
Status This property is required. string
Status of the cluster.
Tags map[string]string
A mapping of tags to assign to the resource.
clusterId This property is required. String
The ID of the Cassandra cluster.
clusterName This property is required. String
The name of the Cassandra cluster.
createdTime This property is required. String
dataCenterCount This property is required. Integer
The count of data centers
expireTime This property is required. String
The expire time of the cluster.
id This property is required. String
The ID of the Cassandra cluster.
lockMode This property is required. String
The lock mode of the cluster.
majorVersion This property is required. String
The major version of the cluster.
minorVersion This property is required. String
The minor version of the cluster.
payType This property is required. String
Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
status This property is required. String
Status of the cluster.
tags Map<String,String>
A mapping of tags to assign to the resource.
clusterId This property is required. string
The ID of the Cassandra cluster.
clusterName This property is required. string
The name of the Cassandra cluster.
createdTime This property is required. string
dataCenterCount This property is required. number
The count of data centers
expireTime This property is required. string
The expire time of the cluster.
id This property is required. string
The ID of the Cassandra cluster.
lockMode This property is required. string
The lock mode of the cluster.
majorVersion This property is required. string
The major version of the cluster.
minorVersion This property is required. string
The minor version of the cluster.
payType This property is required. string
Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
status This property is required. string
Status of the cluster.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
cluster_id This property is required. str
The ID of the Cassandra cluster.
cluster_name This property is required. str
The name of the Cassandra cluster.
created_time This property is required. str
data_center_count This property is required. int
The count of data centers
expire_time This property is required. str
The expire time of the cluster.
id This property is required. str
The ID of the Cassandra cluster.
lock_mode This property is required. str
The lock mode of the cluster.
major_version This property is required. str
The major version of the cluster.
minor_version This property is required. str
The minor version of the cluster.
pay_type This property is required. str
Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
status This property is required. str
Status of the cluster.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
clusterId This property is required. String
The ID of the Cassandra cluster.
clusterName This property is required. String
The name of the Cassandra cluster.
createdTime This property is required. String
dataCenterCount This property is required. Number
The count of data centers
expireTime This property is required. String
The expire time of the cluster.
id This property is required. String
The ID of the Cassandra cluster.
lockMode This property is required. String
The lock mode of the cluster.
majorVersion This property is required. String
The major version of the cluster.
minorVersion This property is required. String
The minor version of the cluster.
payType This property is required. String
Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
status This property is required. String
Status of the cluster.
tags Map<String>
A mapping of tags to assign to the resource.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi