1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cassandra
  5. getDataCenters
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.cassandra.getDataCenters

Explore with Pulumi AI

Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

The alicloud.cassandra.getDataCenters data source provides a collection of Cassandra Data Centers available in Alicloud account. Filters support regular expression for the cluster name or ids.

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.getDataCenters({
    nameRegex: "tf_testAccCassandra_dc",
    clusterId: "cds-xxxxx",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

cassandra = alicloud.cassandra.get_data_centers(name_regex="tf_testAccCassandra_dc",
    cluster_id="cds-xxxxx")
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.GetDataCenters(ctx, &cassandra.GetDataCentersArgs{
			NameRegex: pulumi.StringRef("tf_testAccCassandra_dc"),
			ClusterId: "cds-xxxxx",
		}, 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.GetDataCenters.Invoke(new()
    {
        NameRegex = "tf_testAccCassandra_dc",
        ClusterId = "cds-xxxxx",
    });

});
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.GetDataCentersArgs;
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.getDataCenters(GetDataCentersArgs.builder()
            .nameRegex("tf_testAccCassandra_dc")
            .clusterId("cds-xxxxx")
            .build());

    }
}
Copy
variables:
  cassandra:
    fn::invoke:
      function: alicloud:cassandra:getDataCenters
      arguments:
        nameRegex: tf_testAccCassandra_dc
        clusterId: cds-xxxxx
Copy

