-
Notifications
You must be signed in to change notification settings - Fork 5
/
getClusters.go
57 lines (52 loc) · 2.54 KB
/
getClusters.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package polardb
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// The `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+.
func GetClusters(ctx *pulumi.Context, args *GetClustersArgs, opts ...pulumi.InvokeOption) (*GetClustersResult, error) {
var rv GetClustersResult
err := ctx.Invoke("alicloud:polardb/getClusters:getClusters", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getClusters.
type GetClustersArgs struct {
// Database type. Options are `MySQL`, `Oracle` and `PostgreSQL`. If no value is specified, all types are returned.
DbType *string `pulumi:"dbType"`
// A regex string to filter results by cluster description.
DescriptionRegex *string `pulumi:"descriptionRegex"`
// A list of PolarDB cluster IDs.
Ids []string `pulumi:"ids"`
OutputFile *string `pulumi:"outputFile"`
// status of the cluster.
Status *string `pulumi:"status"`
// 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.
Tags map[string]interface{} `pulumi:"tags"`
}
// A collection of values returned by getClusters.
type GetClustersResult struct {
// A list of PolarDB clusters. Each element contains the following attributes:
Clusters []GetClustersCluster `pulumi:"clusters"`
// `Primary` for primary cluster, `ReadOnly` for read-only cluster, `Guard` for disaster recovery cluster, and `Temp` for temporary cluster.
DbType *string `pulumi:"dbType"`
DescriptionRegex *string `pulumi:"descriptionRegex"`
// A list of RDS cluster descriptions.
Descriptions []string `pulumi:"descriptions"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A list of RDS cluster IDs.
Ids []string `pulumi:"ids"`
OutputFile *string `pulumi:"outputFile"`
// Status of the cluster.
Status *string `pulumi:"status"`
Tags map[string]interface{} `pulumi:"tags"`
}