GetClusters
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+.
Example Usage
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; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
polardb_clusters_ds = alicloud.polardb.get_clusters(description_regex="pc-\\w+",
status="Running")
pulumi.export("firstPolardbClusterId", polardb_clusters_ds.clusters[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const polardbClustersDs = pulumi.output(alicloud.polardb.getClusters({
descriptionRegex: "pc-\\w+",
status: "Running",
}, { async: true }));
export const firstPolardbClusterId = polardbClustersDs.clusters[0].id;Using GetClusters
function getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>function get_clusters(db_type=None, description_regex=None, ids=None, output_file=None, status=None, tags=None, opts=None)func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)public static class GetClusters {
public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Db
Type string Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- Description
Regex string A regex string to filter results by cluster description.
- Ids List<string>
A list of PolarDB cluster IDs.
- Output
File string - Status string
status of the cluster.
- Dictionary<string, object>
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- Db
Type string Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- Description
Regex string A regex string to filter results by cluster description.
- Ids []string
A list of PolarDB cluster IDs.
- Output
File string - Status string
status of the cluster.
- map[string]interface{}
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- db
Type string Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- description
Regex string A regex string to filter results by cluster description.
- ids string[]
A list of PolarDB cluster IDs.
- output
File string - status string
status of the cluster.
- {[key: string]: any}
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
- db_
type str Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- description_
regex str A regex string to filter results by cluster description.
- ids List[str]
A list of PolarDB cluster IDs.
- output_
file str - status str
status of the cluster.
- Dict[str, Any]
A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with “aliyun”, “acs:“, “http://“, or “https://“. It can be a null string.
GetClusters Result
The following output properties are available:
- Clusters
List<Pulumi.
Ali Cloud. Polar DB. Outputs. Get Clusters Cluster> A list of PolarDB clusters. Each element contains the following attributes:
- Descriptions List<string>
A list of RDS cluster descriptions.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of RDS cluster IDs.
- Db
Type string Primaryfor primary cluster,ReadOnlyfor read-only cluster,Guardfor disaster recovery cluster, andTempfor temporary cluster.- Description
Regex string - Output
File string - Status string
Status of the cluster.
- Dictionary<string, object>
- Clusters
[]Get
Clusters Cluster A list of PolarDB clusters. Each element contains the following attributes:
- Descriptions []string
A list of RDS cluster descriptions.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of RDS cluster IDs.
- Db
Type string Primaryfor primary cluster,ReadOnlyfor read-only cluster,Guardfor disaster recovery cluster, andTempfor temporary cluster.- Description
Regex string - Output
File string - Status string
Status of the cluster.
- map[string]interface{}
- clusters
Get
Clusters Cluster[] A list of PolarDB clusters. Each element contains the following attributes:
- descriptions string[]
A list of RDS cluster descriptions.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of RDS cluster IDs.
- db
Type string Primaryfor primary cluster,ReadOnlyfor read-only cluster,Guardfor disaster recovery cluster, andTempfor temporary cluster.- description
Regex string - output
File string - status string
Status of the cluster.
- {[key: string]: any}
- clusters
List[Get
Clusters Cluster] A list of PolarDB clusters. Each element contains the following attributes:
- descriptions List[str]
A list of RDS cluster descriptions.
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of RDS cluster IDs.
- db_
type str Primaryfor primary cluster,ReadOnlyfor read-only cluster,Guardfor disaster recovery cluster, andTempfor temporary cluster.- description_
regex str - output_
file str - status str
Status of the cluster.
- Dict[str, Any]
Supporting Types
GetClustersCluster
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Charge
Type string Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- Create
Time string The create_time of the db_nodes.
- Db
Node stringClass The db_node_class of the db_nodes.
- Db
Node intNumber The DBNodeNumber of the PolarDB cluster.
- Db
Nodes List<Pulumi.Ali Cloud. Polar DB. Inputs. Get Clusters Cluster Db Node Args> The DBNodes of the PolarDB cluster.
- Db
Type string Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- Db
Version string The DBVersion of the PolarDB cluster.
- Delete
Lock int The DeleteLock of the PolarDB cluster.
- Description string
The description of the PolarDB cluster.
- Engine string
Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- Expire
Time string Expiration time. Pay-As-You-Go clusters never expire.
- Expired string
The expired of the PolarDB cluster.
- Id string
The ID of the PolarDB cluster.
- Lock
Mode string The LockMode of the PolarDB cluster.
- Network
Type string The DBClusterNetworkType of the PolarDB cluster.
- Region
Id string The region_id of the db_nodes.
- Status string
status of the cluster.
- Storage
Used int The StorageUsed of the PolarDB cluster.
- Vpc
Id string ID of the VPC the cluster belongs to.
- Zone
Id string The zone_id of the db_nodes.
- Charge
Type string Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- Create
Time string The create_time of the db_nodes.
- Db
Node stringClass The db_node_class of the db_nodes.
- Db
Node intNumber The DBNodeNumber of the PolarDB cluster.
- Db
Nodes []GetClusters Cluster Db Node The DBNodes of the PolarDB cluster.
- Db
Type string Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- Db
Version string The DBVersion of the PolarDB cluster.
- Delete
Lock int The DeleteLock of the PolarDB cluster.
- Description string
The description of the PolarDB cluster.
- Engine string
Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- Expire
Time string Expiration time. Pay-As-You-Go clusters never expire.
- Expired string
The expired of the PolarDB cluster.
- Id string
The ID of the PolarDB cluster.
- Lock
Mode string The LockMode of the PolarDB cluster.
- Network
Type string The DBClusterNetworkType of the PolarDB cluster.
- Region
Id string The region_id of the db_nodes.
- Status string
status of the cluster.
- Storage
Used int The StorageUsed of the PolarDB cluster.
- Vpc
Id string ID of the VPC the cluster belongs to.
- Zone
Id string The zone_id of the db_nodes.
- charge
Type string Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- create
Time string The create_time of the db_nodes.
- db
Node stringClass The db_node_class of the db_nodes.
- db
Node numberNumber The DBNodeNumber of the PolarDB cluster.
- db
Nodes GetClusters Cluster Db Node[] The DBNodes of the PolarDB cluster.
- db
Type string Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- db
Version string The DBVersion of the PolarDB cluster.
- delete
Lock number The DeleteLock of the PolarDB cluster.
- description string
The description of the PolarDB cluster.
- engine string
Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- expire
Time string Expiration time. Pay-As-You-Go clusters never expire.
- expired string
The expired of the PolarDB cluster.
- id string
The ID of the PolarDB cluster.
- lock
Mode string The LockMode of the PolarDB cluster.
- network
Type string The DBClusterNetworkType of the PolarDB cluster.
- region
Id string The region_id of the db_nodes.
- status string
status of the cluster.
- storage
Used number The StorageUsed of the PolarDB cluster.
- vpc
Id string ID of the VPC the cluster belongs to.
- zone
Id string The zone_id of the db_nodes.
- charge_
type str Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- create_
time str The create_time of the db_nodes.
- db
Node floatNumber The DBNodeNumber of the PolarDB cluster.
- db
Nodes List[GetClusters Cluster Db Node] The DBNodes of the PolarDB cluster.
- db_
node_ strclass The db_node_class of the db_nodes.
- db_
type str Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- db_
version str The DBVersion of the PolarDB cluster.
- delete
Lock float The DeleteLock of the PolarDB cluster.
- description str
The description of the PolarDB cluster.
- engine str
Database type. Options are
MySQL,OracleandPostgreSQL. If no value is specified, all types are returned.- expire_
time str Expiration time. Pay-As-You-Go clusters never expire.
- expired str
The expired of the PolarDB cluster.
- id str
The ID of the PolarDB cluster.
- lock
Mode str The LockMode of the PolarDB cluster.
- network_
type str The DBClusterNetworkType of the PolarDB cluster.
- region
Id str The region_id of the db_nodes.
- status str
status of the cluster.
- storage
Used float The StorageUsed of the PolarDB cluster.
- vpc_
id str ID of the VPC the cluster belongs to.
- zone_
id str The zone_id of the db_nodes.
GetClustersClusterDbNode
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Create
Time string The create_time of the db_nodes.
- Db
Node stringClass The db_node_class of the db_nodes.
- Db
Node stringId The db_node_id of the db_nodes.
- Db
Node stringRole The db_node_role of the db_nodes.
- Db
Node stringStatus The db_node_status of the db_nodes.
- Max
Connections int The max_connections of the db_nodes.
- Max
Iops int The max_iops of the db_nodes.
- Region
Id string The region_id of the db_nodes.
- Zone
Id string The zone_id of the db_nodes.
- Create
Time string The create_time of the db_nodes.
- Db
Node stringClass The db_node_class of the db_nodes.
- Db
Node stringId The db_node_id of the db_nodes.
- Db
Node stringRole The db_node_role of the db_nodes.
- Db
Node stringStatus The db_node_status of the db_nodes.
- Max
Connections int The max_connections of the db_nodes.
- Max
Iops int The max_iops of the db_nodes.
- Region
Id string The region_id of the db_nodes.
- Zone
Id string The zone_id of the db_nodes.
- create
Time string The create_time of the db_nodes.
- db
Node stringClass The db_node_class of the db_nodes.
- db
Node stringId The db_node_id of the db_nodes.
- db
Node stringRole The db_node_role of the db_nodes.
- db
Node stringStatus The db_node_status of the db_nodes.
- max
Connections number The max_connections of the db_nodes.
- max
Iops number The max_iops of the db_nodes.
- region
Id string The region_id of the db_nodes.
- zone
Id string The zone_id of the db_nodes.
- create_
time str The create_time of the db_nodes.
- db
Node strId The db_node_id of the db_nodes.
- db
Node strRole The db_node_role of the db_nodes.
- db
Node strStatus The db_node_status of the db_nodes.
- db_
node_ strclass The db_node_class of the db_nodes.
- max
Iops float The max_iops of the db_nodes.
- max_
connections float The max_connections of the db_nodes.
- region
Id str The region_id of the db_nodes.
- zone_
id str The zone_id of the db_nodes.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.