GetClusters
The alicloud.adb.getClusters data source provides a collection of ADB 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.71.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var adbClustersDs = Output.Create(AliCloud.Adb.GetClusters.InvokeAsync(new AliCloud.Adb.GetClustersArgs
{
DescriptionRegex = "am-\\w+",
Status = "Running",
}));
this.FirstAdbClusterId = adbClustersDs.Apply(adbClustersDs => adbClustersDs.Clusters[0].Id);
}
[Output("firstAdbClusterId")]
public Output<string> FirstAdbClusterId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
adb_clusters_ds = alicloud.adb.get_clusters(description_regex="am-\\w+",
status="Running")
pulumi.export("firstAdbClusterId", adb_clusters_ds.clusters[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const adbClustersDs = pulumi.output(alicloud.adb.getClusters({
descriptionRegex: "am-\\w+",
status: "Running",
}, { async: true }));
export const firstAdbClusterId = adbClustersDs.clusters[0].id;Using GetClusters
function getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>function get_clusters(description_regex=None, ids=None, output_file=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:
- Description
Regex string A regex string to filter results by cluster description.
- Ids List<string>
A list of ADB cluster IDs.
- Output
File string - 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.
- Description
Regex string A regex string to filter results by cluster description.
- Ids []string
A list of ADB cluster IDs.
- Output
File string - 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.
- description
Regex string A regex string to filter results by cluster description.
- ids string[]
A list of ADB cluster IDs.
- output
File string - {[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.
- description_
regex str A regex string to filter results by cluster description.
- ids List[str]
A list of ADB cluster IDs.
- output_
file str - 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. Adb. Outputs. Get Clusters Cluster> A list of ADB clusters. Each element contains the following attributes:
- Descriptions List<string>
A list of ADB cluster descriptions.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of ADB cluster IDs.
- Description
Regex string - Output
File string - Dictionary<string, object>
- Clusters
[]Get
Clusters Cluster A list of ADB clusters. Each element contains the following attributes:
- Descriptions []string
A list of ADB cluster descriptions.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of ADB cluster IDs.
- Description
Regex string - Output
File string - map[string]interface{}
- clusters
Get
Clusters Cluster[] A list of ADB clusters. Each element contains the following attributes:
- descriptions string[]
A list of ADB cluster descriptions.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of ADB cluster IDs.
- description
Regex string - output
File string - {[key: string]: any}
- clusters
List[Get
Clusters Cluster] A list of ADB clusters. Each element contains the following attributes:
- descriptions List[str]
A list of ADB cluster descriptions.
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of ADB cluster IDs.
- description_
regex str - output_
file str - 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 CreateTime of the ADB cluster.
- Db
Node stringClass The DBNodeClass of the ADB cluster.
- Db
Node intCount The DBNodeCount of the ADB cluster.
- Db
Node intStorage The DBNodeStorage of the ADB cluster.
- Description string
The description of the ADB cluster.
- Expire
Time string Expiration time. Pay-As-You-Go clusters never expire.
- Expired string
The expired of the ADB cluster.
- Id string
The ID of the ADB cluster.
- Lock
Mode string The LockMode of the ADB cluster.
- Network
Type string The DBClusterNetworkType of the ADB cluster.
- Region
Id string Region ID the cluster belongs to.
- Status string
Status of the cluster.
- Vpc
Id string ID of the VPC the cluster belongs to.
- Zone
Id string The ZoneId of the ADB cluster.
- Charge
Type string Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- Create
Time string The CreateTime of the ADB cluster.
- Db
Node stringClass The DBNodeClass of the ADB cluster.
- Db
Node intCount The DBNodeCount of the ADB cluster.
- Db
Node intStorage The DBNodeStorage of the ADB cluster.
- Description string
The description of the ADB cluster.
- Expire
Time string Expiration time. Pay-As-You-Go clusters never expire.
- Expired string
The expired of the ADB cluster.
- Id string
The ID of the ADB cluster.
- Lock
Mode string The LockMode of the ADB cluster.
- Network
Type string The DBClusterNetworkType of the ADB cluster.
- Region
Id string Region ID the cluster belongs to.
- Status string
Status of the cluster.
- Vpc
Id string ID of the VPC the cluster belongs to.
- Zone
Id string The ZoneId of the ADB cluster.
- charge
Type string Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- create
Time string The CreateTime of the ADB cluster.
- db
Node stringClass The DBNodeClass of the ADB cluster.
- db
Node numberCount The DBNodeCount of the ADB cluster.
- db
Node numberStorage The DBNodeStorage of the ADB cluster.
- description string
The description of the ADB cluster.
- expire
Time string Expiration time. Pay-As-You-Go clusters never expire.
- expired string
The expired of the ADB cluster.
- id string
The ID of the ADB cluster.
- lock
Mode string The LockMode of the ADB cluster.
- network
Type string The DBClusterNetworkType of the ADB cluster.
- region
Id string Region ID the cluster belongs to.
- status string
Status of the cluster.
- vpc
Id string ID of the VPC the cluster belongs to.
- zone
Id string The ZoneId of the ADB cluster.
- charge_
type str Billing method. Value options:
PostPaidfor Pay-As-You-Go andPrePaidfor subscription.- create_
time str The CreateTime of the ADB cluster.
- db_
node_ strclass The DBNodeClass of the ADB cluster.
- db_
node_ floatcount The DBNodeCount of the ADB cluster.
- db_
node_ floatstorage The DBNodeStorage of the ADB cluster.
- description str
The description of the ADB cluster.
- expire_
time str Expiration time. Pay-As-You-Go clusters never expire.
- expired str
The expired of the ADB cluster.
- id str
The ID of the ADB cluster.
- lock
Mode str The LockMode of the ADB cluster.
- network_
type str The DBClusterNetworkType of the ADB cluster.
- region
Id str Region ID the cluster belongs to.
- status str
Status of the cluster.
- vpc_
id str ID of the VPC the cluster belongs to.
- zone_
id str The ZoneId of the ADB cluster.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.