/
baseInstance.go
781 lines (716 loc) · 37.6 KB
/
baseInstance.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
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
// 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 ocean
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Ocean Base Instance resource.
//
// For information about Ocean Base Instance and how to use it, see [What is Instance](https://www.alibabacloud.com/help/en/apsaradb-for-oceanbase/latest/what-is-oceanbase-database).
//
// > **NOTE:** Available since v1.203.0.
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ocean"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// name := "terraform-example"
// if param := cfg.Get("name"); param != "" {
// name = param
// }
// _default, err := alicloud.GetZones(ctx, nil, nil)
// if err != nil {
// return err
// }
// defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
// if err != nil {
// return err
// }
// _, err = ocean.NewBaseInstance(ctx, "default", &ocean.BaseInstanceArgs{
// ResourceGroupId: pulumi.String(defaultGetResourceGroups.Ids[0]),
// Zones: pulumi.StringArray{
// _default.Ids[len(_default.Ids)-2],
// _default.Ids[len(_default.Ids)-3],
// _default.Ids[len(_default.Ids)-4],
// },
// AutoRenew: pulumi.Bool(false),
// DiskSize: pulumi.Int(100),
// PaymentType: pulumi.String("PayAsYouGo"),
// InstanceClass: pulumi.String("8C32GB"),
// BackupRetainMode: pulumi.String("delete_all"),
// Series: pulumi.String("normal"),
// InstanceName: pulumi.String(name),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Ocean Base Instance can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:ocean/baseInstance:BaseInstance example <id>
// ```
type BaseInstance struct {
pulumi.CustomResourceState
// Whether to automatically renew.
// It takes effect when the parameter ChargeType is PrePaid. Value range:
// - true: automatic renewal.
// - false (default): no automatic renewal.
AutoRenew pulumi.BoolPtrOutput `pulumi:"autoRenew"`
// The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.
// - PeriodUnit is Week, AutoRenewPeriod is {"1", "2", "3"}.
// - PeriodUnit is Month, AutoRenewPeriod is {"1", "2", "3", "6", "12"}.
AutoRenewPeriod pulumi.IntPtrOutput `pulumi:"autoRenewPeriod"`
// The backup retention policy after the cluster is deleted. The values are as follows:
// - receive_all: Keep all backup sets;
// - delete_all: delete all backup sets;
// - receive_last: Keep the last backup set.
// > **NOTE:** The default value is delete_all.
BackupRetainMode pulumi.StringPtrOutput `pulumi:"backupRetainMode"`
// The product code of the OceanBase cluster._oceanbasepre_public_cn: Domestic station cloud database package Year-to-month package._oceanbasepost_public_cn: The domestic station cloud database is paid by the hour._obpre_public_intl: International Station Cloud Database Package Monthly Package.
CommodityCode pulumi.StringOutput `pulumi:"commodityCode"`
// The number of CPU cores of the cluster.
Cpu pulumi.IntOutput `pulumi:"cpu"`
// The creation time of the resource.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// The size of the storage space, in GB.
// The limits of storage space vary according to the cluster specifications, as follows:
// - 8C32GB:100GB ~ 10000GB
// - 14C70GB:200GB ~ 10000GB
// - 30C180GB:400GB ~ 10000GB
// - 62C400G:800GB ~ 10000GB.
// The default value of each package is its minimum value.
DiskSize pulumi.IntOutput `pulumi:"diskSize"`
// The storage type of the cluster. Effective only in the standard cluster version (cloud disk).
// Two types are currently supported:
// - cloud_essd_pl1: cloud disk ESSD pl1.
// - cloud_essd_pl0: cloud disk ESSD pl0. The default value is cloud_essd_pl1.
DiskType pulumi.StringOutput `pulumi:"diskType"`
// Cluster specification information.
// Four packages are currently supported:
// - 4C16GB:4cores 16GB
// - 8C32GB:8cores 32GB
// - 14C70GB:14cores 70GB
// - 24C120GB:24cores 120GB
// - 30C180GB:30cores 180GB
// - 62C400GB:62cores 400GB
// - 104C600GB:104cores 600GB
// - 16C70GB:16cores 70GB
// - 32C160GB:32cores 160GB
// - 64C380GB:64cores 380GB
// - 20C32GB:20cores 32GB
// - 40C64GB:40cores 64GB
// - 16C32GB:16cores 32GB
// - 32C70GB:32cores 70GB
// - 64C180GB:64cores 180GB
// - 32C180GB:32cores 180GB
// - 64C400GB:64cores 400GB.
InstanceClass pulumi.StringOutput `pulumi:"instanceClass"`
// OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.
InstanceName pulumi.StringOutput `pulumi:"instanceName"`
// The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.
NodeNum pulumi.StringOutput `pulumi:"nodeNum"`
// The OceanBase Server version number.
ObVersion pulumi.StringOutput `pulumi:"obVersion"`
// The payment method of the instance. Value range:
// - Subscription: Package year and month. When you select this type of payment method, you must make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error message will be returned.
// - PayAsYouGo (default): Pay-as-you-go (default hourly billing).
PaymentType pulumi.StringOutput `pulumi:"paymentType"`
// The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.
Period pulumi.IntPtrOutput `pulumi:"period"`
// The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.
PeriodUnit pulumi.StringPtrOutput `pulumi:"periodUnit"`
// The ID of the enterprise resource group to which the instance resides.
ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
// Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.
Series pulumi.StringOutput `pulumi:"series"`
// The status of the resource.
Status pulumi.StringOutput `pulumi:"status"`
// Information about the zone where the cluster is deployed.
Zones pulumi.StringArrayOutput `pulumi:"zones"`
}
// NewBaseInstance registers a new resource with the given unique name, arguments, and options.
func NewBaseInstance(ctx *pulumi.Context,
name string, args *BaseInstanceArgs, opts ...pulumi.ResourceOption) (*BaseInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DiskSize == nil {
return nil, errors.New("invalid value for required argument 'DiskSize'")
}
if args.InstanceClass == nil {
return nil, errors.New("invalid value for required argument 'InstanceClass'")
}
if args.PaymentType == nil {
return nil, errors.New("invalid value for required argument 'PaymentType'")
}
if args.Series == nil {
return nil, errors.New("invalid value for required argument 'Series'")
}
if args.Zones == nil {
return nil, errors.New("invalid value for required argument 'Zones'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BaseInstance
err := ctx.RegisterResource("alicloud:ocean/baseInstance:BaseInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBaseInstance gets an existing BaseInstance 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 GetBaseInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BaseInstanceState, opts ...pulumi.ResourceOption) (*BaseInstance, error) {
var resource BaseInstance
err := ctx.ReadResource("alicloud:ocean/baseInstance:BaseInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BaseInstance resources.
type baseInstanceState struct {
// Whether to automatically renew.
// It takes effect when the parameter ChargeType is PrePaid. Value range:
// - true: automatic renewal.
// - false (default): no automatic renewal.
AutoRenew *bool `pulumi:"autoRenew"`
// The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.
// - PeriodUnit is Week, AutoRenewPeriod is {"1", "2", "3"}.
// - PeriodUnit is Month, AutoRenewPeriod is {"1", "2", "3", "6", "12"}.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The backup retention policy after the cluster is deleted. The values are as follows:
// - receive_all: Keep all backup sets;
// - delete_all: delete all backup sets;
// - receive_last: Keep the last backup set.
// > **NOTE:** The default value is delete_all.
BackupRetainMode *string `pulumi:"backupRetainMode"`
// The product code of the OceanBase cluster._oceanbasepre_public_cn: Domestic station cloud database package Year-to-month package._oceanbasepost_public_cn: The domestic station cloud database is paid by the hour._obpre_public_intl: International Station Cloud Database Package Monthly Package.
CommodityCode *string `pulumi:"commodityCode"`
// The number of CPU cores of the cluster.
Cpu *int `pulumi:"cpu"`
// The creation time of the resource.
CreateTime *string `pulumi:"createTime"`
// The size of the storage space, in GB.
// The limits of storage space vary according to the cluster specifications, as follows:
// - 8C32GB:100GB ~ 10000GB
// - 14C70GB:200GB ~ 10000GB
// - 30C180GB:400GB ~ 10000GB
// - 62C400G:800GB ~ 10000GB.
// The default value of each package is its minimum value.
DiskSize *int `pulumi:"diskSize"`
// The storage type of the cluster. Effective only in the standard cluster version (cloud disk).
// Two types are currently supported:
// - cloud_essd_pl1: cloud disk ESSD pl1.
// - cloud_essd_pl0: cloud disk ESSD pl0. The default value is cloud_essd_pl1.
DiskType *string `pulumi:"diskType"`
// Cluster specification information.
// Four packages are currently supported:
// - 4C16GB:4cores 16GB
// - 8C32GB:8cores 32GB
// - 14C70GB:14cores 70GB
// - 24C120GB:24cores 120GB
// - 30C180GB:30cores 180GB
// - 62C400GB:62cores 400GB
// - 104C600GB:104cores 600GB
// - 16C70GB:16cores 70GB
// - 32C160GB:32cores 160GB
// - 64C380GB:64cores 380GB
// - 20C32GB:20cores 32GB
// - 40C64GB:40cores 64GB
// - 16C32GB:16cores 32GB
// - 32C70GB:32cores 70GB
// - 64C180GB:64cores 180GB
// - 32C180GB:32cores 180GB
// - 64C400GB:64cores 400GB.
InstanceClass *string `pulumi:"instanceClass"`
// OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.
InstanceName *string `pulumi:"instanceName"`
// The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.
NodeNum *string `pulumi:"nodeNum"`
// The OceanBase Server version number.
ObVersion *string `pulumi:"obVersion"`
// The payment method of the instance. Value range:
// - Subscription: Package year and month. When you select this type of payment method, you must make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error message will be returned.
// - PayAsYouGo (default): Pay-as-you-go (default hourly billing).
PaymentType *string `pulumi:"paymentType"`
// The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.
Period *int `pulumi:"period"`
// The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.
PeriodUnit *string `pulumi:"periodUnit"`
// The ID of the enterprise resource group to which the instance resides.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.
Series *string `pulumi:"series"`
// The status of the resource.
Status *string `pulumi:"status"`
// Information about the zone where the cluster is deployed.
Zones []string `pulumi:"zones"`
}
type BaseInstanceState struct {
// Whether to automatically renew.
// It takes effect when the parameter ChargeType is PrePaid. Value range:
// - true: automatic renewal.
// - false (default): no automatic renewal.
AutoRenew pulumi.BoolPtrInput
// The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.
// - PeriodUnit is Week, AutoRenewPeriod is {"1", "2", "3"}.
// - PeriodUnit is Month, AutoRenewPeriod is {"1", "2", "3", "6", "12"}.
AutoRenewPeriod pulumi.IntPtrInput
// The backup retention policy after the cluster is deleted. The values are as follows:
// - receive_all: Keep all backup sets;
// - delete_all: delete all backup sets;
// - receive_last: Keep the last backup set.
// > **NOTE:** The default value is delete_all.
BackupRetainMode pulumi.StringPtrInput
// The product code of the OceanBase cluster._oceanbasepre_public_cn: Domestic station cloud database package Year-to-month package._oceanbasepost_public_cn: The domestic station cloud database is paid by the hour._obpre_public_intl: International Station Cloud Database Package Monthly Package.
CommodityCode pulumi.StringPtrInput
// The number of CPU cores of the cluster.
Cpu pulumi.IntPtrInput
// The creation time of the resource.
CreateTime pulumi.StringPtrInput
// The size of the storage space, in GB.
// The limits of storage space vary according to the cluster specifications, as follows:
// - 8C32GB:100GB ~ 10000GB
// - 14C70GB:200GB ~ 10000GB
// - 30C180GB:400GB ~ 10000GB
// - 62C400G:800GB ~ 10000GB.
// The default value of each package is its minimum value.
DiskSize pulumi.IntPtrInput
// The storage type of the cluster. Effective only in the standard cluster version (cloud disk).
// Two types are currently supported:
// - cloud_essd_pl1: cloud disk ESSD pl1.
// - cloud_essd_pl0: cloud disk ESSD pl0. The default value is cloud_essd_pl1.
DiskType pulumi.StringPtrInput
// Cluster specification information.
// Four packages are currently supported:
// - 4C16GB:4cores 16GB
// - 8C32GB:8cores 32GB
// - 14C70GB:14cores 70GB
// - 24C120GB:24cores 120GB
// - 30C180GB:30cores 180GB
// - 62C400GB:62cores 400GB
// - 104C600GB:104cores 600GB
// - 16C70GB:16cores 70GB
// - 32C160GB:32cores 160GB
// - 64C380GB:64cores 380GB
// - 20C32GB:20cores 32GB
// - 40C64GB:40cores 64GB
// - 16C32GB:16cores 32GB
// - 32C70GB:32cores 70GB
// - 64C180GB:64cores 180GB
// - 32C180GB:32cores 180GB
// - 64C400GB:64cores 400GB.
InstanceClass pulumi.StringPtrInput
// OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.
InstanceName pulumi.StringPtrInput
// The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.
NodeNum pulumi.StringPtrInput
// The OceanBase Server version number.
ObVersion pulumi.StringPtrInput
// The payment method of the instance. Value range:
// - Subscription: Package year and month. When you select this type of payment method, you must make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error message will be returned.
// - PayAsYouGo (default): Pay-as-you-go (default hourly billing).
PaymentType pulumi.StringPtrInput
// The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.
Period pulumi.IntPtrInput
// The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.
PeriodUnit pulumi.StringPtrInput
// The ID of the enterprise resource group to which the instance resides.
ResourceGroupId pulumi.StringPtrInput
// Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.
Series pulumi.StringPtrInput
// The status of the resource.
Status pulumi.StringPtrInput
// Information about the zone where the cluster is deployed.
Zones pulumi.StringArrayInput
}
func (BaseInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*baseInstanceState)(nil)).Elem()
}
type baseInstanceArgs struct {
// Whether to automatically renew.
// It takes effect when the parameter ChargeType is PrePaid. Value range:
// - true: automatic renewal.
// - false (default): no automatic renewal.
AutoRenew *bool `pulumi:"autoRenew"`
// The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.
// - PeriodUnit is Week, AutoRenewPeriod is {"1", "2", "3"}.
// - PeriodUnit is Month, AutoRenewPeriod is {"1", "2", "3", "6", "12"}.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The backup retention policy after the cluster is deleted. The values are as follows:
// - receive_all: Keep all backup sets;
// - delete_all: delete all backup sets;
// - receive_last: Keep the last backup set.
// > **NOTE:** The default value is delete_all.
BackupRetainMode *string `pulumi:"backupRetainMode"`
// The size of the storage space, in GB.
// The limits of storage space vary according to the cluster specifications, as follows:
// - 8C32GB:100GB ~ 10000GB
// - 14C70GB:200GB ~ 10000GB
// - 30C180GB:400GB ~ 10000GB
// - 62C400G:800GB ~ 10000GB.
// The default value of each package is its minimum value.
DiskSize int `pulumi:"diskSize"`
// The storage type of the cluster. Effective only in the standard cluster version (cloud disk).
// Two types are currently supported:
// - cloud_essd_pl1: cloud disk ESSD pl1.
// - cloud_essd_pl0: cloud disk ESSD pl0. The default value is cloud_essd_pl1.
DiskType *string `pulumi:"diskType"`
// Cluster specification information.
// Four packages are currently supported:
// - 4C16GB:4cores 16GB
// - 8C32GB:8cores 32GB
// - 14C70GB:14cores 70GB
// - 24C120GB:24cores 120GB
// - 30C180GB:30cores 180GB
// - 62C400GB:62cores 400GB
// - 104C600GB:104cores 600GB
// - 16C70GB:16cores 70GB
// - 32C160GB:32cores 160GB
// - 64C380GB:64cores 380GB
// - 20C32GB:20cores 32GB
// - 40C64GB:40cores 64GB
// - 16C32GB:16cores 32GB
// - 32C70GB:32cores 70GB
// - 64C180GB:64cores 180GB
// - 32C180GB:32cores 180GB
// - 64C400GB:64cores 400GB.
InstanceClass string `pulumi:"instanceClass"`
// OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.
InstanceName *string `pulumi:"instanceName"`
// The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.
NodeNum *string `pulumi:"nodeNum"`
// The OceanBase Server version number.
ObVersion *string `pulumi:"obVersion"`
// The payment method of the instance. Value range:
// - Subscription: Package year and month. When you select this type of payment method, you must make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error message will be returned.
// - PayAsYouGo (default): Pay-as-you-go (default hourly billing).
PaymentType string `pulumi:"paymentType"`
// The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.
Period *int `pulumi:"period"`
// The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.
PeriodUnit *string `pulumi:"periodUnit"`
// The ID of the enterprise resource group to which the instance resides.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.
Series string `pulumi:"series"`
// Information about the zone where the cluster is deployed.
Zones []string `pulumi:"zones"`
}
// The set of arguments for constructing a BaseInstance resource.
type BaseInstanceArgs struct {
// Whether to automatically renew.
// It takes effect when the parameter ChargeType is PrePaid. Value range:
// - true: automatic renewal.
// - false (default): no automatic renewal.
AutoRenew pulumi.BoolPtrInput
// The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.
// - PeriodUnit is Week, AutoRenewPeriod is {"1", "2", "3"}.
// - PeriodUnit is Month, AutoRenewPeriod is {"1", "2", "3", "6", "12"}.
AutoRenewPeriod pulumi.IntPtrInput
// The backup retention policy after the cluster is deleted. The values are as follows:
// - receive_all: Keep all backup sets;
// - delete_all: delete all backup sets;
// - receive_last: Keep the last backup set.
// > **NOTE:** The default value is delete_all.
BackupRetainMode pulumi.StringPtrInput
// The size of the storage space, in GB.
// The limits of storage space vary according to the cluster specifications, as follows:
// - 8C32GB:100GB ~ 10000GB
// - 14C70GB:200GB ~ 10000GB
// - 30C180GB:400GB ~ 10000GB
// - 62C400G:800GB ~ 10000GB.
// The default value of each package is its minimum value.
DiskSize pulumi.IntInput
// The storage type of the cluster. Effective only in the standard cluster version (cloud disk).
// Two types are currently supported:
// - cloud_essd_pl1: cloud disk ESSD pl1.
// - cloud_essd_pl0: cloud disk ESSD pl0. The default value is cloud_essd_pl1.
DiskType pulumi.StringPtrInput
// Cluster specification information.
// Four packages are currently supported:
// - 4C16GB:4cores 16GB
// - 8C32GB:8cores 32GB
// - 14C70GB:14cores 70GB
// - 24C120GB:24cores 120GB
// - 30C180GB:30cores 180GB
// - 62C400GB:62cores 400GB
// - 104C600GB:104cores 600GB
// - 16C70GB:16cores 70GB
// - 32C160GB:32cores 160GB
// - 64C380GB:64cores 380GB
// - 20C32GB:20cores 32GB
// - 40C64GB:40cores 64GB
// - 16C32GB:16cores 32GB
// - 32C70GB:32cores 70GB
// - 64C180GB:64cores 180GB
// - 32C180GB:32cores 180GB
// - 64C400GB:64cores 400GB.
InstanceClass pulumi.StringInput
// OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.
InstanceName pulumi.StringPtrInput
// The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.
NodeNum pulumi.StringPtrInput
// The OceanBase Server version number.
ObVersion pulumi.StringPtrInput
// The payment method of the instance. Value range:
// - Subscription: Package year and month. When you select this type of payment method, you must make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error message will be returned.
// - PayAsYouGo (default): Pay-as-you-go (default hourly billing).
PaymentType pulumi.StringInput
// The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.
Period pulumi.IntPtrInput
// The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.
PeriodUnit pulumi.StringPtrInput
// The ID of the enterprise resource group to which the instance resides.
ResourceGroupId pulumi.StringPtrInput
// Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.
Series pulumi.StringInput
// Information about the zone where the cluster is deployed.
Zones pulumi.StringArrayInput
}
func (BaseInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*baseInstanceArgs)(nil)).Elem()
}
type BaseInstanceInput interface {
pulumi.Input
ToBaseInstanceOutput() BaseInstanceOutput
ToBaseInstanceOutputWithContext(ctx context.Context) BaseInstanceOutput
}
func (*BaseInstance) ElementType() reflect.Type {
return reflect.TypeOf((**BaseInstance)(nil)).Elem()
}
func (i *BaseInstance) ToBaseInstanceOutput() BaseInstanceOutput {
return i.ToBaseInstanceOutputWithContext(context.Background())
}
func (i *BaseInstance) ToBaseInstanceOutputWithContext(ctx context.Context) BaseInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(BaseInstanceOutput)
}
// BaseInstanceArrayInput is an input type that accepts BaseInstanceArray and BaseInstanceArrayOutput values.
// You can construct a concrete instance of `BaseInstanceArrayInput` via:
//
// BaseInstanceArray{ BaseInstanceArgs{...} }
type BaseInstanceArrayInput interface {
pulumi.Input
ToBaseInstanceArrayOutput() BaseInstanceArrayOutput
ToBaseInstanceArrayOutputWithContext(context.Context) BaseInstanceArrayOutput
}
type BaseInstanceArray []BaseInstanceInput
func (BaseInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BaseInstance)(nil)).Elem()
}
func (i BaseInstanceArray) ToBaseInstanceArrayOutput() BaseInstanceArrayOutput {
return i.ToBaseInstanceArrayOutputWithContext(context.Background())
}
func (i BaseInstanceArray) ToBaseInstanceArrayOutputWithContext(ctx context.Context) BaseInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BaseInstanceArrayOutput)
}
// BaseInstanceMapInput is an input type that accepts BaseInstanceMap and BaseInstanceMapOutput values.
// You can construct a concrete instance of `BaseInstanceMapInput` via:
//
// BaseInstanceMap{ "key": BaseInstanceArgs{...} }
type BaseInstanceMapInput interface {
pulumi.Input
ToBaseInstanceMapOutput() BaseInstanceMapOutput
ToBaseInstanceMapOutputWithContext(context.Context) BaseInstanceMapOutput
}
type BaseInstanceMap map[string]BaseInstanceInput
func (BaseInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BaseInstance)(nil)).Elem()
}
func (i BaseInstanceMap) ToBaseInstanceMapOutput() BaseInstanceMapOutput {
return i.ToBaseInstanceMapOutputWithContext(context.Background())
}
func (i BaseInstanceMap) ToBaseInstanceMapOutputWithContext(ctx context.Context) BaseInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BaseInstanceMapOutput)
}
type BaseInstanceOutput struct{ *pulumi.OutputState }
func (BaseInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BaseInstance)(nil)).Elem()
}
func (o BaseInstanceOutput) ToBaseInstanceOutput() BaseInstanceOutput {
return o
}
func (o BaseInstanceOutput) ToBaseInstanceOutputWithContext(ctx context.Context) BaseInstanceOutput {
return o
}
// Whether to automatically renew.
// It takes effect when the parameter ChargeType is PrePaid. Value range:
// - true: automatic renewal.
// - false (default): no automatic renewal.
func (o BaseInstanceOutput) AutoRenew() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.BoolPtrOutput { return v.AutoRenew }).(pulumi.BoolPtrOutput)
}
// The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.
// - PeriodUnit is Week, AutoRenewPeriod is {"1", "2", "3"}.
// - PeriodUnit is Month, AutoRenewPeriod is {"1", "2", "3", "6", "12"}.
func (o BaseInstanceOutput) AutoRenewPeriod() pulumi.IntPtrOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.IntPtrOutput { return v.AutoRenewPeriod }).(pulumi.IntPtrOutput)
}
// The backup retention policy after the cluster is deleted. The values are as follows:
// - receive_all: Keep all backup sets;
// - delete_all: delete all backup sets;
// - receive_last: Keep the last backup set.
// > **NOTE:** The default value is delete_all.
func (o BaseInstanceOutput) BackupRetainMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringPtrOutput { return v.BackupRetainMode }).(pulumi.StringPtrOutput)
}
// The product code of the OceanBase cluster._oceanbasepre_public_cn: Domestic station cloud database package Year-to-month package._oceanbasepost_public_cn: The domestic station cloud database is paid by the hour._obpre_public_intl: International Station Cloud Database Package Monthly Package.
func (o BaseInstanceOutput) CommodityCode() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.CommodityCode }).(pulumi.StringOutput)
}
// The number of CPU cores of the cluster.
func (o BaseInstanceOutput) Cpu() pulumi.IntOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.IntOutput { return v.Cpu }).(pulumi.IntOutput)
}
// The creation time of the resource.
func (o BaseInstanceOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// The size of the storage space, in GB.
// The limits of storage space vary according to the cluster specifications, as follows:
// - 8C32GB:100GB ~ 10000GB
// - 14C70GB:200GB ~ 10000GB
// - 30C180GB:400GB ~ 10000GB
// - 62C400G:800GB ~ 10000GB.
// The default value of each package is its minimum value.
func (o BaseInstanceOutput) DiskSize() pulumi.IntOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.IntOutput { return v.DiskSize }).(pulumi.IntOutput)
}
// The storage type of the cluster. Effective only in the standard cluster version (cloud disk).
// Two types are currently supported:
// - cloud_essd_pl1: cloud disk ESSD pl1.
// - cloud_essd_pl0: cloud disk ESSD pl0. The default value is cloud_essd_pl1.
func (o BaseInstanceOutput) DiskType() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.DiskType }).(pulumi.StringOutput)
}
// Cluster specification information.
// Four packages are currently supported:
// - 4C16GB:4cores 16GB
// - 8C32GB:8cores 32GB
// - 14C70GB:14cores 70GB
// - 24C120GB:24cores 120GB
// - 30C180GB:30cores 180GB
// - 62C400GB:62cores 400GB
// - 104C600GB:104cores 600GB
// - 16C70GB:16cores 70GB
// - 32C160GB:32cores 160GB
// - 64C380GB:64cores 380GB
// - 20C32GB:20cores 32GB
// - 40C64GB:40cores 64GB
// - 16C32GB:16cores 32GB
// - 32C70GB:32cores 70GB
// - 64C180GB:64cores 180GB
// - 32C180GB:32cores 180GB
// - 64C400GB:64cores 400GB.
func (o BaseInstanceOutput) InstanceClass() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.InstanceClass }).(pulumi.StringOutput)
}
// OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.
func (o BaseInstanceOutput) InstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.InstanceName }).(pulumi.StringOutput)
}
// The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.
func (o BaseInstanceOutput) NodeNum() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.NodeNum }).(pulumi.StringOutput)
}
// The OceanBase Server version number.
func (o BaseInstanceOutput) ObVersion() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.ObVersion }).(pulumi.StringOutput)
}
// The payment method of the instance. Value range:
// - Subscription: Package year and month. When you select this type of payment method, you must make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error message will be returned.
// - PayAsYouGo (default): Pay-as-you-go (default hourly billing).
func (o BaseInstanceOutput) PaymentType() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.PaymentType }).(pulumi.StringOutput)
}
// The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.
func (o BaseInstanceOutput) Period() pulumi.IntPtrOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.IntPtrOutput { return v.Period }).(pulumi.IntPtrOutput)
}
// The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.
func (o BaseInstanceOutput) PeriodUnit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringPtrOutput { return v.PeriodUnit }).(pulumi.StringPtrOutput)
}
// The ID of the enterprise resource group to which the instance resides.
func (o BaseInstanceOutput) ResourceGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput)
}
// Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.
func (o BaseInstanceOutput) Series() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.Series }).(pulumi.StringOutput)
}
// The status of the resource.
func (o BaseInstanceOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// Information about the zone where the cluster is deployed.
func (o BaseInstanceOutput) Zones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BaseInstance) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput)
}
type BaseInstanceArrayOutput struct{ *pulumi.OutputState }
func (BaseInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BaseInstance)(nil)).Elem()
}
func (o BaseInstanceArrayOutput) ToBaseInstanceArrayOutput() BaseInstanceArrayOutput {
return o
}
func (o BaseInstanceArrayOutput) ToBaseInstanceArrayOutputWithContext(ctx context.Context) BaseInstanceArrayOutput {
return o
}
func (o BaseInstanceArrayOutput) Index(i pulumi.IntInput) BaseInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BaseInstance {
return vs[0].([]*BaseInstance)[vs[1].(int)]
}).(BaseInstanceOutput)
}
type BaseInstanceMapOutput struct{ *pulumi.OutputState }
func (BaseInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BaseInstance)(nil)).Elem()
}
func (o BaseInstanceMapOutput) ToBaseInstanceMapOutput() BaseInstanceMapOutput {
return o
}
func (o BaseInstanceMapOutput) ToBaseInstanceMapOutputWithContext(ctx context.Context) BaseInstanceMapOutput {
return o
}
func (o BaseInstanceMapOutput) MapIndex(k pulumi.StringInput) BaseInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BaseInstance {
return vs[0].(map[string]*BaseInstance)[vs[1].(string)]
}).(BaseInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BaseInstanceInput)(nil)).Elem(), &BaseInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*BaseInstanceArrayInput)(nil)).Elem(), BaseInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BaseInstanceMapInput)(nil)).Elem(), BaseInstanceMap{})
pulumi.RegisterOutputType(BaseInstanceOutput{})
pulumi.RegisterOutputType(BaseInstanceArrayOutput{})
pulumi.RegisterOutputType(BaseInstanceMapOutput{})
}