/
readOnlyInstance.go
1277 lines (1189 loc) · 88.4 KB
/
readOnlyInstance.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 an RDS readonly instance resource, see [What is DB Readonly Instance](https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/api-rds-2014-08-15-createreadonlydbinstance).
//
// > **NOTE:** Available since v1.52.1.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
// "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"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// name := "tf-example"
// if param := cfg.Get("name"); param != "" {
// name = param
// }
// example, err := rds.GetZones(ctx, &rds.GetZonesArgs{
// Engine: pulumi.StringRef("MySQL"),
// EngineVersion: pulumi.StringRef("5.6"),
// }, nil)
// if err != nil {
// return err
// }
// exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
// VpcName: pulumi.String(name),
// 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(name),
// })
// if err != nil {
// return err
// }
// _, err = ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
// Name: pulumi.String(name),
// VpcId: exampleNetwork.ID(),
// })
// if err != nil {
// return err
// }
// exampleInstance, err := rds.NewInstance(ctx, "example", &rds.InstanceArgs{
// Engine: pulumi.String("MySQL"),
// EngineVersion: pulumi.String("5.6"),
// InstanceType: pulumi.String("rds.mysql.t1.small"),
// InstanceStorage: pulumi.Int(20),
// InstanceChargeType: pulumi.String("Postpaid"),
// InstanceName: pulumi.String(name),
// VswitchId: exampleSwitch.ID(),
// SecurityIps: pulumi.StringArray{
// pulumi.String("10.168.1.12"),
// pulumi.String("100.69.7.112"),
// },
// })
// if err != nil {
// return err
// }
// _, err = rds.NewReadOnlyInstance(ctx, "example", &rds.ReadOnlyInstanceArgs{
// ZoneId: exampleInstance.ZoneId,
// MasterDbInstanceId: exampleInstance.ID(),
// EngineVersion: exampleInstance.EngineVersion,
// InstanceStorage: exampleInstance.InstanceStorage,
// InstanceType: exampleInstance.InstanceType,
// InstanceName: pulumi.String(fmt.Sprintf("%vreadonly", name)),
// VswitchId: exampleSwitch.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// RDS readonly instance can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:rds/readOnlyInstance:ReadOnlyInstance example rm-abc12345678
// ```
type ReadOnlyInstance struct {
pulumi.CustomResourceState
// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
Acl pulumi.StringOutput `pulumi:"acl"`
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew pulumi.BoolPtrOutput `pulumi:"autoRenew"`
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod pulumi.IntPtrOutput `pulumi:"autoRenewPeriod"`
// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `sslEnabled = 1`. Value range:
// - aliyun: a cloud certificate
// - custom: a custom certificate
CaType pulumi.StringOutput `pulumi:"caType"`
// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCaCert pulumi.StringPtrOutput `pulumi:"clientCaCert"`
// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the public key
// - 0: disables the public key
ClientCaEnabled pulumi.IntPtrOutput `pulumi:"clientCaEnabled"`
// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCertRevocationList pulumi.StringPtrOutput `pulumi:"clientCertRevocationList"`
// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the CRL
// - 0: disables the CRL
ClientCrlEnabled pulumi.IntPtrOutput `pulumi:"clientCrlEnabled"`
// RDS database connection string.
ConnectionString pulumi.StringOutput `pulumi:"connectionString"`
// The attribute of the IP address whitelist. By default, this parameter is empty.
//
// > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
DbInstanceIpArrayAttribute pulumi.StringPtrOutput `pulumi:"dbInstanceIpArrayAttribute"`
// The name of the IP address whitelist. Default value: Default.
//
// > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance.
DbInstanceIpArrayName pulumi.StringPtrOutput `pulumi:"dbInstanceIpArrayName"`
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType pulumi.StringOutput `pulumi:"dbInstanceStorageType"`
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
DeletionProtection pulumi.BoolPtrOutput `pulumi:"deletionProtection"`
// The instance configuration type. Valid values:
// - Up
// - Down
// - TempUpgrade
// - Serverless
Direction pulumi.StringPtrOutput `pulumi:"direction"`
// The method to change. Default value: Immediate. Valid values:
// - Immediate: The change immediately takes effect.
// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
EffectiveTime pulumi.StringPtrOutput `pulumi:"effectiveTime"`
// Database type.
Engine pulumi.StringOutput `pulumi:"engine"`
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
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"`
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released.
InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName pulumi.StringOutput `pulumi:"instanceName"`
// User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceStorage pulumi.IntOutput `pulumi:"instanceStorage"`
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType pulumi.StringOutput `pulumi:"instanceType"`
// ID of the master instance.
MasterDbInstanceId pulumi.StringOutput `pulumi:"masterDbInstanceId"`
// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
ModifyMode pulumi.StringPtrOutput `pulumi:"modifyMode"`
// 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 ReadOnlyInstanceParameterArrayOutput `pulumi:"parameters"`
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36.
Period pulumi.IntPtrOutput `pulumi:"period"`
// RDS database connection port.
Port pulumi.StringOutput `pulumi:"port"`
// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
// > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
ReplicationAcl pulumi.StringOutput `pulumi:"replicationAcl"`
// The ID of resource group which the DB read-only instance belongs.
ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
// The type of IP address in the IP address whitelist.
SecurityIpType pulumi.StringPtrOutput `pulumi:"securityIpType"`
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps pulumi.StringArrayOutput `pulumi:"securityIps"`
// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerCert pulumi.StringOutput `pulumi:"serverCert"`
// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerKey pulumi.StringOutput `pulumi:"serverKey"`
// Specifies whether to enable or disable SSL encryption. Valid values:
// - 1: enables SSL encryption
// - 0: disables SSL encryption
SslEnabled pulumi.IntOutput `pulumi:"sslEnabled"`
// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgradeDbInstanceKernelVersion = true`. The time must be in UTC.
//
// > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
SwitchTime pulumi.StringPtrOutput `pulumi:"switchTime"`
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags pulumi.MapOutput `pulumi:"tags"`
// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgradeDbInstanceKernelVersion = true`. You must specify the minor engine version in one of the following formats:
// - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.
// - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
// - rds: The instance runs RDS Basic or High-availability Edition.
// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
// - SQLServer: <Minor engine version>. Example: 15.0.4073.23.
//
// > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
TargetMinorVersion pulumi.StringOutput `pulumi:"targetMinorVersion"`
// Whether to upgrade a minor version of the kernel. Valid values:
// - true: upgrade
// - false: not to upgrade
UpgradeDbInstanceKernelVersion pulumi.BoolPtrOutput `pulumi:"upgradeDbInstanceKernelVersion"`
// The method to update the minor engine version. Default value: Immediate. It is valid only when `upgradeDbInstanceKernelVersion = true`. Valid values:
// - Immediate: The minor engine version is immediately updated.
// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
// - SpecifyTime: The minor engine version is updated at the point in time you specify.
UpgradeTime pulumi.StringPtrOutput `pulumi:"upgradeTime"`
// The virtual switch ID to launch DB instances in one VPC.
VswitchId pulumi.StringPtrOutput `pulumi:"vswitchId"`
// The network type of the IP address whitelist. Default value: MIX. Valid values:
// - Classic: classic network in enhanced whitelist mode
// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
// - MIX: standard whitelist mode
// > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
WhitelistNetworkType pulumi.StringPtrOutput `pulumi:"whitelistNetworkType"`
// The Zone to launch the DB instance.
ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}
// NewReadOnlyInstance registers a new resource with the given unique name, arguments, and options.
func NewReadOnlyInstance(ctx *pulumi.Context,
name string, args *ReadOnlyInstanceArgs, opts ...pulumi.ResourceOption) (*ReadOnlyInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EngineVersion == nil {
return nil, errors.New("invalid value for required argument 'EngineVersion'")
}
if args.InstanceStorage == nil {
return nil, errors.New("invalid value for required argument 'InstanceStorage'")
}
if args.InstanceType == nil {
return nil, errors.New("invalid value for required argument 'InstanceType'")
}
if args.MasterDbInstanceId == nil {
return nil, errors.New("invalid value for required argument 'MasterDbInstanceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ReadOnlyInstance
err := ctx.RegisterResource("alicloud:rds/readOnlyInstance:ReadOnlyInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetReadOnlyInstance gets an existing ReadOnlyInstance 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 GetReadOnlyInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ReadOnlyInstanceState, opts ...pulumi.ResourceOption) (*ReadOnlyInstance, error) {
var resource ReadOnlyInstance
err := ctx.ReadResource("alicloud:rds/readOnlyInstance:ReadOnlyInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ReadOnlyInstance resources.
type readOnlyInstanceState struct {
// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
Acl *string `pulumi:"acl"`
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew *bool `pulumi:"autoRenew"`
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `sslEnabled = 1`. Value range:
// - aliyun: a cloud certificate
// - custom: a custom certificate
CaType *string `pulumi:"caType"`
// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCaCert *string `pulumi:"clientCaCert"`
// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the public key
// - 0: disables the public key
ClientCaEnabled *int `pulumi:"clientCaEnabled"`
// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCertRevocationList *string `pulumi:"clientCertRevocationList"`
// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the CRL
// - 0: disables the CRL
ClientCrlEnabled *int `pulumi:"clientCrlEnabled"`
// RDS database connection string.
ConnectionString *string `pulumi:"connectionString"`
// The attribute of the IP address whitelist. By default, this parameter is empty.
//
// > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
DbInstanceIpArrayAttribute *string `pulumi:"dbInstanceIpArrayAttribute"`
// The name of the IP address whitelist. Default value: Default.
//
// > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance.
DbInstanceIpArrayName *string `pulumi:"dbInstanceIpArrayName"`
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType *string `pulumi:"dbInstanceStorageType"`
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
DeletionProtection *bool `pulumi:"deletionProtection"`
// The instance configuration type. Valid values:
// - Up
// - Down
// - TempUpgrade
// - Serverless
Direction *string `pulumi:"direction"`
// The method to change. Default value: Immediate. Valid values:
// - Immediate: The change immediately takes effect.
// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
EffectiveTime *string `pulumi:"effectiveTime"`
// Database type.
Engine *string `pulumi:"engine"`
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion *string `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart *bool `pulumi:"forceRestart"`
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released.
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName *string `pulumi:"instanceName"`
// User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceStorage *int `pulumi:"instanceStorage"`
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType *string `pulumi:"instanceType"`
// ID of the master instance.
MasterDbInstanceId *string `pulumi:"masterDbInstanceId"`
// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
ModifyMode *string `pulumi:"modifyMode"`
// 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 []ReadOnlyInstanceParameter `pulumi:"parameters"`
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36.
Period *int `pulumi:"period"`
// RDS database connection port.
Port *string `pulumi:"port"`
// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
// > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
ReplicationAcl *string `pulumi:"replicationAcl"`
// The ID of resource group which the DB read-only instance belongs.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The type of IP address in the IP address whitelist.
SecurityIpType *string `pulumi:"securityIpType"`
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps []string `pulumi:"securityIps"`
// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerCert *string `pulumi:"serverCert"`
// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerKey *string `pulumi:"serverKey"`
// Specifies whether to enable or disable SSL encryption. Valid values:
// - 1: enables SSL encryption
// - 0: disables SSL encryption
SslEnabled *int `pulumi:"sslEnabled"`
// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgradeDbInstanceKernelVersion = true`. The time must be in UTC.
//
// > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
SwitchTime *string `pulumi:"switchTime"`
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags map[string]interface{} `pulumi:"tags"`
// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgradeDbInstanceKernelVersion = true`. You must specify the minor engine version in one of the following formats:
// - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.
// - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
// - rds: The instance runs RDS Basic or High-availability Edition.
// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
// - SQLServer: <Minor engine version>. Example: 15.0.4073.23.
//
// > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
TargetMinorVersion *string `pulumi:"targetMinorVersion"`
// Whether to upgrade a minor version of the kernel. Valid values:
// - true: upgrade
// - false: not to upgrade
UpgradeDbInstanceKernelVersion *bool `pulumi:"upgradeDbInstanceKernelVersion"`
// The method to update the minor engine version. Default value: Immediate. It is valid only when `upgradeDbInstanceKernelVersion = true`. Valid values:
// - Immediate: The minor engine version is immediately updated.
// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
// - SpecifyTime: The minor engine version is updated at the point in time you specify.
UpgradeTime *string `pulumi:"upgradeTime"`
// The virtual switch ID to launch DB instances in one VPC.
VswitchId *string `pulumi:"vswitchId"`
// The network type of the IP address whitelist. Default value: MIX. Valid values:
// - Classic: classic network in enhanced whitelist mode
// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
// - MIX: standard whitelist mode
// > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
WhitelistNetworkType *string `pulumi:"whitelistNetworkType"`
// The Zone to launch the DB instance.
ZoneId *string `pulumi:"zoneId"`
}
type ReadOnlyInstanceState struct {
// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
Acl pulumi.StringPtrInput
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew pulumi.BoolPtrInput
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod pulumi.IntPtrInput
// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `sslEnabled = 1`. Value range:
// - aliyun: a cloud certificate
// - custom: a custom certificate
CaType pulumi.StringPtrInput
// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCaCert pulumi.StringPtrInput
// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the public key
// - 0: disables the public key
ClientCaEnabled pulumi.IntPtrInput
// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCertRevocationList pulumi.StringPtrInput
// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the CRL
// - 0: disables the CRL
ClientCrlEnabled pulumi.IntPtrInput
// RDS database connection string.
ConnectionString pulumi.StringPtrInput
// The attribute of the IP address whitelist. By default, this parameter is empty.
//
// > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
DbInstanceIpArrayAttribute pulumi.StringPtrInput
// The name of the IP address whitelist. Default value: Default.
//
// > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance.
DbInstanceIpArrayName pulumi.StringPtrInput
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType pulumi.StringPtrInput
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
DeletionProtection pulumi.BoolPtrInput
// The instance configuration type. Valid values:
// - Up
// - Down
// - TempUpgrade
// - Serverless
Direction pulumi.StringPtrInput
// The method to change. Default value: Immediate. Valid values:
// - Immediate: The change immediately takes effect.
// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
EffectiveTime pulumi.StringPtrInput
// Database type.
Engine pulumi.StringPtrInput
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion pulumi.StringPtrInput
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrInput
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released.
InstanceChargeType pulumi.StringPtrInput
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName pulumi.StringPtrInput
// User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceStorage pulumi.IntPtrInput
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType pulumi.StringPtrInput
// ID of the master instance.
MasterDbInstanceId pulumi.StringPtrInput
// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
ModifyMode 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 ReadOnlyInstanceParameterArrayInput
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36.
Period pulumi.IntPtrInput
// RDS database connection port.
Port pulumi.StringPtrInput
// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
// > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
ReplicationAcl pulumi.StringPtrInput
// The ID of resource group which the DB read-only instance belongs.
ResourceGroupId pulumi.StringPtrInput
// The type of IP address in the IP address whitelist.
SecurityIpType pulumi.StringPtrInput
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps pulumi.StringArrayInput
// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerCert pulumi.StringPtrInput
// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerKey pulumi.StringPtrInput
// Specifies whether to enable or disable SSL encryption. Valid values:
// - 1: enables SSL encryption
// - 0: disables SSL encryption
SslEnabled pulumi.IntPtrInput
// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgradeDbInstanceKernelVersion = true`. The time must be in UTC.
//
// > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
SwitchTime pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags pulumi.MapInput
// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgradeDbInstanceKernelVersion = true`. You must specify the minor engine version in one of the following formats:
// - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.
// - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
// - rds: The instance runs RDS Basic or High-availability Edition.
// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
// - SQLServer: <Minor engine version>. Example: 15.0.4073.23.
//
// > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
TargetMinorVersion pulumi.StringPtrInput
// Whether to upgrade a minor version of the kernel. Valid values:
// - true: upgrade
// - false: not to upgrade
UpgradeDbInstanceKernelVersion pulumi.BoolPtrInput
// The method to update the minor engine version. Default value: Immediate. It is valid only when `upgradeDbInstanceKernelVersion = true`. Valid values:
// - Immediate: The minor engine version is immediately updated.
// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
// - SpecifyTime: The minor engine version is updated at the point in time you specify.
UpgradeTime pulumi.StringPtrInput
// The virtual switch ID to launch DB instances in one VPC.
VswitchId pulumi.StringPtrInput
// The network type of the IP address whitelist. Default value: MIX. Valid values:
// - Classic: classic network in enhanced whitelist mode
// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
// - MIX: standard whitelist mode
// > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
WhitelistNetworkType pulumi.StringPtrInput
// The Zone to launch the DB instance.
ZoneId pulumi.StringPtrInput
}
func (ReadOnlyInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*readOnlyInstanceState)(nil)).Elem()
}
type readOnlyInstanceArgs struct {
// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
Acl *string `pulumi:"acl"`
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew *bool `pulumi:"autoRenew"`
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `sslEnabled = 1`. Value range:
// - aliyun: a cloud certificate
// - custom: a custom certificate
CaType *string `pulumi:"caType"`
// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCaCert *string `pulumi:"clientCaCert"`
// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the public key
// - 0: disables the public key
ClientCaEnabled *int `pulumi:"clientCaEnabled"`
// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCertRevocationList *string `pulumi:"clientCertRevocationList"`
// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the CRL
// - 0: disables the CRL
ClientCrlEnabled *int `pulumi:"clientCrlEnabled"`
// The attribute of the IP address whitelist. By default, this parameter is empty.
//
// > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
DbInstanceIpArrayAttribute *string `pulumi:"dbInstanceIpArrayAttribute"`
// The name of the IP address whitelist. Default value: Default.
//
// > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance.
DbInstanceIpArrayName *string `pulumi:"dbInstanceIpArrayName"`
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType *string `pulumi:"dbInstanceStorageType"`
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
DeletionProtection *bool `pulumi:"deletionProtection"`
// The instance configuration type. Valid values:
// - Up
// - Down
// - TempUpgrade
// - Serverless
Direction *string `pulumi:"direction"`
// The method to change. Default value: Immediate. Valid values:
// - Immediate: The change immediately takes effect.
// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
EffectiveTime *string `pulumi:"effectiveTime"`
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion string `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart *bool `pulumi:"forceRestart"`
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released.
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName *string `pulumi:"instanceName"`
// User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceStorage int `pulumi:"instanceStorage"`
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType string `pulumi:"instanceType"`
// ID of the master instance.
MasterDbInstanceId string `pulumi:"masterDbInstanceId"`
// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
ModifyMode *string `pulumi:"modifyMode"`
// 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 []ReadOnlyInstanceParameter `pulumi:"parameters"`
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36.
Period *int `pulumi:"period"`
// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
// > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
ReplicationAcl *string `pulumi:"replicationAcl"`
// The ID of resource group which the DB read-only instance belongs.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The type of IP address in the IP address whitelist.
SecurityIpType *string `pulumi:"securityIpType"`
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps []string `pulumi:"securityIps"`
// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerCert *string `pulumi:"serverCert"`
// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerKey *string `pulumi:"serverKey"`
// Specifies whether to enable or disable SSL encryption. Valid values:
// - 1: enables SSL encryption
// - 0: disables SSL encryption
SslEnabled *int `pulumi:"sslEnabled"`
// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgradeDbInstanceKernelVersion = true`. The time must be in UTC.
//
// > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
SwitchTime *string `pulumi:"switchTime"`
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags map[string]interface{} `pulumi:"tags"`
// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgradeDbInstanceKernelVersion = true`. You must specify the minor engine version in one of the following formats:
// - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.
// - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
// - rds: The instance runs RDS Basic or High-availability Edition.
// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
// - SQLServer: <Minor engine version>. Example: 15.0.4073.23.
//
// > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
TargetMinorVersion *string `pulumi:"targetMinorVersion"`
// Whether to upgrade a minor version of the kernel. Valid values:
// - true: upgrade
// - false: not to upgrade
UpgradeDbInstanceKernelVersion *bool `pulumi:"upgradeDbInstanceKernelVersion"`
// The method to update the minor engine version. Default value: Immediate. It is valid only when `upgradeDbInstanceKernelVersion = true`. Valid values:
// - Immediate: The minor engine version is immediately updated.
// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
// - SpecifyTime: The minor engine version is updated at the point in time you specify.
UpgradeTime *string `pulumi:"upgradeTime"`
// The virtual switch ID to launch DB instances in one VPC.
VswitchId *string `pulumi:"vswitchId"`
// The network type of the IP address whitelist. Default value: MIX. Valid values:
// - Classic: classic network in enhanced whitelist mode
// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
// - MIX: standard whitelist mode
// > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
WhitelistNetworkType *string `pulumi:"whitelistNetworkType"`
// The Zone to launch the DB instance.
ZoneId *string `pulumi:"zoneId"`
}
// The set of arguments for constructing a ReadOnlyInstance resource.
type ReadOnlyInstanceArgs struct {
// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
Acl pulumi.StringPtrInput
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew pulumi.BoolPtrInput
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod pulumi.IntPtrInput
// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `sslEnabled = 1`. Value range:
// - aliyun: a cloud certificate
// - custom: a custom certificate
CaType pulumi.StringPtrInput
// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCaCert pulumi.StringPtrInput
// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the public key
// - 0: disables the public key
ClientCaEnabled pulumi.IntPtrInput
// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ClientCertRevocationList pulumi.StringPtrInput
// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the CRL
// - 0: disables the CRL
ClientCrlEnabled pulumi.IntPtrInput
// The attribute of the IP address whitelist. By default, this parameter is empty.
//
// > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS).
DbInstanceIpArrayAttribute pulumi.StringPtrInput
// The name of the IP address whitelist. Default value: Default.
//
// > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance.
DbInstanceIpArrayName pulumi.StringPtrInput
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType pulumi.StringPtrInput
// The switch of delete protection. Valid values:
// - true: delete protect.
// - false: no delete protect.
DeletionProtection pulumi.BoolPtrInput
// The instance configuration type. Valid values:
// - Up
// - Down
// - TempUpgrade
// - Serverless
Direction pulumi.StringPtrInput
// The method to change. Default value: Immediate. Valid values:
// - Immediate: The change immediately takes effect.
// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
EffectiveTime pulumi.StringPtrInput
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion pulumi.StringInput
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrInput
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released.
InstanceChargeType pulumi.StringPtrInput
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName pulumi.StringPtrInput
// User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceStorage pulumi.IntInput
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType pulumi.StringInput
// ID of the master instance.
MasterDbInstanceId pulumi.StringInput
// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
ModifyMode 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 ReadOnlyInstanceParameterArrayInput
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36.
Period pulumi.IntPtrInput
// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
// > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them.
ReplicationAcl pulumi.StringPtrInput
// The ID of resource group which the DB read-only instance belongs.
ResourceGroupId pulumi.StringPtrInput
// The type of IP address in the IP address whitelist.
SecurityIpType pulumi.StringPtrInput
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps pulumi.StringArrayInput
// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerCert pulumi.StringPtrInput
// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
ServerKey pulumi.StringPtrInput
// Specifies whether to enable or disable SSL encryption. Valid values:
// - 1: enables SSL encryption
// - 0: disables SSL encryption
SslEnabled pulumi.IntPtrInput
// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgradeDbInstanceKernelVersion = true`. The time must be in UTC.
//
// > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
SwitchTime pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags pulumi.MapInput
// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgradeDbInstanceKernelVersion = true`. You must specify the minor engine version in one of the following formats:
// - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.
// - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
// - rds: The instance runs RDS Basic or High-availability Edition.
// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
// - SQLServer: <Minor engine version>. Example: 15.0.4073.23.
//
// > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server.
TargetMinorVersion pulumi.StringPtrInput
// Whether to upgrade a minor version of the kernel. Valid values:
// - true: upgrade
// - false: not to upgrade
UpgradeDbInstanceKernelVersion pulumi.BoolPtrInput
// The method to update the minor engine version. Default value: Immediate. It is valid only when `upgradeDbInstanceKernelVersion = true`. Valid values:
// - Immediate: The minor engine version is immediately updated.
// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
// - SpecifyTime: The minor engine version is updated at the point in time you specify.
UpgradeTime pulumi.StringPtrInput
// The virtual switch ID to launch DB instances in one VPC.
VswitchId pulumi.StringPtrInput
// The network type of the IP address whitelist. Default value: MIX. Valid values:
// - Classic: classic network in enhanced whitelist mode
// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
// - MIX: standard whitelist mode
// > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type.
WhitelistNetworkType pulumi.StringPtrInput
// The Zone to launch the DB instance.
ZoneId pulumi.StringPtrInput
}
func (ReadOnlyInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*readOnlyInstanceArgs)(nil)).Elem()
}
type ReadOnlyInstanceInput interface {
pulumi.Input
ToReadOnlyInstanceOutput() ReadOnlyInstanceOutput
ToReadOnlyInstanceOutputWithContext(ctx context.Context) ReadOnlyInstanceOutput
}
func (*ReadOnlyInstance) ElementType() reflect.Type {
return reflect.TypeOf((**ReadOnlyInstance)(nil)).Elem()
}
func (i *ReadOnlyInstance) ToReadOnlyInstanceOutput() ReadOnlyInstanceOutput {
return i.ToReadOnlyInstanceOutputWithContext(context.Background())
}
func (i *ReadOnlyInstance) ToReadOnlyInstanceOutputWithContext(ctx context.Context) ReadOnlyInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReadOnlyInstanceOutput)
}
// ReadOnlyInstanceArrayInput is an input type that accepts ReadOnlyInstanceArray and ReadOnlyInstanceArrayOutput values.
// You can construct a concrete instance of `ReadOnlyInstanceArrayInput` via:
//
// ReadOnlyInstanceArray{ ReadOnlyInstanceArgs{...} }
type ReadOnlyInstanceArrayInput interface {
pulumi.Input
ToReadOnlyInstanceArrayOutput() ReadOnlyInstanceArrayOutput
ToReadOnlyInstanceArrayOutputWithContext(context.Context) ReadOnlyInstanceArrayOutput
}
type ReadOnlyInstanceArray []ReadOnlyInstanceInput
func (ReadOnlyInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ReadOnlyInstance)(nil)).Elem()
}
func (i ReadOnlyInstanceArray) ToReadOnlyInstanceArrayOutput() ReadOnlyInstanceArrayOutput {
return i.ToReadOnlyInstanceArrayOutputWithContext(context.Background())
}
func (i ReadOnlyInstanceArray) ToReadOnlyInstanceArrayOutputWithContext(ctx context.Context) ReadOnlyInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReadOnlyInstanceArrayOutput)
}
// ReadOnlyInstanceMapInput is an input type that accepts ReadOnlyInstanceMap and ReadOnlyInstanceMapOutput values.
// You can construct a concrete instance of `ReadOnlyInstanceMapInput` via:
//
// ReadOnlyInstanceMap{ "key": ReadOnlyInstanceArgs{...} }
type ReadOnlyInstanceMapInput interface {
pulumi.Input
ToReadOnlyInstanceMapOutput() ReadOnlyInstanceMapOutput
ToReadOnlyInstanceMapOutputWithContext(context.Context) ReadOnlyInstanceMapOutput
}
type ReadOnlyInstanceMap map[string]ReadOnlyInstanceInput
func (ReadOnlyInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ReadOnlyInstance)(nil)).Elem()
}
func (i ReadOnlyInstanceMap) ToReadOnlyInstanceMapOutput() ReadOnlyInstanceMapOutput {
return i.ToReadOnlyInstanceMapOutputWithContext(context.Background())
}
func (i ReadOnlyInstanceMap) ToReadOnlyInstanceMapOutputWithContext(ctx context.Context) ReadOnlyInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReadOnlyInstanceMapOutput)
}
type ReadOnlyInstanceOutput struct{ *pulumi.OutputState }
func (ReadOnlyInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ReadOnlyInstance)(nil)).Elem()
}
func (o ReadOnlyInstanceOutput) ToReadOnlyInstanceOutput() ReadOnlyInstanceOutput {
return o
}
func (o ReadOnlyInstanceOutput) ToReadOnlyInstanceOutputWithContext(ctx context.Context) ReadOnlyInstanceOutput {
return o
}
// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `sslEnabled = 1`. Valid values:
// - cert
// - perfer
// - verify-ca
// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
func (o ReadOnlyInstanceOutput) Acl() pulumi.StringOutput {
return o.ApplyT(func(v *ReadOnlyInstance) pulumi.StringOutput { return v.Acl }).(pulumi.StringOutput)
}
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
func (o ReadOnlyInstanceOutput) AutoRenew() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ReadOnlyInstance) pulumi.BoolPtrOutput { return v.AutoRenew }).(pulumi.BoolPtrOutput)
}
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
func (o ReadOnlyInstanceOutput) AutoRenewPeriod() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ReadOnlyInstance) pulumi.IntPtrOutput { return v.AutoRenewPeriod }).(pulumi.IntPtrOutput)
}
// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `sslEnabled = 1`. Value range:
// - aliyun: a cloud certificate
// - custom: a custom certificate
func (o ReadOnlyInstanceOutput) CaType() pulumi.StringOutput {
return o.ApplyT(func(v *ReadOnlyInstance) pulumi.StringOutput { return v.CaType }).(pulumi.StringOutput)
}
// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.
func (o ReadOnlyInstanceOutput) ClientCaCert() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ReadOnlyInstance) pulumi.StringPtrOutput { return v.ClientCaCert }).(pulumi.StringPtrOutput)
}
// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `sslEnabled = 1`. Valid values:
// - 1: enables the public key
// - 0: disables the public key
func (o ReadOnlyInstanceOutput) ClientCaEnabled() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ReadOnlyInstance) pulumi.IntPtrOutput { return v.ClientCaEnabled }).(pulumi.IntPtrOutput)
}
// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `sslEnabled = 1`.