1. Packages
  2. Alicloud Provider
  3. API Docs
  4. cassandra
  5. getDataCenters
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.cassandra.getDataCenters

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    cassandra = alicloud.cassandra.get_data_centers(name_regex="tf_testAccCassandra_dc",
        cluster_id="cds-xxxxx")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      cassandra:
        fn::invoke:
          Function: alicloud:cassandra:getDataCenters
          Arguments:
            nameRegex: tf_testAccCassandra_dc
            clusterId: cds-xxxxx
    

    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>
    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]
    func GetDataCenters(ctx *Context, args *GetDataCentersArgs, opts ...InvokeOption) (*GetDataCentersResult, error)
    func GetDataCentersOutput(ctx *Context, args *GetDataCentersOutputArgs, opts ...InvokeOption) GetDataCentersResultOutput

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

    The following arguments are supported:

    ClusterId string
    The cluster id of dataCenters belongs to.
    Ids List<string>
    The list of Cassandra data center ids.
    NameRegex 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 string
    The cluster id of dataCenters belongs to.
    Ids []string
    The list of Cassandra data center ids.
    NameRegex 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 String
    The cluster id of dataCenters belongs to.
    ids List<String>
    The list of Cassandra data center ids.
    nameRegex 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 string
    The cluster id of dataCenters belongs to.
    ids string[]
    The list of Cassandra data center ids.
    nameRegex 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 str
    The cluster id of dataCenters belongs to.
    ids Sequence[str]
    The list of Cassandra data center 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 data centers after running pulumi preview.
    clusterId String
    The cluster id of dataCenters belongs to.
    ids List<String>
    The list of Cassandra data center ids.
    nameRegex 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 string
    The cluster id of dataCenters belongs to.
    CommodityInstance string
    The commodity ID of the Cassandra dataCenter.
    CreatedTime string
    DataCenterId string
    The id of the Cassandra dataCenter.
    DataCenterName string
    The name of the Cassandra dataCenter.
    DiskSize int
    One node disk size, unit:GB.
    DiskType string
    Cloud_ssd or cloud_efficiency.
    ExpireTime string
    The expire time of the dataCenter.
    InstanceType string
    The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
    LockMode string
    The lock mode of the dataCenter.
    NodeCount int
    The node count of dataCenter.
    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 dataCenter.
    VpcId string
    VPC ID the dataCenter belongs to.
    VswitchId string
    VSwitch ID the dataCenter belongs to.
    ZoneId string
    Zone ID the dataCenter belongs to.
    ClusterId string
    The cluster id of dataCenters belongs to.
    CommodityInstance string
    The commodity ID of the Cassandra dataCenter.
    CreatedTime string
    DataCenterId string
    The id of the Cassandra dataCenter.
    DataCenterName string
    The name of the Cassandra dataCenter.
    DiskSize int
    One node disk size, unit:GB.
    DiskType string
    Cloud_ssd or cloud_efficiency.
    ExpireTime string
    The expire time of the dataCenter.
    InstanceType string
    The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
    LockMode string
    The lock mode of the dataCenter.
    NodeCount int
    The node count of dataCenter.
    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 dataCenter.
    VpcId string
    VPC ID the dataCenter belongs to.
    VswitchId string
    VSwitch ID the dataCenter belongs to.
    ZoneId string
    Zone ID the dataCenter belongs to.
    clusterId String
    The cluster id of dataCenters belongs to.
    commodityInstance String
    The commodity ID of the Cassandra dataCenter.
    createdTime String
    dataCenterId String
    The id of the Cassandra dataCenter.
    dataCenterName String
    The name of the Cassandra dataCenter.
    diskSize Integer
    One node disk size, unit:GB.
    diskType String
    Cloud_ssd or cloud_efficiency.
    expireTime String
    The expire time of the dataCenter.
    instanceType String
    The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
    lockMode String
    The lock mode of the dataCenter.
    nodeCount Integer
    The node count of dataCenter.
    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 dataCenter.
    vpcId String
    VPC ID the dataCenter belongs to.
    vswitchId String
    VSwitch ID the dataCenter belongs to.
    zoneId String
    Zone ID the dataCenter belongs to.
    clusterId string
    The cluster id of dataCenters belongs to.
    commodityInstance string
    The commodity ID of the Cassandra dataCenter.
    createdTime string
    dataCenterId string
    The id of the Cassandra dataCenter.
    dataCenterName string
    The name of the Cassandra dataCenter.
    diskSize number
    One node disk size, unit:GB.
    diskType string
    Cloud_ssd or cloud_efficiency.
    expireTime string
    The expire time of the dataCenter.
    instanceType string
    The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
    lockMode string
    The lock mode of the dataCenter.
    nodeCount number
    The node count of dataCenter.
    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 dataCenter.
    vpcId string
    VPC ID the dataCenter belongs to.
    vswitchId string
    VSwitch ID the dataCenter belongs to.
    zoneId string
    Zone ID the dataCenter belongs to.
    cluster_id str
    The cluster id of dataCenters belongs to.
    commodity_instance str
    The commodity ID of the Cassandra dataCenter.
    created_time str
    data_center_id str
    The id of the Cassandra dataCenter.
    data_center_name str
    The name of the Cassandra dataCenter.
    disk_size int
    One node disk size, unit:GB.
    disk_type str
    Cloud_ssd or cloud_efficiency.
    expire_time str
    The expire time of the dataCenter.
    instance_type str
    The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
    lock_mode str
    The lock mode of the dataCenter.
    node_count int
    The node count of dataCenter.
    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 dataCenter.
    vpc_id str
    VPC ID the dataCenter belongs to.
    vswitch_id str
    VSwitch ID the dataCenter belongs to.
    zone_id str
    Zone ID the dataCenter belongs to.
    clusterId String
    The cluster id of dataCenters belongs to.
    commodityInstance String
    The commodity ID of the Cassandra dataCenter.
    createdTime String
    dataCenterId String
    The id of the Cassandra dataCenter.
    dataCenterName String
    The name of the Cassandra dataCenter.
    diskSize Number
    One node disk size, unit:GB.
    diskType String
    Cloud_ssd or cloud_efficiency.
    expireTime String
    The expire time of the dataCenter.
    instanceType String
    The instance type of the Cassandra dataCenter, eg: cassandra.c.large.
    lockMode String
    The lock mode of the dataCenter.
    nodeCount Number
    The node count of dataCenter.
    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 dataCenter.
    vpcId String
    VPC ID the dataCenter belongs to.
    vswitchId String
    VSwitch ID the dataCenter belongs to.
    zoneId 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.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi