This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
standbyInstance.go
532 lines (466 loc) · 25.5 KB
/
standbyInstance.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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
// 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 mongodb
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type StandbyInstance struct {
pulumi.CustomResourceState
// Auto renew flag. Valid values are `0`(NOTIFY_AND_MANUAL_RENEW), `1`(NOTIFY_AND_AUTO_RENEW) and
// `2`(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is `0`. Note: only works for PREPAID instance. Only supports`0` and
// `1` for creation.
AutoRenewFlag pulumi.IntPtrOutput `pulumi:"autoRenewFlag"`
// The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
AvailableZone pulumi.StringOutput `pulumi:"availableZone"`
// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`.
// Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will
// delete old instances and create new one with new charge type.
ChargeType pulumi.StringPtrOutput `pulumi:"chargeType"`
// Creation time of the Mongodb instance.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Version of the standby Mongodb instance and must be same as the version of main instance.
EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
// Indicates the main instance ID of standby instances.
FatherInstanceId pulumi.StringOutput `pulumi:"fatherInstanceId"`
// Indicates the region of main instance.
FatherInstanceRegion pulumi.StringOutput `pulumi:"fatherInstanceRegion"`
// Name of the Mongodb instance.
InstanceName pulumi.StringOutput `pulumi:"instanceName"`
// Type of standby Mongodb instance and must be same as the type of main instance.
MachineType pulumi.StringOutput `pulumi:"machineType"`
// Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Memory pulumi.IntOutput `pulumi:"memory"`
// The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24,
// 36. NOTE: it only works when charge_type is set to `PREPAID`.
PrepaidPeriod pulumi.IntPtrOutput `pulumi:"prepaidPeriod"`
// ID of the project which the instance belongs.
ProjectId pulumi.IntPtrOutput `pulumi:"projectId"`
// ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not
// supported.
SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
// Status of the Mongodb instance, and available values include pending initialization(expressed with 0),
// processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
Status pulumi.IntOutput `pulumi:"status"`
// ID of the subnet within this VPC. The value is required if `vpc_id` is set.
SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
// The tags of the Mongodb. Key name `project` is system reserved and can't be used.
Tags pulumi.MapOutput `pulumi:"tags"`
// IP of the Mongodb instance.
Vip pulumi.StringOutput `pulumi:"vip"`
// Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Volume pulumi.IntOutput `pulumi:"volume"`
// ID of the VPC.
VpcId pulumi.StringPtrOutput `pulumi:"vpcId"`
// IP port of the Mongodb instance.
Vport pulumi.IntOutput `pulumi:"vport"`
}
// NewStandbyInstance registers a new resource with the given unique name, arguments, and options.
func NewStandbyInstance(ctx *pulumi.Context,
name string, args *StandbyInstanceArgs, opts ...pulumi.ResourceOption) (*StandbyInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AvailableZone == nil {
return nil, errors.New("invalid value for required argument 'AvailableZone'")
}
if args.FatherInstanceId == nil {
return nil, errors.New("invalid value for required argument 'FatherInstanceId'")
}
if args.FatherInstanceRegion == nil {
return nil, errors.New("invalid value for required argument 'FatherInstanceRegion'")
}
if args.InstanceName == nil {
return nil, errors.New("invalid value for required argument 'InstanceName'")
}
if args.Memory == nil {
return nil, errors.New("invalid value for required argument 'Memory'")
}
if args.Volume == nil {
return nil, errors.New("invalid value for required argument 'Volume'")
}
var resource StandbyInstance
err := ctx.RegisterResource("tctest:Mongodb/standbyInstance:StandbyInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStandbyInstance gets an existing StandbyInstance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetStandbyInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StandbyInstanceState, opts ...pulumi.ResourceOption) (*StandbyInstance, error) {
var resource StandbyInstance
err := ctx.ReadResource("tctest:Mongodb/standbyInstance:StandbyInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StandbyInstance resources.
type standbyInstanceState struct {
// Auto renew flag. Valid values are `0`(NOTIFY_AND_MANUAL_RENEW), `1`(NOTIFY_AND_AUTO_RENEW) and
// `2`(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is `0`. Note: only works for PREPAID instance. Only supports`0` and
// `1` for creation.
AutoRenewFlag *int `pulumi:"autoRenewFlag"`
// The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
AvailableZone *string `pulumi:"availableZone"`
// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`.
// Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will
// delete old instances and create new one with new charge type.
ChargeType *string `pulumi:"chargeType"`
// Creation time of the Mongodb instance.
CreateTime *string `pulumi:"createTime"`
// Version of the standby Mongodb instance and must be same as the version of main instance.
EngineVersion *string `pulumi:"engineVersion"`
// Indicates the main instance ID of standby instances.
FatherInstanceId *string `pulumi:"fatherInstanceId"`
// Indicates the region of main instance.
FatherInstanceRegion *string `pulumi:"fatherInstanceRegion"`
// Name of the Mongodb instance.
InstanceName *string `pulumi:"instanceName"`
// Type of standby Mongodb instance and must be same as the type of main instance.
MachineType *string `pulumi:"machineType"`
// Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Memory *int `pulumi:"memory"`
// The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24,
// 36. NOTE: it only works when charge_type is set to `PREPAID`.
PrepaidPeriod *int `pulumi:"prepaidPeriod"`
// ID of the project which the instance belongs.
ProjectId *int `pulumi:"projectId"`
// ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not
// supported.
SecurityGroups []string `pulumi:"securityGroups"`
// Status of the Mongodb instance, and available values include pending initialization(expressed with 0),
// processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
Status *int `pulumi:"status"`
// ID of the subnet within this VPC. The value is required if `vpc_id` is set.
SubnetId *string `pulumi:"subnetId"`
// The tags of the Mongodb. Key name `project` is system reserved and can't be used.
Tags map[string]interface{} `pulumi:"tags"`
// IP of the Mongodb instance.
Vip *string `pulumi:"vip"`
// Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Volume *int `pulumi:"volume"`
// ID of the VPC.
VpcId *string `pulumi:"vpcId"`
// IP port of the Mongodb instance.
Vport *int `pulumi:"vport"`
}
type StandbyInstanceState struct {
// Auto renew flag. Valid values are `0`(NOTIFY_AND_MANUAL_RENEW), `1`(NOTIFY_AND_AUTO_RENEW) and
// `2`(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is `0`. Note: only works for PREPAID instance. Only supports`0` and
// `1` for creation.
AutoRenewFlag pulumi.IntPtrInput
// The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
AvailableZone pulumi.StringPtrInput
// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`.
// Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will
// delete old instances and create new one with new charge type.
ChargeType pulumi.StringPtrInput
// Creation time of the Mongodb instance.
CreateTime pulumi.StringPtrInput
// Version of the standby Mongodb instance and must be same as the version of main instance.
EngineVersion pulumi.StringPtrInput
// Indicates the main instance ID of standby instances.
FatherInstanceId pulumi.StringPtrInput
// Indicates the region of main instance.
FatherInstanceRegion pulumi.StringPtrInput
// Name of the Mongodb instance.
InstanceName pulumi.StringPtrInput
// Type of standby Mongodb instance and must be same as the type of main instance.
MachineType pulumi.StringPtrInput
// Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Memory pulumi.IntPtrInput
// The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24,
// 36. NOTE: it only works when charge_type is set to `PREPAID`.
PrepaidPeriod pulumi.IntPtrInput
// ID of the project which the instance belongs.
ProjectId pulumi.IntPtrInput
// ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not
// supported.
SecurityGroups pulumi.StringArrayInput
// Status of the Mongodb instance, and available values include pending initialization(expressed with 0),
// processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
Status pulumi.IntPtrInput
// ID of the subnet within this VPC. The value is required if `vpc_id` is set.
SubnetId pulumi.StringPtrInput
// The tags of the Mongodb. Key name `project` is system reserved and can't be used.
Tags pulumi.MapInput
// IP of the Mongodb instance.
Vip pulumi.StringPtrInput
// Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Volume pulumi.IntPtrInput
// ID of the VPC.
VpcId pulumi.StringPtrInput
// IP port of the Mongodb instance.
Vport pulumi.IntPtrInput
}
func (StandbyInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*standbyInstanceState)(nil)).Elem()
}
type standbyInstanceArgs struct {
// Auto renew flag. Valid values are `0`(NOTIFY_AND_MANUAL_RENEW), `1`(NOTIFY_AND_AUTO_RENEW) and
// `2`(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is `0`. Note: only works for PREPAID instance. Only supports`0` and
// `1` for creation.
AutoRenewFlag *int `pulumi:"autoRenewFlag"`
// The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
AvailableZone string `pulumi:"availableZone"`
// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`.
// Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will
// delete old instances and create new one with new charge type.
ChargeType *string `pulumi:"chargeType"`
// Indicates the main instance ID of standby instances.
FatherInstanceId string `pulumi:"fatherInstanceId"`
// Indicates the region of main instance.
FatherInstanceRegion string `pulumi:"fatherInstanceRegion"`
// Name of the Mongodb instance.
InstanceName string `pulumi:"instanceName"`
// Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Memory int `pulumi:"memory"`
// The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24,
// 36. NOTE: it only works when charge_type is set to `PREPAID`.
PrepaidPeriod *int `pulumi:"prepaidPeriod"`
// ID of the project which the instance belongs.
ProjectId *int `pulumi:"projectId"`
// ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not
// supported.
SecurityGroups []string `pulumi:"securityGroups"`
// ID of the subnet within this VPC. The value is required if `vpc_id` is set.
SubnetId *string `pulumi:"subnetId"`
// The tags of the Mongodb. Key name `project` is system reserved and can't be used.
Tags map[string]interface{} `pulumi:"tags"`
// Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Volume int `pulumi:"volume"`
// ID of the VPC.
VpcId *string `pulumi:"vpcId"`
}
// The set of arguments for constructing a StandbyInstance resource.
type StandbyInstanceArgs struct {
// Auto renew flag. Valid values are `0`(NOTIFY_AND_MANUAL_RENEW), `1`(NOTIFY_AND_AUTO_RENEW) and
// `2`(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is `0`. Note: only works for PREPAID instance. Only supports`0` and
// `1` for creation.
AutoRenewFlag pulumi.IntPtrInput
// The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
AvailableZone pulumi.StringInput
// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`.
// Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will
// delete old instances and create new one with new charge type.
ChargeType pulumi.StringPtrInput
// Indicates the main instance ID of standby instances.
FatherInstanceId pulumi.StringInput
// Indicates the region of main instance.
FatherInstanceRegion pulumi.StringInput
// Name of the Mongodb instance.
InstanceName pulumi.StringInput
// Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Memory pulumi.IntInput
// The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24,
// 36. NOTE: it only works when charge_type is set to `PREPAID`.
PrepaidPeriod pulumi.IntPtrInput
// ID of the project which the instance belongs.
ProjectId pulumi.IntPtrInput
// ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not
// supported.
SecurityGroups pulumi.StringArrayInput
// ID of the subnet within this VPC. The value is required if `vpc_id` is set.
SubnetId pulumi.StringPtrInput
// The tags of the Mongodb. Key name `project` is system reserved and can't be used.
Tags pulumi.MapInput
// Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
Volume pulumi.IntInput
// ID of the VPC.
VpcId pulumi.StringPtrInput
}
func (StandbyInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*standbyInstanceArgs)(nil)).Elem()
}
type StandbyInstanceInput interface {
pulumi.Input
ToStandbyInstanceOutput() StandbyInstanceOutput
ToStandbyInstanceOutputWithContext(ctx context.Context) StandbyInstanceOutput
}
func (*StandbyInstance) ElementType() reflect.Type {
return reflect.TypeOf((**StandbyInstance)(nil)).Elem()
}
func (i *StandbyInstance) ToStandbyInstanceOutput() StandbyInstanceOutput {
return i.ToStandbyInstanceOutputWithContext(context.Background())
}
func (i *StandbyInstance) ToStandbyInstanceOutputWithContext(ctx context.Context) StandbyInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(StandbyInstanceOutput)
}
// StandbyInstanceArrayInput is an input type that accepts StandbyInstanceArray and StandbyInstanceArrayOutput values.
// You can construct a concrete instance of `StandbyInstanceArrayInput` via:
//
// StandbyInstanceArray{ StandbyInstanceArgs{...} }
type StandbyInstanceArrayInput interface {
pulumi.Input
ToStandbyInstanceArrayOutput() StandbyInstanceArrayOutput
ToStandbyInstanceArrayOutputWithContext(context.Context) StandbyInstanceArrayOutput
}
type StandbyInstanceArray []StandbyInstanceInput
func (StandbyInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StandbyInstance)(nil)).Elem()
}
func (i StandbyInstanceArray) ToStandbyInstanceArrayOutput() StandbyInstanceArrayOutput {
return i.ToStandbyInstanceArrayOutputWithContext(context.Background())
}
func (i StandbyInstanceArray) ToStandbyInstanceArrayOutputWithContext(ctx context.Context) StandbyInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StandbyInstanceArrayOutput)
}
// StandbyInstanceMapInput is an input type that accepts StandbyInstanceMap and StandbyInstanceMapOutput values.
// You can construct a concrete instance of `StandbyInstanceMapInput` via:
//
// StandbyInstanceMap{ "key": StandbyInstanceArgs{...} }
type StandbyInstanceMapInput interface {
pulumi.Input
ToStandbyInstanceMapOutput() StandbyInstanceMapOutput
ToStandbyInstanceMapOutputWithContext(context.Context) StandbyInstanceMapOutput
}
type StandbyInstanceMap map[string]StandbyInstanceInput
func (StandbyInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StandbyInstance)(nil)).Elem()
}
func (i StandbyInstanceMap) ToStandbyInstanceMapOutput() StandbyInstanceMapOutput {
return i.ToStandbyInstanceMapOutputWithContext(context.Background())
}
func (i StandbyInstanceMap) ToStandbyInstanceMapOutputWithContext(ctx context.Context) StandbyInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StandbyInstanceMapOutput)
}
type StandbyInstanceOutput struct{ *pulumi.OutputState }
func (StandbyInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StandbyInstance)(nil)).Elem()
}
func (o StandbyInstanceOutput) ToStandbyInstanceOutput() StandbyInstanceOutput {
return o
}
func (o StandbyInstanceOutput) ToStandbyInstanceOutputWithContext(ctx context.Context) StandbyInstanceOutput {
return o
}
// Auto renew flag. Valid values are `0`(NOTIFY_AND_MANUAL_RENEW), `1`(NOTIFY_AND_AUTO_RENEW) and
// `2`(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is `0`. Note: only works for PREPAID instance. Only supports`0` and
// `1` for creation.
func (o StandbyInstanceOutput) AutoRenewFlag() pulumi.IntPtrOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntPtrOutput { return v.AutoRenewFlag }).(pulumi.IntPtrOutput)
}
// The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
func (o StandbyInstanceOutput) AvailableZone() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.AvailableZone }).(pulumi.StringOutput)
}
// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`.
// Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will
// delete old instances and create new one with new charge type.
func (o StandbyInstanceOutput) ChargeType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringPtrOutput { return v.ChargeType }).(pulumi.StringPtrOutput)
}
// Creation time of the Mongodb instance.
func (o StandbyInstanceOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Version of the standby Mongodb instance and must be same as the version of main instance.
func (o StandbyInstanceOutput) EngineVersion() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput)
}
// Indicates the main instance ID of standby instances.
func (o StandbyInstanceOutput) FatherInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.FatherInstanceId }).(pulumi.StringOutput)
}
// Indicates the region of main instance.
func (o StandbyInstanceOutput) FatherInstanceRegion() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.FatherInstanceRegion }).(pulumi.StringOutput)
}
// Name of the Mongodb instance.
func (o StandbyInstanceOutput) InstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.InstanceName }).(pulumi.StringOutput)
}
// Type of standby Mongodb instance and must be same as the type of main instance.
func (o StandbyInstanceOutput) MachineType() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.MachineType }).(pulumi.StringOutput)
}
// Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
func (o StandbyInstanceOutput) Memory() pulumi.IntOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntOutput { return v.Memory }).(pulumi.IntOutput)
}
// The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24,
// 36. NOTE: it only works when charge_type is set to `PREPAID`.
func (o StandbyInstanceOutput) PrepaidPeriod() pulumi.IntPtrOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntPtrOutput { return v.PrepaidPeriod }).(pulumi.IntPtrOutput)
}
// ID of the project which the instance belongs.
func (o StandbyInstanceOutput) ProjectId() pulumi.IntPtrOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntPtrOutput { return v.ProjectId }).(pulumi.IntPtrOutput)
}
// ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not
// supported.
func (o StandbyInstanceOutput) SecurityGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput)
}
// Status of the Mongodb instance, and available values include pending initialization(expressed with 0),
// processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
func (o StandbyInstanceOutput) Status() pulumi.IntOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntOutput { return v.Status }).(pulumi.IntOutput)
}
// ID of the subnet within this VPC. The value is required if `vpc_id` is set.
func (o StandbyInstanceOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringPtrOutput { return v.SubnetId }).(pulumi.StringPtrOutput)
}
// The tags of the Mongodb. Key name `project` is system reserved and can't be used.
func (o StandbyInstanceOutput) Tags() pulumi.MapOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.MapOutput { return v.Tags }).(pulumi.MapOutput)
}
// IP of the Mongodb instance.
func (o StandbyInstanceOutput) Vip() pulumi.StringOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringOutput { return v.Vip }).(pulumi.StringOutput)
}
// Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
func (o StandbyInstanceOutput) Volume() pulumi.IntOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntOutput { return v.Volume }).(pulumi.IntOutput)
}
// ID of the VPC.
func (o StandbyInstanceOutput) VpcId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.StringPtrOutput { return v.VpcId }).(pulumi.StringPtrOutput)
}
// IP port of the Mongodb instance.
func (o StandbyInstanceOutput) Vport() pulumi.IntOutput {
return o.ApplyT(func(v *StandbyInstance) pulumi.IntOutput { return v.Vport }).(pulumi.IntOutput)
}
type StandbyInstanceArrayOutput struct{ *pulumi.OutputState }
func (StandbyInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StandbyInstance)(nil)).Elem()
}
func (o StandbyInstanceArrayOutput) ToStandbyInstanceArrayOutput() StandbyInstanceArrayOutput {
return o
}
func (o StandbyInstanceArrayOutput) ToStandbyInstanceArrayOutputWithContext(ctx context.Context) StandbyInstanceArrayOutput {
return o
}
func (o StandbyInstanceArrayOutput) Index(i pulumi.IntInput) StandbyInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StandbyInstance {
return vs[0].([]*StandbyInstance)[vs[1].(int)]
}).(StandbyInstanceOutput)
}
type StandbyInstanceMapOutput struct{ *pulumi.OutputState }
func (StandbyInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StandbyInstance)(nil)).Elem()
}
func (o StandbyInstanceMapOutput) ToStandbyInstanceMapOutput() StandbyInstanceMapOutput {
return o
}
func (o StandbyInstanceMapOutput) ToStandbyInstanceMapOutputWithContext(ctx context.Context) StandbyInstanceMapOutput {
return o
}
func (o StandbyInstanceMapOutput) MapIndex(k pulumi.StringInput) StandbyInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StandbyInstance {
return vs[0].(map[string]*StandbyInstance)[vs[1].(string)]
}).(StandbyInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StandbyInstanceInput)(nil)).Elem(), &StandbyInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*StandbyInstanceArrayInput)(nil)).Elem(), StandbyInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StandbyInstanceMapInput)(nil)).Elem(), StandbyInstanceMap{})
pulumi.RegisterOutputType(StandbyInstanceOutput{})
pulumi.RegisterOutputType(StandbyInstanceArrayOutput{})
pulumi.RegisterOutputType(StandbyInstanceMapOutput{})
}