This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
getMdbMysqlCluster.go
267 lines (231 loc) · 11.8 KB
/
getMdbMysqlCluster.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
// *** 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 yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Yandex Managed MySQL cluster. For more information, see
// [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "test"
// foo, err := yandex.LookupMdbMysqlCluster(ctx, &GetMdbMysqlClusterArgs{
// Name: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("networkId", foo.NetworkId)
// return nil
// })
// }
// ```
func LookupMdbMysqlCluster(ctx *pulumi.Context, args *LookupMdbMysqlClusterArgs, opts ...pulumi.InvokeOption) (*LookupMdbMysqlClusterResult, error) {
var rv LookupMdbMysqlClusterResult
err := ctx.Invoke("yandex:index/getMdbMysqlCluster:getMdbMysqlCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMdbMysqlCluster.
type LookupMdbMysqlClusterArgs struct {
// Access policy to the MySQL cluster. The structure is documented below.
Access *GetMdbMysqlClusterAccess `pulumi:"access"`
// The ID of the MySQL cluster.
ClusterId *string `pulumi:"clusterId"`
DeletionProtection *bool `pulumi:"deletionProtection"`
// Description of the MySQL cluster.
Description *string `pulumi:"description"`
// The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// A set of key/value label pairs to assign to the MySQL cluster.
Labels map[string]string `pulumi:"labels"`
// MySQL cluster config.
MysqlConfig map[string]string `pulumi:"mysqlConfig"`
// The name of the MySQL cluster.
Name *string `pulumi:"name"`
}
// A collection of values returned by getMdbMysqlCluster.
type LookupMdbMysqlClusterResult struct {
// Access policy to the MySQL cluster. The structure is documented below.
Access GetMdbMysqlClusterAccess `pulumi:"access"`
BackupWindowStarts []GetMdbMysqlClusterBackupWindowStart `pulumi:"backupWindowStarts"`
ClusterId string `pulumi:"clusterId"`
// Creation timestamp of the key.
CreatedAt string `pulumi:"createdAt"`
// A database of the MySQL cluster. The structure is documented below.
Databases []GetMdbMysqlClusterDatabase `pulumi:"databases"`
DeletionProtection bool `pulumi:"deletionProtection"`
// Description of the MySQL cluster.
Description *string `pulumi:"description"`
// Deployment environment of the MySQL cluster.
Environment string `pulumi:"environment"`
FolderId string `pulumi:"folderId"`
// Aggregated health of the cluster.
Health string `pulumi:"health"`
// A host of the MySQL cluster. The structure is documented below.
Hosts []GetMdbMysqlClusterHost `pulumi:"hosts"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A set of key/value label pairs to assign to the MySQL cluster.
Labels map[string]string `pulumi:"labels"`
// Maintenance window settings of the MySQL cluster. The structure is documented below.
MaintenanceWindows []GetMdbMysqlClusterMaintenanceWindow `pulumi:"maintenanceWindows"`
// MySQL cluster config.
MysqlConfig map[string]string `pulumi:"mysqlConfig"`
// The name of the database.
Name string `pulumi:"name"`
// ID of the network, to which the MySQL cluster belongs.
NetworkId string `pulumi:"networkId"`
// Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Resources []GetMdbMysqlClusterResource `pulumi:"resources"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// Status of the cluster.
Status string `pulumi:"status"`
// A user of the MySQL cluster. The structure is documented below.
Users []GetMdbMysqlClusterUser `pulumi:"users"`
// Version of the MySQL cluster.
Version string `pulumi:"version"`
}
func LookupMdbMysqlClusterOutput(ctx *pulumi.Context, args LookupMdbMysqlClusterOutputArgs, opts ...pulumi.InvokeOption) LookupMdbMysqlClusterResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupMdbMysqlClusterResult, error) {
args := v.(LookupMdbMysqlClusterArgs)
r, err := LookupMdbMysqlCluster(ctx, &args, opts...)
return *r, err
}).(LookupMdbMysqlClusterResultOutput)
}
// A collection of arguments for invoking getMdbMysqlCluster.
type LookupMdbMysqlClusterOutputArgs struct {
// Access policy to the MySQL cluster. The structure is documented below.
Access GetMdbMysqlClusterAccessPtrInput `pulumi:"access"`
// The ID of the MySQL cluster.
ClusterId pulumi.StringPtrInput `pulumi:"clusterId"`
DeletionProtection pulumi.BoolPtrInput `pulumi:"deletionProtection"`
// Description of the MySQL cluster.
Description pulumi.StringPtrInput `pulumi:"description"`
// The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
FolderId pulumi.StringPtrInput `pulumi:"folderId"`
// A set of key/value label pairs to assign to the MySQL cluster.
Labels pulumi.StringMapInput `pulumi:"labels"`
// MySQL cluster config.
MysqlConfig pulumi.StringMapInput `pulumi:"mysqlConfig"`
// The name of the MySQL cluster.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (LookupMdbMysqlClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMdbMysqlClusterArgs)(nil)).Elem()
}
// A collection of values returned by getMdbMysqlCluster.
type LookupMdbMysqlClusterResultOutput struct{ *pulumi.OutputState }
func (LookupMdbMysqlClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMdbMysqlClusterResult)(nil)).Elem()
}
func (o LookupMdbMysqlClusterResultOutput) ToLookupMdbMysqlClusterResultOutput() LookupMdbMysqlClusterResultOutput {
return o
}
func (o LookupMdbMysqlClusterResultOutput) ToLookupMdbMysqlClusterResultOutputWithContext(ctx context.Context) LookupMdbMysqlClusterResultOutput {
return o
}
// Access policy to the MySQL cluster. The structure is documented below.
func (o LookupMdbMysqlClusterResultOutput) Access() GetMdbMysqlClusterAccessOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) GetMdbMysqlClusterAccess { return v.Access }).(GetMdbMysqlClusterAccessOutput)
}
func (o LookupMdbMysqlClusterResultOutput) BackupWindowStarts() GetMdbMysqlClusterBackupWindowStartArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []GetMdbMysqlClusterBackupWindowStart { return v.BackupWindowStarts }).(GetMdbMysqlClusterBackupWindowStartArrayOutput)
}
func (o LookupMdbMysqlClusterResultOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.ClusterId }).(pulumi.StringOutput)
}
// Creation timestamp of the key.
func (o LookupMdbMysqlClusterResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
// A database of the MySQL cluster. The structure is documented below.
func (o LookupMdbMysqlClusterResultOutput) Databases() GetMdbMysqlClusterDatabaseArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []GetMdbMysqlClusterDatabase { return v.Databases }).(GetMdbMysqlClusterDatabaseArrayOutput)
}
func (o LookupMdbMysqlClusterResultOutput) DeletionProtection() pulumi.BoolOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) bool { return v.DeletionProtection }).(pulumi.BoolOutput)
}
// Description of the MySQL cluster.
func (o LookupMdbMysqlClusterResultOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// Deployment environment of the MySQL cluster.
func (o LookupMdbMysqlClusterResultOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.Environment }).(pulumi.StringOutput)
}
func (o LookupMdbMysqlClusterResultOutput) FolderId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.FolderId }).(pulumi.StringOutput)
}
// Aggregated health of the cluster.
func (o LookupMdbMysqlClusterResultOutput) Health() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.Health }).(pulumi.StringOutput)
}
// A host of the MySQL cluster. The structure is documented below.
func (o LookupMdbMysqlClusterResultOutput) Hosts() GetMdbMysqlClusterHostArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []GetMdbMysqlClusterHost { return v.Hosts }).(GetMdbMysqlClusterHostArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupMdbMysqlClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
// A set of key/value label pairs to assign to the MySQL cluster.
func (o LookupMdbMysqlClusterResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// Maintenance window settings of the MySQL cluster. The structure is documented below.
func (o LookupMdbMysqlClusterResultOutput) MaintenanceWindows() GetMdbMysqlClusterMaintenanceWindowArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []GetMdbMysqlClusterMaintenanceWindow { return v.MaintenanceWindows }).(GetMdbMysqlClusterMaintenanceWindowArrayOutput)
}
// MySQL cluster config.
func (o LookupMdbMysqlClusterResultOutput) MysqlConfig() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) map[string]string { return v.MysqlConfig }).(pulumi.StringMapOutput)
}
// The name of the database.
func (o LookupMdbMysqlClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
// ID of the network, to which the MySQL cluster belongs.
func (o LookupMdbMysqlClusterResultOutput) NetworkId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.NetworkId }).(pulumi.StringOutput)
}
// Resources allocated to hosts of the MySQL cluster. The structure is documented below.
func (o LookupMdbMysqlClusterResultOutput) Resources() GetMdbMysqlClusterResourceArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []GetMdbMysqlClusterResource { return v.Resources }).(GetMdbMysqlClusterResourceArrayOutput)
}
// A set of ids of security groups assigned to hosts of the cluster.
func (o LookupMdbMysqlClusterResultOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []string { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
// Status of the cluster.
func (o LookupMdbMysqlClusterResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.Status }).(pulumi.StringOutput)
}
// A user of the MySQL cluster. The structure is documented below.
func (o LookupMdbMysqlClusterResultOutput) Users() GetMdbMysqlClusterUserArrayOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) []GetMdbMysqlClusterUser { return v.Users }).(GetMdbMysqlClusterUserArrayOutput)
}
// Version of the MySQL cluster.
func (o LookupMdbMysqlClusterResultOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbMysqlClusterResult) string { return v.Version }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMdbMysqlClusterResultOutput{})
}