Class GetClusters
Inheritance
System.Object
GetClusters
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.PolarDB
Assembly: Pulumi.AliCloud.dll
Syntax
public static class GetClusters
Methods
View SourceInvokeAsync(GetClustersArgs, InvokeOptions)
The alicloud.polardb.getClusters data source provides a collection of PolarDB clusters available in Alibaba Cloud account.
Filters support regular expression for the cluster description, searches by tags, and other filters which are listed below.
NOTE: Available in v1.66.0+.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var polardbClustersDs = Output.Create(AliCloud.PolarDB.GetClusters.InvokeAsync(new AliCloud.PolarDB.GetClustersArgs
{
DescriptionRegex = "pc-\\w+",
Status = "Running",
}));
this.FirstPolardbClusterId = polardbClustersDs.Apply(polardbClustersDs => polardbClustersDs.Clusters[0].Id);
}
[Output("firstPolardbClusterId")]
public Output<string> FirstPolardbClusterId { get; set; }
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args = null, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetClustersArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetClustersResult> |