/
rdsUpgradeDbInstance.go
1533 lines (1432 loc) · 111 KB
/
rdsUpgradeDbInstance.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
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a RDS Upgrade DB Instance resource.
//
// For information about RDS Upgrade DB Instance and how to use it, see [What is ApsaraDB for RDS](https://www.alibabacloud.com/help/en/doc-detail/26092.htm).
//
// > **NOTE:** Available since v1.153.0+.
//
// ## Example Usage
//
// ### Create a RDS PostgreSQL upgrade instance
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := rds.GetZones(ctx, &rds.GetZonesArgs{
// Engine: pulumi.StringRef("PostgreSQL"),
// EngineVersion: pulumi.StringRef("13.0"),
// InstanceChargeType: pulumi.StringRef("PostPaid"),
// Category: pulumi.StringRef("HighAvailability"),
// DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
// }, nil)
// if err != nil {
// return err
// }
// exampleGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
// ZoneId: pulumi.StringRef(example.Zones[0].Id),
// Engine: pulumi.StringRef("PostgreSQL"),
// EngineVersion: pulumi.StringRef("13.0"),
// Category: pulumi.StringRef("HighAvailability"),
// DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
// InstanceChargeType: pulumi.StringRef("PostPaid"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = rds.GetCrossRegions(ctx, nil, nil)
// if err != nil {
// return err
// }
// exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
// VpcName: pulumi.String("terraform-example"),
// CidrBlock: pulumi.String("172.16.0.0/16"),
// })
// if err != nil {
// return err
// }
// exampleSwitch, err := vpc.NewSwitch(ctx, "example", &vpc.SwitchArgs{
// VpcId: exampleNetwork.ID(),
// CidrBlock: pulumi.String("172.16.0.0/24"),
// ZoneId: pulumi.String(example.Zones[0].Id),
// VswitchName: pulumi.String("terraform-example"),
// })
// if err != nil {
// return err
// }
// exampleInstance, err := rds.NewInstance(ctx, "example", &rds.InstanceArgs{
// Engine: pulumi.String("PostgreSQL"),
// EngineVersion: pulumi.String("13.0"),
// DbInstanceStorageType: pulumi.String("cloud_essd"),
// InstanceType: pulumi.String(exampleGetInstanceClasses.InstanceClasses[0].InstanceClass),
// InstanceStorage: pulumi.String(exampleGetInstanceClasses.InstanceClasses[0].StorageRange.Min),
// InstanceChargeType: pulumi.String("Postpaid"),
// InstanceName: pulumi.String("terraform-example"),
// VswitchId: exampleSwitch.ID(),
// MonitoringPeriod: pulumi.Int(60),
// })
// if err != nil {
// return err
// }
// _, err = rds.NewRdsUpgradeDbInstance(ctx, "example", &rds.RdsUpgradeDbInstanceArgs{
// SourceDbInstanceId: exampleInstance.ID(),
// TargetMajorVersion: pulumi.String("14.0"),
// DbInstanceClass: exampleInstance.InstanceType,
// DbInstanceStorage: exampleInstance.InstanceStorage,
// DbInstanceStorageType: exampleInstance.DbInstanceStorageType,
// InstanceNetworkType: pulumi.String("VPC"),
// CollectStatMode: pulumi.String("After"),
// SwitchOver: pulumi.String("false"),
// PaymentType: pulumi.String("PayAsYouGo"),
// DbInstanceDescription: pulumi.String("terraform-example"),
// VswitchId: exampleSwitch.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// RDS Upgrade DB Instance can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:rds/rdsUpgradeDbInstance:RdsUpgradeDbInstance example <id>
// ```
type RdsUpgradeDbInstance struct {
pulumi.CustomResourceState
// This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
Acl pulumi.StringOutput `pulumi:"acl"`
// How to upgrade the minor version of the instance. Valid values:
// * **Auto**: automatically upgrade the minor version.
// * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
AutoUpgradeMinorVersion pulumi.StringOutput `pulumi:"autoUpgradeMinorVersion"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of sslAction is Open, the default value of this parameter is aliyun. Value range:
// * **aliyun**: using cloud certificates.
// * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
CaType pulumi.StringOutput `pulumi:"caType"`
// The file that contains the certificate used for TDE.
Certificate pulumi.StringPtrOutput `pulumi:"certificate"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of clientCaEnabled is 1, this parameter must be configured.
ClientCaCert pulumi.StringPtrOutput `pulumi:"clientCaCert"`
// The client ca enabled.
ClientCaEnabled pulumi.IntPtrOutput `pulumi:"clientCaEnabled"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of clientCrlEnabled is 1, this parameter must be configured.
ClientCertRevocationList pulumi.StringPtrOutput `pulumi:"clientCertRevocationList"`
// The client crl enabled.
ClientCrlEnabled pulumi.IntPtrOutput `pulumi:"clientCrlEnabled"`
// The time at which ApsaraDB RDS collects the statistics of the new instance.
// * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
// * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
//
// > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
CollectStatMode pulumi.StringOutput `pulumi:"collectStatMode"`
// The database connection address.
ConnectionString pulumi.StringOutput `pulumi:"connectionString"`
// The connection string prefix.
ConnectionStringPrefix pulumi.StringPtrOutput `pulumi:"connectionStringPrefix"`
// The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
DbInstanceClass pulumi.StringOutput `pulumi:"dbInstanceClass"`
// The db instance description.
DbInstanceDescription pulumi.StringOutput `pulumi:"dbInstanceDescription"`
// The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
//
// > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
DbInstanceStorage pulumi.IntOutput `pulumi:"dbInstanceStorage"`
// The type of storage media that is used for the new instance. Valid values:
// * **local_ssd**: local SSDs.
// * **cloud_ssd**: standard SSDs.
// * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
// * **cloud_essd2**: ESSDs of PL2.
// * **cloud_essd3**: ESSDs of PL3.
DbInstanceStorageType pulumi.StringOutput `pulumi:"dbInstanceStorageType"`
// The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
//
// > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
DbName pulumi.StringPtrOutput `pulumi:"dbName"`
// The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
DedicatedHostGroupId pulumi.StringPtrOutput `pulumi:"dedicatedHostGroupId"`
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
//
// > **NOTE:** `deletionProtection` is valid only when attribute `paymentType` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
DeletionProtection pulumi.BoolPtrOutput `pulumi:"deletionProtection"`
// The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
Direction pulumi.StringPtrOutput `pulumi:"direction"`
// The effective time.
EffectiveTime pulumi.StringPtrOutput `pulumi:"effectiveTime"`
// The ID of the private key.
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
EncryptionKey pulumi.StringPtrOutput `pulumi:"encryptionKey"`
// Database type. Value options: MySQL, SQLServer, PostgreSQL.
Engine pulumi.StringOutput `pulumi:"engine"`
// Database version. Value:
// * MySQL: **5.5/5.6/5.7/8.0**.
// * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
// * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
// * MariaDB: **10.3**.
EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrOutput `pulumi:"forceRestart"`
// The high availability mode. Valid values:
// * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
// * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
HaMode pulumi.StringOutput `pulumi:"haMode"`
// The network type of the instance. Valid values:
// * **Classic**: Classic Network.
// * **VPC**: VPC.
InstanceNetworkType pulumi.StringOutput `pulumi:"instanceNetworkType"`
// The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
MaintainTime pulumi.StringOutput `pulumi:"maintainTime"`
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
Parameters RdsUpgradeDbInstanceParameterArrayOutput `pulumi:"parameters"`
// The password of the certificate.
//
// > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
Password pulumi.StringPtrOutput `pulumi:"password"`
// The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
PaymentType pulumi.StringOutput `pulumi:"paymentType"`
// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pgHbaConf` below.
PgHbaConfs RdsUpgradeDbInstancePgHbaConfArrayOutput `pulumi:"pgHbaConfs"`
// The port.
Port pulumi.StringOutput `pulumi:"port"`
// The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
PrivateIpAddress pulumi.StringOutput `pulumi:"privateIpAddress"`
// The file that contains the private key used for TDE.
PrivateKey pulumi.StringPtrOutput `pulumi:"privateKey"`
// The released keep policy.
ReleasedKeepPolicy pulumi.StringPtrOutput `pulumi:"releasedKeepPolicy"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
ReplicationAcl pulumi.StringOutput `pulumi:"replicationAcl"`
// The resource group id.
ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
// The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
RoleArn pulumi.StringPtrOutput `pulumi:"roleArn"`
// The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
// * IP address form, for example: 10.23.12.24.
// * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
//
// > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
SecurityIps pulumi.StringArrayOutput `pulumi:"securityIps"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
ServerCert pulumi.StringOutput `pulumi:"serverCert"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
ServerKey pulumi.StringOutput `pulumi:"serverKey"`
// The source biz.
SourceBiz pulumi.StringPtrOutput `pulumi:"sourceBiz"`
// The source db instance id.
SourceDbInstanceId pulumi.StringOutput `pulumi:"sourceDbInstanceId"`
// Enable or disable SSL. Valid values: `0` and `1`.
SslEnabled pulumi.IntOutput `pulumi:"sslEnabled"`
// Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
// * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
// * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
// * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
// * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
// * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
// * The data migration does not interrupt your workloads on the original instance.
// * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
SwitchOver pulumi.StringOutput `pulumi:"switchOver"`
// The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
SwitchTime pulumi.StringPtrOutput `pulumi:"switchTime"`
// The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
// * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
// * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
SwitchTimeMode pulumi.StringPtrOutput `pulumi:"switchTimeMode"`
// [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
// * **Sync**: strong synchronization.
// * **Semi-sync**: Semi-synchronous.
// * **Async**: asynchronous.
//
// > **NOTE:** SQL Server 2017 cluster version is currently not supported.
SyncMode pulumi.StringOutput `pulumi:"syncMode"`
// The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
//
// > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
TargetMajorVersion pulumi.StringOutput `pulumi:"targetMajorVersion"`
// The availability check method of the instance. Valid values:
// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
TcpConnectionType pulumi.StringOutput `pulumi:"tcpConnectionType"`
// Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
TdeStatus pulumi.StringPtrOutput `pulumi:"tdeStatus"`
// The ID of the VPC to which the new instance belongs.
//
// > **NOTE:** Make sure that the VPC resides in the specified region.
VpcId pulumi.StringOutput `pulumi:"vpcId"`
// The ID of the vSwitch associated with the specified VPC.
//
// > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
VswitchId pulumi.StringOutput `pulumi:"vswitchId"`
// The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
//
// > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
ZoneId pulumi.StringOutput `pulumi:"zoneId"`
// The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
ZoneIdSlave1 pulumi.StringOutput `pulumi:"zoneIdSlave1"`
}
// NewRdsUpgradeDbInstance registers a new resource with the given unique name, arguments, and options.
func NewRdsUpgradeDbInstance(ctx *pulumi.Context,
name string, args *RdsUpgradeDbInstanceArgs, opts ...pulumi.ResourceOption) (*RdsUpgradeDbInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CollectStatMode == nil {
return nil, errors.New("invalid value for required argument 'CollectStatMode'")
}
if args.DbInstanceClass == nil {
return nil, errors.New("invalid value for required argument 'DbInstanceClass'")
}
if args.DbInstanceStorage == nil {
return nil, errors.New("invalid value for required argument 'DbInstanceStorage'")
}
if args.DbInstanceStorageType == nil {
return nil, errors.New("invalid value for required argument 'DbInstanceStorageType'")
}
if args.InstanceNetworkType == nil {
return nil, errors.New("invalid value for required argument 'InstanceNetworkType'")
}
if args.PaymentType == nil {
return nil, errors.New("invalid value for required argument 'PaymentType'")
}
if args.SourceDbInstanceId == nil {
return nil, errors.New("invalid value for required argument 'SourceDbInstanceId'")
}
if args.SwitchOver == nil {
return nil, errors.New("invalid value for required argument 'SwitchOver'")
}
if args.TargetMajorVersion == nil {
return nil, errors.New("invalid value for required argument 'TargetMajorVersion'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource RdsUpgradeDbInstance
err := ctx.RegisterResource("alicloud:rds/rdsUpgradeDbInstance:RdsUpgradeDbInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRdsUpgradeDbInstance gets an existing RdsUpgradeDbInstance 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 GetRdsUpgradeDbInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RdsUpgradeDbInstanceState, opts ...pulumi.ResourceOption) (*RdsUpgradeDbInstance, error) {
var resource RdsUpgradeDbInstance
err := ctx.ReadResource("alicloud:rds/rdsUpgradeDbInstance:RdsUpgradeDbInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RdsUpgradeDbInstance resources.
type rdsUpgradeDbInstanceState struct {
// This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
Acl *string `pulumi:"acl"`
// How to upgrade the minor version of the instance. Valid values:
// * **Auto**: automatically upgrade the minor version.
// * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
AutoUpgradeMinorVersion *string `pulumi:"autoUpgradeMinorVersion"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of sslAction is Open, the default value of this parameter is aliyun. Value range:
// * **aliyun**: using cloud certificates.
// * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
CaType *string `pulumi:"caType"`
// The file that contains the certificate used for TDE.
Certificate *string `pulumi:"certificate"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of clientCaEnabled is 1, this parameter must be configured.
ClientCaCert *string `pulumi:"clientCaCert"`
// The client ca enabled.
ClientCaEnabled *int `pulumi:"clientCaEnabled"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of clientCrlEnabled is 1, this parameter must be configured.
ClientCertRevocationList *string `pulumi:"clientCertRevocationList"`
// The client crl enabled.
ClientCrlEnabled *int `pulumi:"clientCrlEnabled"`
// The time at which ApsaraDB RDS collects the statistics of the new instance.
// * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
// * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
//
// > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
CollectStatMode *string `pulumi:"collectStatMode"`
// The database connection address.
ConnectionString *string `pulumi:"connectionString"`
// The connection string prefix.
ConnectionStringPrefix *string `pulumi:"connectionStringPrefix"`
// The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
DbInstanceClass *string `pulumi:"dbInstanceClass"`
// The db instance description.
DbInstanceDescription *string `pulumi:"dbInstanceDescription"`
// The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
//
// > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
DbInstanceStorage *int `pulumi:"dbInstanceStorage"`
// The type of storage media that is used for the new instance. Valid values:
// * **local_ssd**: local SSDs.
// * **cloud_ssd**: standard SSDs.
// * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
// * **cloud_essd2**: ESSDs of PL2.
// * **cloud_essd3**: ESSDs of PL3.
DbInstanceStorageType *string `pulumi:"dbInstanceStorageType"`
// The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
//
// > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
DbName *string `pulumi:"dbName"`
// The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
DedicatedHostGroupId *string `pulumi:"dedicatedHostGroupId"`
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
//
// > **NOTE:** `deletionProtection` is valid only when attribute `paymentType` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
DeletionProtection *bool `pulumi:"deletionProtection"`
// The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
Direction *string `pulumi:"direction"`
// The effective time.
EffectiveTime *string `pulumi:"effectiveTime"`
// The ID of the private key.
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
EncryptionKey *string `pulumi:"encryptionKey"`
// Database type. Value options: MySQL, SQLServer, PostgreSQL.
Engine *string `pulumi:"engine"`
// Database version. Value:
// * MySQL: **5.5/5.6/5.7/8.0**.
// * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
// * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
// * MariaDB: **10.3**.
EngineVersion *string `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart *bool `pulumi:"forceRestart"`
// The high availability mode. Valid values:
// * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
// * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
HaMode *string `pulumi:"haMode"`
// The network type of the instance. Valid values:
// * **Classic**: Classic Network.
// * **VPC**: VPC.
InstanceNetworkType *string `pulumi:"instanceNetworkType"`
// The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
MaintainTime *string `pulumi:"maintainTime"`
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
Parameters []RdsUpgradeDbInstanceParameter `pulumi:"parameters"`
// The password of the certificate.
//
// > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
Password *string `pulumi:"password"`
// The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
PaymentType *string `pulumi:"paymentType"`
// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pgHbaConf` below.
PgHbaConfs []RdsUpgradeDbInstancePgHbaConf `pulumi:"pgHbaConfs"`
// The port.
Port *string `pulumi:"port"`
// The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
PrivateIpAddress *string `pulumi:"privateIpAddress"`
// The file that contains the private key used for TDE.
PrivateKey *string `pulumi:"privateKey"`
// The released keep policy.
ReleasedKeepPolicy *string `pulumi:"releasedKeepPolicy"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
ReplicationAcl *string `pulumi:"replicationAcl"`
// The resource group id.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
RoleArn *string `pulumi:"roleArn"`
// The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
// * IP address form, for example: 10.23.12.24.
// * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
//
// > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
SecurityIps []string `pulumi:"securityIps"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
ServerCert *string `pulumi:"serverCert"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
ServerKey *string `pulumi:"serverKey"`
// The source biz.
SourceBiz *string `pulumi:"sourceBiz"`
// The source db instance id.
SourceDbInstanceId *string `pulumi:"sourceDbInstanceId"`
// Enable or disable SSL. Valid values: `0` and `1`.
SslEnabled *int `pulumi:"sslEnabled"`
// Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
// * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
// * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
// * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
// * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
// * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
// * The data migration does not interrupt your workloads on the original instance.
// * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
SwitchOver *string `pulumi:"switchOver"`
// The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
SwitchTime *string `pulumi:"switchTime"`
// The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
// * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
// * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
SwitchTimeMode *string `pulumi:"switchTimeMode"`
// [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
// * **Sync**: strong synchronization.
// * **Semi-sync**: Semi-synchronous.
// * **Async**: asynchronous.
//
// > **NOTE:** SQL Server 2017 cluster version is currently not supported.
SyncMode *string `pulumi:"syncMode"`
// The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
//
// > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
TargetMajorVersion *string `pulumi:"targetMajorVersion"`
// The availability check method of the instance. Valid values:
// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
TcpConnectionType *string `pulumi:"tcpConnectionType"`
// Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
TdeStatus *string `pulumi:"tdeStatus"`
// The ID of the VPC to which the new instance belongs.
//
// > **NOTE:** Make sure that the VPC resides in the specified region.
VpcId *string `pulumi:"vpcId"`
// The ID of the vSwitch associated with the specified VPC.
//
// > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
VswitchId *string `pulumi:"vswitchId"`
// The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
//
// > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
ZoneId *string `pulumi:"zoneId"`
// The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
ZoneIdSlave1 *string `pulumi:"zoneIdSlave1"`
}
type RdsUpgradeDbInstanceState struct {
// This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
Acl pulumi.StringPtrInput
// How to upgrade the minor version of the instance. Valid values:
// * **Auto**: automatically upgrade the minor version.
// * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
AutoUpgradeMinorVersion pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of sslAction is Open, the default value of this parameter is aliyun. Value range:
// * **aliyun**: using cloud certificates.
// * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
CaType pulumi.StringPtrInput
// The file that contains the certificate used for TDE.
Certificate pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of clientCaEnabled is 1, this parameter must be configured.
ClientCaCert pulumi.StringPtrInput
// The client ca enabled.
ClientCaEnabled pulumi.IntPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of clientCrlEnabled is 1, this parameter must be configured.
ClientCertRevocationList pulumi.StringPtrInput
// The client crl enabled.
ClientCrlEnabled pulumi.IntPtrInput
// The time at which ApsaraDB RDS collects the statistics of the new instance.
// * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
// * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
//
// > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
CollectStatMode pulumi.StringPtrInput
// The database connection address.
ConnectionString pulumi.StringPtrInput
// The connection string prefix.
ConnectionStringPrefix pulumi.StringPtrInput
// The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
DbInstanceClass pulumi.StringPtrInput
// The db instance description.
DbInstanceDescription pulumi.StringPtrInput
// The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
//
// > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
DbInstanceStorage pulumi.IntPtrInput
// The type of storage media that is used for the new instance. Valid values:
// * **local_ssd**: local SSDs.
// * **cloud_ssd**: standard SSDs.
// * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
// * **cloud_essd2**: ESSDs of PL2.
// * **cloud_essd3**: ESSDs of PL3.
DbInstanceStorageType pulumi.StringPtrInput
// The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
//
// > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
DbName pulumi.StringPtrInput
// The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
DedicatedHostGroupId pulumi.StringPtrInput
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
//
// > **NOTE:** `deletionProtection` is valid only when attribute `paymentType` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
DeletionProtection pulumi.BoolPtrInput
// The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
Direction pulumi.StringPtrInput
// The effective time.
EffectiveTime pulumi.StringPtrInput
// The ID of the private key.
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
EncryptionKey pulumi.StringPtrInput
// Database type. Value options: MySQL, SQLServer, PostgreSQL.
Engine pulumi.StringPtrInput
// Database version. Value:
// * MySQL: **5.5/5.6/5.7/8.0**.
// * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
// * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
// * MariaDB: **10.3**.
EngineVersion pulumi.StringPtrInput
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrInput
// The high availability mode. Valid values:
// * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
// * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
HaMode pulumi.StringPtrInput
// The network type of the instance. Valid values:
// * **Classic**: Classic Network.
// * **VPC**: VPC.
InstanceNetworkType pulumi.StringPtrInput
// The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
MaintainTime pulumi.StringPtrInput
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
Parameters RdsUpgradeDbInstanceParameterArrayInput
// The password of the certificate.
//
// > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
Password pulumi.StringPtrInput
// The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
PaymentType pulumi.StringPtrInput
// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pgHbaConf` below.
PgHbaConfs RdsUpgradeDbInstancePgHbaConfArrayInput
// The port.
Port pulumi.StringPtrInput
// The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
PrivateIpAddress pulumi.StringPtrInput
// The file that contains the private key used for TDE.
PrivateKey pulumi.StringPtrInput
// The released keep policy.
ReleasedKeepPolicy pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
ReplicationAcl pulumi.StringPtrInput
// The resource group id.
ResourceGroupId pulumi.StringPtrInput
// The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
RoleArn pulumi.StringPtrInput
// The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
// * IP address form, for example: 10.23.12.24.
// * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
//
// > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
SecurityIps pulumi.StringArrayInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
ServerCert pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
ServerKey pulumi.StringPtrInput
// The source biz.
SourceBiz pulumi.StringPtrInput
// The source db instance id.
SourceDbInstanceId pulumi.StringPtrInput
// Enable or disable SSL. Valid values: `0` and `1`.
SslEnabled pulumi.IntPtrInput
// Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
// * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
// * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
// * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
// * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
// * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
// * The data migration does not interrupt your workloads on the original instance.
// * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
SwitchOver pulumi.StringPtrInput
// The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
SwitchTime pulumi.StringPtrInput
// The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
// * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
// * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
SwitchTimeMode pulumi.StringPtrInput
// [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
// * **Sync**: strong synchronization.
// * **Semi-sync**: Semi-synchronous.
// * **Async**: asynchronous.
//
// > **NOTE:** SQL Server 2017 cluster version is currently not supported.
SyncMode pulumi.StringPtrInput
// The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
//
// > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
TargetMajorVersion pulumi.StringPtrInput
// The availability check method of the instance. Valid values:
// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
TcpConnectionType pulumi.StringPtrInput
// Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
TdeStatus pulumi.StringPtrInput
// The ID of the VPC to which the new instance belongs.
//
// > **NOTE:** Make sure that the VPC resides in the specified region.
VpcId pulumi.StringPtrInput
// The ID of the vSwitch associated with the specified VPC.
//
// > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
VswitchId pulumi.StringPtrInput
// The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
//
// > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
ZoneId pulumi.StringPtrInput
// The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
ZoneIdSlave1 pulumi.StringPtrInput
}
func (RdsUpgradeDbInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*rdsUpgradeDbInstanceState)(nil)).Elem()
}
type rdsUpgradeDbInstanceArgs struct {
// This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
Acl *string `pulumi:"acl"`
// How to upgrade the minor version of the instance. Valid values:
// * **Auto**: automatically upgrade the minor version.
// * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
AutoUpgradeMinorVersion *string `pulumi:"autoUpgradeMinorVersion"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of sslAction is Open, the default value of this parameter is aliyun. Value range:
// * **aliyun**: using cloud certificates.
// * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
CaType *string `pulumi:"caType"`
// The file that contains the certificate used for TDE.
Certificate *string `pulumi:"certificate"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of clientCaEnabled is 1, this parameter must be configured.
ClientCaCert *string `pulumi:"clientCaCert"`
// The client ca enabled.
ClientCaEnabled *int `pulumi:"clientCaEnabled"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of clientCrlEnabled is 1, this parameter must be configured.
ClientCertRevocationList *string `pulumi:"clientCertRevocationList"`
// The client crl enabled.
ClientCrlEnabled *int `pulumi:"clientCrlEnabled"`
// The time at which ApsaraDB RDS collects the statistics of the new instance.
// * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
// * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
//
// > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
CollectStatMode string `pulumi:"collectStatMode"`
// The connection string prefix.
ConnectionStringPrefix *string `pulumi:"connectionStringPrefix"`
// The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
DbInstanceClass string `pulumi:"dbInstanceClass"`
// The db instance description.
DbInstanceDescription *string `pulumi:"dbInstanceDescription"`
// The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
//
// > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
DbInstanceStorage int `pulumi:"dbInstanceStorage"`
// The type of storage media that is used for the new instance. Valid values:
// * **local_ssd**: local SSDs.
// * **cloud_ssd**: standard SSDs.
// * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
// * **cloud_essd2**: ESSDs of PL2.
// * **cloud_essd3**: ESSDs of PL3.
DbInstanceStorageType string `pulumi:"dbInstanceStorageType"`
// The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
//
// > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
DbName *string `pulumi:"dbName"`
// The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
DedicatedHostGroupId *string `pulumi:"dedicatedHostGroupId"`
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
//
// > **NOTE:** `deletionProtection` is valid only when attribute `paymentType` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
DeletionProtection *bool `pulumi:"deletionProtection"`
// The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
Direction *string `pulumi:"direction"`
// The effective time.
EffectiveTime *string `pulumi:"effectiveTime"`
// The ID of the private key.
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
EncryptionKey *string `pulumi:"encryptionKey"`
// Database type. Value options: MySQL, SQLServer, PostgreSQL.
Engine *string `pulumi:"engine"`
// Database version. Value:
// * MySQL: **5.5/5.6/5.7/8.0**.
// * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
// * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
// * MariaDB: **10.3**.
EngineVersion *string `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart *bool `pulumi:"forceRestart"`
// The high availability mode. Valid values:
// * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
// * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
HaMode *string `pulumi:"haMode"`
// The network type of the instance. Valid values:
// * **Classic**: Classic Network.
// * **VPC**: VPC.
InstanceNetworkType string `pulumi:"instanceNetworkType"`
// The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
MaintainTime *string `pulumi:"maintainTime"`
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
Parameters []RdsUpgradeDbInstanceParameter `pulumi:"parameters"`
// The password of the certificate.
//
// > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
Password *string `pulumi:"password"`
// The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
PaymentType string `pulumi:"paymentType"`
// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pgHbaConf` below.
PgHbaConfs []RdsUpgradeDbInstancePgHbaConf `pulumi:"pgHbaConfs"`
// The port.
Port *string `pulumi:"port"`
// The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
PrivateIpAddress *string `pulumi:"privateIpAddress"`
// The file that contains the private key used for TDE.
PrivateKey *string `pulumi:"privateKey"`
// The released keep policy.
ReleasedKeepPolicy *string `pulumi:"releasedKeepPolicy"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
ReplicationAcl *string `pulumi:"replicationAcl"`
// The resource group id.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
RoleArn *string `pulumi:"roleArn"`
// The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
// * IP address form, for example: 10.23.12.24.
// * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
//
// > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
SecurityIps []string `pulumi:"securityIps"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
ServerCert *string `pulumi:"serverCert"`
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
ServerKey *string `pulumi:"serverKey"`
// The source biz.
SourceBiz *string `pulumi:"sourceBiz"`
// The source db instance id.
SourceDbInstanceId string `pulumi:"sourceDbInstanceId"`
// Enable or disable SSL. Valid values: `0` and `1`.
SslEnabled *int `pulumi:"sslEnabled"`
// Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
// * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
// * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
// * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
// * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
// * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
// * The data migration does not interrupt your workloads on the original instance.
// * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
SwitchOver string `pulumi:"switchOver"`
// The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
SwitchTime *string `pulumi:"switchTime"`
// The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
// * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
// * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
SwitchTimeMode *string `pulumi:"switchTimeMode"`
// [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
// * **Sync**: strong synchronization.
// * **Semi-sync**: Semi-synchronous.
// * **Async**: asynchronous.
//
// > **NOTE:** SQL Server 2017 cluster version is currently not supported.
SyncMode *string `pulumi:"syncMode"`
// The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
//
// > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
TargetMajorVersion string `pulumi:"targetMajorVersion"`
// The availability check method of the instance. Valid values:
// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
TcpConnectionType *string `pulumi:"tcpConnectionType"`
// Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
TdeStatus *string `pulumi:"tdeStatus"`
// The ID of the VPC to which the new instance belongs.
//
// > **NOTE:** Make sure that the VPC resides in the specified region.
VpcId *string `pulumi:"vpcId"`
// The ID of the vSwitch associated with the specified VPC.
//
// > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
VswitchId *string `pulumi:"vswitchId"`
// The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
//
// > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
ZoneId *string `pulumi:"zoneId"`
// The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
ZoneIdSlave1 *string `pulumi:"zoneIdSlave1"`
}
// The set of arguments for constructing a RdsUpgradeDbInstance resource.
type RdsUpgradeDbInstanceArgs struct {
// This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
Acl pulumi.StringPtrInput
// How to upgrade the minor version of the instance. Valid values:
// * **Auto**: automatically upgrade the minor version.
// * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
AutoUpgradeMinorVersion pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of sslAction is Open, the default value of this parameter is aliyun. Value range:
// * **aliyun**: using cloud certificates.
// * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
CaType pulumi.StringPtrInput
// The file that contains the certificate used for TDE.
Certificate pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of clientCaEnabled is 1, this parameter must be configured.
ClientCaCert pulumi.StringPtrInput
// The client ca enabled.
ClientCaEnabled pulumi.IntPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of clientCrlEnabled is 1, this parameter must be configured.
ClientCertRevocationList pulumi.StringPtrInput
// The client crl enabled.
ClientCrlEnabled pulumi.IntPtrInput
// The time at which ApsaraDB RDS collects the statistics of the new instance.
// * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
// * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
//
// > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
CollectStatMode pulumi.StringInput
// The connection string prefix.
ConnectionStringPrefix pulumi.StringPtrInput
// The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
DbInstanceClass pulumi.StringInput
// The db instance description.
DbInstanceDescription pulumi.StringPtrInput
// The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
//
// > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
DbInstanceStorage pulumi.IntInput
// The type of storage media that is used for the new instance. Valid values:
// * **local_ssd**: local SSDs.
// * **cloud_ssd**: standard SSDs.
// * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
// * **cloud_essd2**: ESSDs of PL2.
// * **cloud_essd3**: ESSDs of PL3.
DbInstanceStorageType pulumi.StringInput
// The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
//
// > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
DbName pulumi.StringPtrInput
// The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
DedicatedHostGroupId pulumi.StringPtrInput
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
//
// > **NOTE:** `deletionProtection` is valid only when attribute `paymentType` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
DeletionProtection pulumi.BoolPtrInput
// The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
Direction pulumi.StringPtrInput
// The effective time.
EffectiveTime pulumi.StringPtrInput
// The ID of the private key.
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
EncryptionKey pulumi.StringPtrInput
// Database type. Value options: MySQL, SQLServer, PostgreSQL.
Engine pulumi.StringPtrInput
// Database version. Value:
// * MySQL: **5.5/5.6/5.7/8.0**.
// * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
// * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
// * MariaDB: **10.3**.
EngineVersion pulumi.StringPtrInput
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrInput
// The high availability mode. Valid values:
// * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
// * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
HaMode pulumi.StringPtrInput
// The network type of the instance. Valid values:
// * **Classic**: Classic Network.
// * **VPC**: VPC.
InstanceNetworkType pulumi.StringInput
// The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
MaintainTime pulumi.StringPtrInput
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
Parameters RdsUpgradeDbInstanceParameterArrayInput
// The password of the certificate.
//
// > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
Password pulumi.StringPtrInput
// The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
PaymentType pulumi.StringInput
// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pgHbaConf` below.
PgHbaConfs RdsUpgradeDbInstancePgHbaConfArrayInput
// The port.
Port pulumi.StringPtrInput
// The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
PrivateIpAddress pulumi.StringPtrInput
// The file that contains the private key used for TDE.
PrivateKey pulumi.StringPtrInput
// The released keep policy.
ReleasedKeepPolicy pulumi.StringPtrInput
// This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
ReplicationAcl pulumi.StringPtrInput
// The resource group id.
ResourceGroupId pulumi.StringPtrInput
// The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
//
// > **NOTE:** This parameter is available only when the instance runs MySQL.
RoleArn pulumi.StringPtrInput
// The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
// * IP address form, for example: 10.23.12.24.
// * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
//