Using getDataCenters

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 getDataCenters(args: GetDataCentersArgs, opts?: InvokeOptions): Promise<GetDataCentersResult>
function getDataCentersOutput(args: GetDataCentersOutputArgs, opts?: InvokeOptions): Output<GetDataCentersResult>
Copy
def get_data_centers(cluster_id: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDataCentersResult
def get_data_centers_output(cluster_id: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDataCentersResult]
Copy
func GetDataCenters(ctx *Context, args *GetDataCentersArgs, opts ...InvokeOption) (*GetDataCentersResult, error)
func GetDataCentersOutput(ctx *Context, args *GetDataCentersOutputArgs, opts ...InvokeOption) GetDataCentersResultOutput
Copy

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

public static class GetDataCenters 
{
    public static Task<GetDataCentersResult> InvokeAsync(GetDataCentersArgs args, InvokeOptions? opts = null)
    public static Output<GetDataCentersResult> Invoke(GetDataCentersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDataCentersResult> getDataCenters(GetDataCentersArgs args, InvokeOptions options)
public static Output<GetDataCentersResult> getDataCenters(GetDataCentersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cassandra/getDataCenters:getDataCenters
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The cluster id of dataCenters belongs to.
Ids Changes to this property will trigger replacement. List<string>
The list of Cassandra data center 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 data centers after running pulumi preview.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The cluster id of dataCenters belongs to.
Ids Changes to this property will trigger replacement. []string
The list of Cassandra data center 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 data centers after running pulumi preview.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The cluster id of dataCenters belongs to.
ids Changes to this property will trigger replacement. List<String>
The list of Cassandra data center 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 data centers after running pulumi preview.
clusterId
This property is required.
Changes to this property will trigger replacement.
string
The cluster id of dataCenters belongs to.
ids Changes to this property will trigger replacement. string[]
The list of Cassandra data center 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 data centers after running pulumi preview.
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
The cluster id of dataCenters belongs to.
ids Changes to this property will trigger replacement. Sequence[str]
The list of Cassandra data center 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 data centers after running pulumi preview.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The cluster id of dataCenters belongs to.
ids Changes to this property will trigger replacement. List<String>
The list of Cassandra data center 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 data centers after running pulumi preview.

getDataCenters Result

The following output properties are available:

Centers List<Pulumi.AliCloud.Cassandra.Outputs.GetDataCentersCenter>
A list of Cassandra data centers. Its every element contains the following attributes:
ClusterId string
The ID of the Cassandra cluster.
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
The list of Cassandra data center ids.
Names List<string>
The name list of Cassandra data centers.
NameRegex string
OutputFile string
Centers []GetDataCentersCenter
A list of Cassandra data centers. Its every element contains the following attributes:
ClusterId string
The ID of the Cassandra cluster.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
The list of Cassandra data center ids.
Names []string
The name list of Cassandra data centers.
NameRegex string
OutputFile string
centers List<GetDataCentersCenter>
A list of Cassandra data centers. Its every element contains the following attributes:
clusterId String
The ID of the Cassandra cluster.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
The list of Cassandra data center ids.
names List<String>
The name list of Cassandra data centers.
nameRegex String
outputFile String
centers GetDataCentersCenter[]
A list of Cassandra data centers. Its every element contains the following attributes:
clusterId string
The ID of the Cassandra cluster.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
The list of Cassandra data center ids.
names string[]
The name list of Cassandra data centers.
nameRegex string
outputFile string
centers Sequence[GetDataCentersCenter]
A list of Cassandra data centers. Its every element contains the following attributes:
cluster_id str
The ID of the Cassandra cluster.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
The list of Cassandra data center ids.
names Sequence[str]
The name list of Cassandra data centers.
name_regex str
output_file str
centers List<Property Map>
A list of Cassandra data centers. Its every element contains the following attributes:
clusterId String
The ID of the Cassandra cluster.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
The list of Cassandra data center ids.
names List<String>
The name list of Cassandra data centers.
nameRegex String
outputFile String

Supporting Types

GetDataCentersCenter

ClusterId This property is required. string
The cluster id of dataCenters belongs to.
CommodityInstance This property is required. string
The commodity ID of the Cassandra dataCenter.
CreatedTime This property is required. string
DataCenterId This property is required. string
The id of the Cassandra dataCenter.
DataCenterName This property is required. string
The name of the Cassandra dataCenter.
DiskSize This property is required. int
One node disk size, unit:GB.
DiskType This property is required. string
Cloud_ssd or cloud_efficiency.
ExpireTime This property is required. string
The expire time of the dataCenter.
InstanceType This property is required. string
The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
LockMode This property is required. string
The lock mode of the dataCenter.
NodeCount This property is required. int
The node count of dataCenter.
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 dataCenter.
VpcId This property is required. string
VPC ID the dataCenter belongs to.
VswitchId This property is required. string
VSwitch ID the dataCenter belongs to.
ZoneId This property is required. string
Zone ID the dataCenter belongs to.
ClusterId This property is required. string
The cluster id of dataCenters belongs to.
CommodityInstance This property is required. string
The commodity ID of the Cassandra dataCenter.
CreatedTime This property is required. string
DataCenterId This property is required. string
The id of the Cassandra dataCenter.
DataCenterName This property is required. string
The name of the Cassandra dataCenter.
DiskSize This property is required. int
One node disk size, unit:GB.
DiskType This property is required. string
Cloud_ssd or cloud_efficiency.
ExpireTime This property is required. string
The expire time of the dataCenter.
InstanceType This property is required. string
The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
LockMode This property is required. string
The lock mode of the dataCenter.
NodeCount This property is required. int
The node count of dataCenter.
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 dataCenter.
VpcId This property is required. string
VPC ID the dataCenter belongs to.
VswitchId This property is required. string
VSwitch ID the dataCenter belongs to.
ZoneId This property is required. string
Zone ID the dataCenter belongs to.
clusterId This property is required. String
The cluster id of dataCenters belongs to.
commodityInstance This property is required. String
The commodity ID of the Cassandra dataCenter.
createdTime This property is required. String
dataCenterId This property is required. String
The id of the Cassandra dataCenter.
dataCenterName This property is required. String
The name of the Cassandra dataCenter.
diskSize This property is required. Integer
One node disk size, unit:GB.
diskType This property is required. String
Cloud_ssd or cloud_efficiency.
expireTime This property is required. String
The expire time of the dataCenter.
instanceType This property is required. String
The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
lockMode This property is required. String
The lock mode of the dataCenter.
nodeCount This property is required. Integer
The node count of dataCenter.
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 dataCenter.
vpcId This property is required. String
VPC ID the dataCenter belongs to.
vswitchId This property is required. String
VSwitch ID the dataCenter belongs to.
zoneId This property is required. String
Zone ID the dataCenter belongs to.
clusterId This property is required. string
The cluster id of dataCenters belongs to.
commodityInstance This property is required. string
The commodity ID of the Cassandra dataCenter.
createdTime This property is required. string
dataCenterId This property is required. string
The id of the Cassandra dataCenter.
dataCenterName This property is required. string
The name of the Cassandra dataCenter.
diskSize This property is required. number
One node disk size, unit:GB.
diskType This property is required. string
Cloud_ssd or cloud_efficiency.
expireTime This property is required. string
The expire time of the dataCenter.
instanceType This property is required. string
The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
lockMode This property is required. string
The lock mode of the dataCenter.
nodeCount This property is required. number
The node count of dataCenter.
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 dataCenter.
vpcId This property is required. string
VPC ID the dataCenter belongs to.
vswitchId This property is required. string
VSwitch ID the dataCenter belongs to.
zoneId This property is required. string
Zone ID the dataCenter belongs to.
cluster_id This property is required. str
The cluster id of dataCenters belongs to.
commodity_instance This property is required. str
The commodity ID of the Cassandra dataCenter.
created_time This property is required. str
data_center_id This property is required. str
The id of the Cassandra dataCenter.
data_center_name This property is required. str
The name of the Cassandra dataCenter.
disk_size This property is required. int
One node disk size, unit:GB.
disk_type This property is required. str
Cloud_ssd or cloud_efficiency.
expire_time This property is required. str
The expire time of the dataCenter.
instance_type This property is required. str
The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
lock_mode This property is required. str
The lock mode of the dataCenter.
node_count This property is required. int
The node count of dataCenter.
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 dataCenter.
vpc_id This property is required. str
VPC ID the dataCenter belongs to.
vswitch_id This property is required. str
VSwitch ID the dataCenter belongs to.
zone_id This property is required. str
Zone ID the dataCenter belongs to.
clusterId This property is required. String
The cluster id of dataCenters belongs to.
commodityInstance This property is required. String
The commodity ID of the Cassandra dataCenter.
createdTime This property is required. String
dataCenterId This property is required. String
The id of the Cassandra dataCenter.
dataCenterName This property is required. String
The name of the Cassandra dataCenter.
diskSize This property is required. Number
One node disk size, unit:GB.
diskType This property is required. String
Cloud_ssd or cloud_efficiency.
expireTime This property is required. String
The expire time of the dataCenter.
instanceType This property is required. String
The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
lockMode This property is required. String
The lock mode of the dataCenter.
nodeCount This property is required. Number
The node count of dataCenter.
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 dataCenter.
vpcId This property is required. String
VPC ID the dataCenter belongs to.
vswitchId This property is required. String
VSwitch ID the dataCenter belongs to.
zoneId This property is required. String
Zone ID the dataCenter belongs to.

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.75.0 published on Friday, Mar 7, 2025 by Pulumi