alicloud.cassandra.getClusters
Explore with Pulumi AI
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+.
Example Usage
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 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
})
}
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());
}
}
import pulumi
import pulumi_alicloud as alicloud
cassandra = alicloud.cassandra.get_clusters(name_regex="tf_testAccCassandra")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const cassandra = alicloud.cassandra.getClusters({
nameRegex: "tf_testAccCassandra",
});
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.
- Name
Regex string A regex string to apply to the cluster name.
- Output
File string The name of file that can save the collection of clusters after running
pulumi preview
.- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Ids []string
The list of Cassandra cluster ids.
- Name
Regex string A regex string to apply to the cluster name.
- Output
File string The name of file that can save the collection of clusters after running
pulumi preview
.- map[string]interface{}
A mapping of tags to assign to the resource.
- ids List<String>
The list of Cassandra cluster ids.
- name
Regex String A regex string to apply to the cluster name.
- output
File String The name of file that can save the collection of clusters after running
pulumi preview
.- Map<String,Object>
A mapping of tags to assign to the resource.
- ids string[]
The list of Cassandra cluster ids.
- name
Regex string A regex string to apply to the cluster name.
- output
File string The name of file that can save the collection of clusters after running
pulumi preview
.- {[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
.- Mapping[str, Any]
A mapping of tags to assign to the resource.
- ids List<String>
The list of Cassandra cluster ids.
- name
Regex String A regex string to apply to the cluster name.
- output
File String The name of file that can save the collection of clusters after running
pulumi preview
.- Map<Any>
A mapping of tags to assign to the resource.
getClusters Result
The following output properties are available:
- Clusters
List<Pulumi.
Ali Cloud. Cassandra. Outputs. Get Clusters Cluster> 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.
- Name
Regex string - Output
File string - Dictionary<string, object>
A mapping of tags to assign to the resource.
- Clusters
[]Get
Clusters Cluster 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.
- Name
Regex string - Output
File string - map[string]interface{}
A mapping of tags to assign to the resource.
- clusters
List<Get
Clusters Cluster> 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.
- name
Regex String - output
File String - Map<String,Object>
A mapping of tags to assign to the resource.
- clusters
Get
Clusters Cluster[] 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.
- name
Regex string - output
File string - {[key: string]: any}
A mapping of tags to assign to the resource.
- clusters
Sequence[Get
Clusters Cluster] 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 - 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.
- name
Regex String - output
File String - Map<Any>
A mapping of tags to assign to the resource.
Supporting Types
GetClustersCluster
- Cluster
Id string The ID of the Cassandra cluster.
- Cluster
Name string The name of the Cassandra cluster.
- Created
Time string - Data
Center intCount The count of data centers
- Expire
Time string The expire time of the cluster.
- Id string
The ID of the Cassandra cluster.
- Lock
Mode string The lock mode of the cluster.
- Major
Version string The major version of the cluster.
- Minor
Version string The minor version of the cluster.
- Pay
Type string Billing method. Value options are
Subscription
for Pay-As-You-Go andPayAsYouGo
for yearly or monthly subscription.- Status string
Status of the cluster.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Cluster
Id string The ID of the Cassandra cluster.
- Cluster
Name string The name of the Cassandra cluster.
- Created
Time string - Data
Center intCount The count of data centers
- Expire
Time string The expire time of the cluster.
- Id string
The ID of the Cassandra cluster.
- Lock
Mode string The lock mode of the cluster.
- Major
Version string The major version of the cluster.
- Minor
Version string The minor version of the cluster.
- Pay
Type string Billing method. Value options are
Subscription
for Pay-As-You-Go andPayAsYouGo
for yearly or monthly subscription.- Status string
Status of the cluster.
- map[string]interface{}
A mapping of tags to assign to the resource.
- cluster
Id String The ID of the Cassandra cluster.
- cluster
Name String The name of the Cassandra cluster.
- created
Time String - data
Center IntegerCount The count of data centers
- expire
Time String The expire time of the cluster.
- id String
The ID of the Cassandra cluster.
- lock
Mode String The lock mode of the cluster.
- major
Version String The major version of the cluster.
- minor
Version String The minor version of the cluster.
- pay
Type String Billing method. Value options are
Subscription
for Pay-As-You-Go andPayAsYouGo
for yearly or monthly subscription.- status String
Status of the cluster.
- Map<String,Object>
A mapping of tags to assign to the resource.
- cluster
Id string The ID of the Cassandra cluster.
- cluster
Name string The name of the Cassandra cluster.
- created
Time string - data
Center numberCount The count of data centers
- expire
Time string The expire time of the cluster.
- id string
The ID of the Cassandra cluster.
- lock
Mode string The lock mode of the cluster.
- major
Version string The major version of the cluster.
- minor
Version string The minor version of the cluster.
- pay
Type string Billing method. Value options are
Subscription
for Pay-As-You-Go andPayAsYouGo
for yearly or monthly subscription.- status string
Status of the cluster.
- {[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_ intcount 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 andPayAsYouGo
for yearly or monthly subscription.- status str
Status of the cluster.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- cluster
Id String The ID of the Cassandra cluster.
- cluster
Name String The name of the Cassandra cluster.
- created
Time String - data
Center NumberCount The count of data centers
- expire
Time String The expire time of the cluster.
- id String
The ID of the Cassandra cluster.
- lock
Mode String The lock mode of the cluster.
- major
Version String The major version of the cluster.
- minor
Version String The minor version of the cluster.
- pay
Type String Billing method. Value options are
Subscription
for Pay-As-You-Go andPayAsYouGo
for yearly or monthly subscription.- status String
Status of the cluster.
- 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.