/
rdsInstancesV2.go
302 lines (274 loc) · 10.5 KB
/
rdsInstancesV2.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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package rds_v2
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/internal"
)
// (Deprecated! Recommend use volcengine_rds_mysql_*** replace) Use this data source to query detailed information of rds instances v2
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_v2"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := rds_v2.RdsInstancesV2(ctx, nil, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func RdsInstancesV2(ctx *pulumi.Context, args *RdsInstancesV2Args, opts ...pulumi.InvokeOption) (*RdsInstancesV2Result, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv RdsInstancesV2Result
err := ctx.Invoke("volcengine:rds_v2/rdsInstancesV2:RdsInstancesV2", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking RdsInstancesV2.
type RdsInstancesV2Args struct {
// The charge type of the RDS instance.
ChargeType *string `pulumi:"chargeType"`
// The end time of creating RDS instance.
CreateTimeEnd *string `pulumi:"createTimeEnd"`
// The start time of creating RDS instance.
CreateTimeStart *string `pulumi:"createTimeStart"`
// The version of the RDS instance, Value:
// MySQL Community:
// MySQL_5.7 - MySQL 5.7
// MySQL_8_0 - MySQL 8.0
// PostgreSQL Community:
// PostgreSQL_11 - PostgreSQL 11
// PostgreSQL_12 - PostgreSQL 12
// Microsoft SQL Server: Not available at this time
// SQLServer_2019 - SQL Server 2019
// veDB for MySQL:
// MySQL_8_0 - MySQL 8.0
// veDB for PostgreSQL:
// PostgreSQL_13 - PostgreSQL 13.
DbEngineVersion *string `pulumi:"dbEngineVersion"`
// The id of the RDS instance.
InstanceId *string `pulumi:"instanceId"`
// The name of the RDS instance.
InstanceName *string `pulumi:"instanceName"`
// The status of the RDS instance, Value:
// Running - running
// Creating - Creating
// Deleting - Deleting
// Restarting - Restarting
// Restoring - Restoring
// Updating - changing
// Upgrading - Upgrading
// Error - the error.
InstanceStatus *string `pulumi:"instanceStatus"`
// The type of the RDS instance, Value:
// Value:
// RDS for MySQL:
// HA - high availability version;
// RDS for PostgreSQL:
// HA - high availability version;
// Microsoft SQL Server: Not available at this time
// Enterprise - Enterprise Edition
// Standard - Standard Edition
// Web - Web version
// veDB for MySQL:
// Cluster - Cluster Edition
// veDB for PostgreSQL:
// Cluster - Cluster Edition
// MySQL Sharding:
// HA - high availability version;.
InstanceType *string `pulumi:"instanceType"`
// A Name Regex of RDS instance.
NameRegex *string `pulumi:"nameRegex"`
// File name where to save data source results.
OutputFile *string `pulumi:"outputFile"`
// The available zone of the RDS instance.
ZoneId *string `pulumi:"zoneId"`
}
// A collection of values returned by RdsInstancesV2.
type RdsInstancesV2Result struct {
// Payment type. Value:
// PostPaid - Pay-As-You-Go
// PrePaid - Yearly and monthly (default).
ChargeType *string `pulumi:"chargeType"`
CreateTimeEnd *string `pulumi:"createTimeEnd"`
CreateTimeStart *string `pulumi:"createTimeStart"`
// The engine version of the RDS instance.
DbEngineVersion *string `pulumi:"dbEngineVersion"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Instance ID.
InstanceId *string `pulumi:"instanceId"`
// The name of the RDS instance.
InstanceName *string `pulumi:"instanceName"`
// The status of the RDS instance.
InstanceStatus *string `pulumi:"instanceStatus"`
// The type of the RDS instance.
InstanceType *string `pulumi:"instanceType"`
NameRegex *string `pulumi:"nameRegex"`
OutputFile *string `pulumi:"outputFile"`
// The collection of RDS instance query.
RdsInstances []RdsInstancesV2RdsInstance `pulumi:"rdsInstances"`
// The total count of RDS instance query.
TotalCount int `pulumi:"totalCount"`
// The available zone of the RDS instance.
ZoneId *string `pulumi:"zoneId"`
}
func RdsInstancesV2Output(ctx *pulumi.Context, args RdsInstancesV2OutputArgs, opts ...pulumi.InvokeOption) RdsInstancesV2ResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (RdsInstancesV2Result, error) {
args := v.(RdsInstancesV2Args)
r, err := RdsInstancesV2(ctx, &args, opts...)
var s RdsInstancesV2Result
if r != nil {
s = *r
}
return s, err
}).(RdsInstancesV2ResultOutput)
}
// A collection of arguments for invoking RdsInstancesV2.
type RdsInstancesV2OutputArgs struct {
// The charge type of the RDS instance.
ChargeType pulumi.StringPtrInput `pulumi:"chargeType"`
// The end time of creating RDS instance.
CreateTimeEnd pulumi.StringPtrInput `pulumi:"createTimeEnd"`
// The start time of creating RDS instance.
CreateTimeStart pulumi.StringPtrInput `pulumi:"createTimeStart"`
// The version of the RDS instance, Value:
// MySQL Community:
// MySQL_5.7 - MySQL 5.7
// MySQL_8_0 - MySQL 8.0
// PostgreSQL Community:
// PostgreSQL_11 - PostgreSQL 11
// PostgreSQL_12 - PostgreSQL 12
// Microsoft SQL Server: Not available at this time
// SQLServer_2019 - SQL Server 2019
// veDB for MySQL:
// MySQL_8_0 - MySQL 8.0
// veDB for PostgreSQL:
// PostgreSQL_13 - PostgreSQL 13.
DbEngineVersion pulumi.StringPtrInput `pulumi:"dbEngineVersion"`
// The id of the RDS instance.
InstanceId pulumi.StringPtrInput `pulumi:"instanceId"`
// The name of the RDS instance.
InstanceName pulumi.StringPtrInput `pulumi:"instanceName"`
// The status of the RDS instance, Value:
// Running - running
// Creating - Creating
// Deleting - Deleting
// Restarting - Restarting
// Restoring - Restoring
// Updating - changing
// Upgrading - Upgrading
// Error - the error.
InstanceStatus pulumi.StringPtrInput `pulumi:"instanceStatus"`
// The type of the RDS instance, Value:
// Value:
// RDS for MySQL:
// HA - high availability version;
// RDS for PostgreSQL:
// HA - high availability version;
// Microsoft SQL Server: Not available at this time
// Enterprise - Enterprise Edition
// Standard - Standard Edition
// Web - Web version
// veDB for MySQL:
// Cluster - Cluster Edition
// veDB for PostgreSQL:
// Cluster - Cluster Edition
// MySQL Sharding:
// HA - high availability version;.
InstanceType pulumi.StringPtrInput `pulumi:"instanceType"`
// A Name Regex of RDS instance.
NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
// File name where to save data source results.
OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
// The available zone of the RDS instance.
ZoneId pulumi.StringPtrInput `pulumi:"zoneId"`
}
func (RdsInstancesV2OutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*RdsInstancesV2Args)(nil)).Elem()
}
// A collection of values returned by RdsInstancesV2.
type RdsInstancesV2ResultOutput struct{ *pulumi.OutputState }
func (RdsInstancesV2ResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*RdsInstancesV2Result)(nil)).Elem()
}
func (o RdsInstancesV2ResultOutput) ToRdsInstancesV2ResultOutput() RdsInstancesV2ResultOutput {
return o
}
func (o RdsInstancesV2ResultOutput) ToRdsInstancesV2ResultOutputWithContext(ctx context.Context) RdsInstancesV2ResultOutput {
return o
}
// Payment type. Value:
// PostPaid - Pay-As-You-Go
// PrePaid - Yearly and monthly (default).
func (o RdsInstancesV2ResultOutput) ChargeType() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.ChargeType }).(pulumi.StringPtrOutput)
}
func (o RdsInstancesV2ResultOutput) CreateTimeEnd() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.CreateTimeEnd }).(pulumi.StringPtrOutput)
}
func (o RdsInstancesV2ResultOutput) CreateTimeStart() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.CreateTimeStart }).(pulumi.StringPtrOutput)
}
// The engine version of the RDS instance.
func (o RdsInstancesV2ResultOutput) DbEngineVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.DbEngineVersion }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o RdsInstancesV2ResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v RdsInstancesV2Result) string { return v.Id }).(pulumi.StringOutput)
}
// Instance ID.
func (o RdsInstancesV2ResultOutput) InstanceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.InstanceId }).(pulumi.StringPtrOutput)
}
// The name of the RDS instance.
func (o RdsInstancesV2ResultOutput) InstanceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.InstanceName }).(pulumi.StringPtrOutput)
}
// The status of the RDS instance.
func (o RdsInstancesV2ResultOutput) InstanceStatus() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.InstanceStatus }).(pulumi.StringPtrOutput)
}
// The type of the RDS instance.
func (o RdsInstancesV2ResultOutput) InstanceType() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.InstanceType }).(pulumi.StringPtrOutput)
}
func (o RdsInstancesV2ResultOutput) NameRegex() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.NameRegex }).(pulumi.StringPtrOutput)
}
func (o RdsInstancesV2ResultOutput) OutputFile() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.OutputFile }).(pulumi.StringPtrOutput)
}
// The collection of RDS instance query.
func (o RdsInstancesV2ResultOutput) RdsInstances() RdsInstancesV2RdsInstanceArrayOutput {
return o.ApplyT(func(v RdsInstancesV2Result) []RdsInstancesV2RdsInstance { return v.RdsInstances }).(RdsInstancesV2RdsInstanceArrayOutput)
}
// The total count of RDS instance query.
func (o RdsInstancesV2ResultOutput) TotalCount() pulumi.IntOutput {
return o.ApplyT(func(v RdsInstancesV2Result) int { return v.TotalCount }).(pulumi.IntOutput)
}
// The available zone of the RDS instance.
func (o RdsInstancesV2ResultOutput) ZoneId() pulumi.StringPtrOutput {
return o.ApplyT(func(v RdsInstancesV2Result) *string { return v.ZoneId }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(RdsInstancesV2ResultOutput{})
}