1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cassandra
  5. getClusters
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.cassandra.getClusters

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    cassandra = alicloud.cassandra.get_clusters(name_regex="tf_testAccCassandra")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      cassandra:
        fn::invoke:
          Function: alicloud:cassandra:getClusters
          Arguments:
            nameRegex: tf_testAccCassandra
    

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

    > 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)
    }
    public static CompletableFuture<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cassandra/getClusters:getClusters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    The list of Cassandra cluster ids.
    NameRegex 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, object>
    A mapping of tags to assign to the resource.
    Ids []string
    The list of Cassandra cluster ids.
    NameRegex 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]interface{}
    A mapping of tags to assign to the resource.
    ids List<String>
    The list of Cassandra cluster ids.
    nameRegex 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,Object>
    A mapping of tags to assign to the resource.
    ids string[]
    The list of Cassandra cluster ids.
    nameRegex 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]: any}
    A mapping of tags to assign to the resource.
    ids Sequence[str]
    The list of Cassandra cluster ids.
    name_regex 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, Any]
    A mapping of tags to assign to the resource.
    ids List<String>
    The list of Cassandra cluster ids.
    nameRegex 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<Any>
    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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>
    A mapping of tags to assign to the resource.

    Supporting Types

    GetClustersCluster

    ClusterId string
    The ID of the Cassandra cluster.
    ClusterName string
    The name of the Cassandra cluster.
    CreatedTime string
    DataCenterCount int
    The count of data centers
    ExpireTime string
    The expire time of the cluster.
    Id string
    The ID of the Cassandra cluster.
    LockMode string
    The lock mode of the cluster.
    MajorVersion string
    The major version of the cluster.
    MinorVersion string
    The minor version of the cluster.
    PayType string
    Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
    Status string
    Status of the cluster.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    ClusterId string
    The ID of the Cassandra cluster.
    ClusterName string
    The name of the Cassandra cluster.
    CreatedTime string
    DataCenterCount int
    The count of data centers
    ExpireTime string
    The expire time of the cluster.
    Id string
    The ID of the Cassandra cluster.
    LockMode string
    The lock mode of the cluster.
    MajorVersion string
    The major version of the cluster.
    MinorVersion string
    The minor version of the cluster.
    PayType string
    Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
    Status string
    Status of the cluster.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    clusterId String
    The ID of the Cassandra cluster.
    clusterName String
    The name of the Cassandra cluster.
    createdTime String
    dataCenterCount Integer
    The count of data centers
    expireTime String
    The expire time of the cluster.
    id String
    The ID of the Cassandra cluster.
    lockMode String
    The lock mode of the cluster.
    majorVersion String
    The major version of the cluster.
    minorVersion String
    The minor version of the cluster.
    payType String
    Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
    status String
    Status of the cluster.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    clusterId string
    The ID of the Cassandra cluster.
    clusterName string
    The name of the Cassandra cluster.
    createdTime string
    dataCenterCount number
    The count of data centers
    expireTime string
    The expire time of the cluster.
    id string
    The ID of the Cassandra cluster.
    lockMode string
    The lock mode of the cluster.
    majorVersion string
    The major version of the cluster.
    minorVersion string
    The minor version of the cluster.
    payType string
    Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
    status string
    Status of the cluster.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    cluster_id str
    The ID of the Cassandra cluster.
    cluster_name str
    The name of the Cassandra cluster.
    created_time str
    data_center_count int
    The count of data centers
    expire_time str
    The expire time of the cluster.
    id str
    The ID of the Cassandra cluster.
    lock_mode str
    The lock mode of the cluster.
    major_version str
    The major version of the cluster.
    minor_version str
    The minor version of the cluster.
    pay_type str
    Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
    status str
    Status of the cluster.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    clusterId String
    The ID of the Cassandra cluster.
    clusterName String
    The name of the Cassandra cluster.
    createdTime String
    dataCenterCount Number
    The count of data centers
    expireTime String
    The expire time of the cluster.
    id String
    The ID of the Cassandra cluster.
    lockMode String
    The lock mode of the cluster.
    majorVersion String
    The major version of the cluster.
    minorVersion String
    The minor version of the cluster.
    payType String
    Billing method. Value options are Subscription for Pay-As-You-Go and PayAsYouGo for yearly or monthly subscription.
    status String
    Status of the cluster.
    tags Map<Any>
    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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi