1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. rds
  5. ReadOnlyInstance
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.rds.ReadOnlyInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    Provides an RDS readonly instance resource, see What is DB Readonly Instance.

    NOTE: Available since v1.52.1.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const exampleZones = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "5.6",
    });
    const exampleNetwork = new alicloud.vpc.Network("exampleNetwork", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const exampleSwitch = new alicloud.vpc.Switch("exampleSwitch", {
        vpcId: exampleNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: exampleZones.then(exampleZones => exampleZones.zones?.[0]?.id),
        vswitchName: name,
    });
    const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("exampleSecurityGroup", {vpcId: exampleNetwork.id});
    const exampleInstance = new alicloud.rds.Instance("exampleInstance", {
        engine: "MySQL",
        engineVersion: "5.6",
        instanceType: "rds.mysql.t1.small",
        instanceStorage: 20,
        instanceChargeType: "Postpaid",
        instanceName: name,
        vswitchId: exampleSwitch.id,
        securityIps: [
            "10.168.1.12",
            "100.69.7.112",
        ],
    });
    const exampleReadOnlyInstance = new alicloud.rds.ReadOnlyInstance("exampleReadOnlyInstance", {
        zoneId: exampleInstance.zoneId,
        masterDbInstanceId: exampleInstance.id,
        engineVersion: exampleInstance.engineVersion,
        instanceStorage: exampleInstance.instanceStorage,
        instanceType: exampleInstance.instanceType,
        instanceName: `${name}readonly`,
        vswitchId: exampleSwitch.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    example_zones = alicloud.rds.get_zones(engine="MySQL",
        engine_version="5.6")
    example_network = alicloud.vpc.Network("exampleNetwork",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    example_switch = alicloud.vpc.Switch("exampleSwitch",
        vpc_id=example_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=example_zones.zones[0].id,
        vswitch_name=name)
    example_security_group = alicloud.ecs.SecurityGroup("exampleSecurityGroup", vpc_id=example_network.id)
    example_instance = alicloud.rds.Instance("exampleInstance",
        engine="MySQL",
        engine_version="5.6",
        instance_type="rds.mysql.t1.small",
        instance_storage=20,
        instance_charge_type="Postpaid",
        instance_name=name,
        vswitch_id=example_switch.id,
        security_ips=[
            "10.168.1.12",
            "100.69.7.112",
        ])
    example_read_only_instance = alicloud.rds.ReadOnlyInstance("exampleReadOnlyInstance",
        zone_id=example_instance.zone_id,
        master_db_instance_id=example_instance.id,
        engine_version=example_instance.engine_version,
        instance_storage=example_instance.instance_storage,
        instance_type=example_instance.instance_type,
        instance_name=f"{name}readonly",
        vswitch_id=example_switch.id)
    
    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
    		}
    		exampleZones, 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, "exampleNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSwitch, err := vpc.NewSwitch(ctx, "exampleSwitch", &vpc.SwitchArgs{
    			VpcId:       exampleNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(exampleZones.Zones[0].Id),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroup(ctx, "exampleSecurityGroup", &ecs.SecurityGroupArgs{
    			VpcId: exampleNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := rds.NewInstance(ctx, "exampleInstance", &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, "exampleReadOnlyInstance", &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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var exampleZones = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var exampleNetwork = new AliCloud.Vpc.Network("exampleNetwork", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var exampleSwitch = new AliCloud.Vpc.Switch("exampleSwitch", new()
        {
            VpcId = exampleNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = exampleZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VswitchName = name,
        });
    
        var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("exampleSecurityGroup", new()
        {
            VpcId = exampleNetwork.Id,
        });
    
        var exampleInstance = new AliCloud.Rds.Instance("exampleInstance", new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
            InstanceType = "rds.mysql.t1.small",
            InstanceStorage = 20,
            InstanceChargeType = "Postpaid",
            InstanceName = name,
            VswitchId = exampleSwitch.Id,
            SecurityIps = new[]
            {
                "10.168.1.12",
                "100.69.7.112",
            },
        });
    
        var exampleReadOnlyInstance = new AliCloud.Rds.ReadOnlyInstance("exampleReadOnlyInstance", new()
        {
            ZoneId = exampleInstance.ZoneId,
            MasterDbInstanceId = exampleInstance.Id,
            EngineVersion = exampleInstance.EngineVersion,
            InstanceStorage = exampleInstance.InstanceStorage,
            InstanceType = exampleInstance.InstanceType,
            InstanceName = $"{name}readonly",
            VswitchId = exampleSwitch.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.ReadOnlyInstance;
    import com.pulumi.alicloud.rds.ReadOnlyInstanceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var exampleZones = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .build());
    
            var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()        
                .vpcId(exampleNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(exampleZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vswitchName(name)
                .build());
    
            var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()        
                .vpcId(exampleNetwork.id())
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()        
                .engine("MySQL")
                .engineVersion("5.6")
                .instanceType("rds.mysql.t1.small")
                .instanceStorage("20")
                .instanceChargeType("Postpaid")
                .instanceName(name)
                .vswitchId(exampleSwitch.id())
                .securityIps(            
                    "10.168.1.12",
                    "100.69.7.112")
                .build());
    
            var exampleReadOnlyInstance = new ReadOnlyInstance("exampleReadOnlyInstance", ReadOnlyInstanceArgs.builder()        
                .zoneId(exampleInstance.zoneId())
                .masterDbInstanceId(exampleInstance.id())
                .engineVersion(exampleInstance.engineVersion())
                .instanceStorage(exampleInstance.instanceStorage())
                .instanceType(exampleInstance.instanceType())
                .instanceName(String.format("%sreadonly", name))
                .vswitchId(exampleSwitch.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      exampleNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      exampleSwitch:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${exampleNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${exampleZones.zones[0].id}
          vswitchName: ${name}
      exampleSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          vpcId: ${exampleNetwork.id}
      exampleInstance:
        type: alicloud:rds:Instance
        properties:
          engine: MySQL
          engineVersion: '5.6'
          instanceType: rds.mysql.t1.small
          instanceStorage: '20'
          instanceChargeType: Postpaid
          instanceName: ${name}
          vswitchId: ${exampleSwitch.id}
          securityIps:
            - 10.168.1.12
            - 100.69.7.112
      exampleReadOnlyInstance:
        type: alicloud:rds:ReadOnlyInstance
        properties:
          zoneId: ${exampleInstance.zoneId}
          masterDbInstanceId: ${exampleInstance.id}
          engineVersion: ${exampleInstance.engineVersion}
          instanceStorage: ${exampleInstance.instanceStorage}
          instanceType: ${exampleInstance.instanceType}
          instanceName: ${name}readonly
          vswitchId: ${exampleSwitch.id}
    variables:
      exampleZones:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '5.6'
    

    Create ReadOnlyInstance Resource

    new ReadOnlyInstance(name: string, args: ReadOnlyInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def ReadOnlyInstance(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         acl: Optional[str] = None,
                         auto_renew: Optional[bool] = None,
                         auto_renew_period: Optional[int] = None,
                         ca_type: Optional[str] = None,
                         client_ca_cert: Optional[str] = None,
                         client_ca_enabled: Optional[int] = None,
                         client_cert_revocation_list: Optional[str] = None,
                         client_crl_enabled: Optional[int] = None,
                         db_instance_ip_array_attribute: Optional[str] = None,
                         db_instance_ip_array_name: Optional[str] = None,
                         db_instance_storage_type: Optional[str] = None,
                         deletion_protection: Optional[bool] = None,
                         direction: Optional[str] = None,
                         effective_time: Optional[str] = None,
                         engine_version: Optional[str] = None,
                         force_restart: Optional[bool] = None,
                         instance_charge_type: Optional[str] = None,
                         instance_name: Optional[str] = None,
                         instance_storage: Optional[int] = None,
                         instance_type: Optional[str] = None,
                         master_db_instance_id: Optional[str] = None,
                         modify_mode: Optional[str] = None,
                         parameters: Optional[Sequence[ReadOnlyInstanceParameterArgs]] = None,
                         period: Optional[int] = None,
                         replication_acl: Optional[str] = None,
                         resource_group_id: Optional[str] = None,
                         security_ip_type: Optional[str] = None,
                         security_ips: Optional[Sequence[str]] = None,
                         server_cert: Optional[str] = None,
                         server_key: Optional[str] = None,
                         ssl_enabled: Optional[int] = None,
                         switch_time: Optional[str] = None,
                         tags: Optional[Mapping[str, Any]] = None,
                         target_minor_version: Optional[str] = None,
                         upgrade_db_instance_kernel_version: Optional[bool] = None,
                         upgrade_time: Optional[str] = None,
                         vswitch_id: Optional[str] = None,
                         whitelist_network_type: Optional[str] = None,
                         zone_id: Optional[str] = None)
    @overload
    def ReadOnlyInstance(resource_name: str,
                         args: ReadOnlyInstanceArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewReadOnlyInstance(ctx *Context, name string, args ReadOnlyInstanceArgs, opts ...ResourceOption) (*ReadOnlyInstance, error)
    public ReadOnlyInstance(string name, ReadOnlyInstanceArgs args, CustomResourceOptions? opts = null)
    public ReadOnlyInstance(String name, ReadOnlyInstanceArgs args)
    public ReadOnlyInstance(String name, ReadOnlyInstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:rds:ReadOnlyInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ReadOnlyInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ReadOnlyInstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ReadOnlyInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReadOnlyInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReadOnlyInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ReadOnlyInstance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ReadOnlyInstance resource accepts the following input properties:

    EngineVersion string
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    InstanceStorage int
    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.
    InstanceType string
    DB Instance type. For details, see Instance type table.
    MasterDbInstanceId string
    ID of the master instance.
    Acl string
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    AutoRenew bool
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    AutoRenewPeriod int
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    CaType string
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    ClientCaCert string
    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 ssl_enabled = 1.
    ClientCaEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    ClientCertRevocationList string
    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 ssl_enabled = 1.
    ClientCrlEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    DbInstanceIpArrayAttribute string

    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).

    DbInstanceIpArrayName string

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    DbInstanceStorageType string
    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).
    DeletionProtection bool
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    Direction string
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    EffectiveTime string
    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.
    ForceRestart bool
    Set it to true to make some parameter efficient when modifying them. Default to false.
    InstanceChargeType string
    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.
    InstanceName string
    The name of DB instance. It a string of 2 to 256 characters.
    ModifyMode string
    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.
    Parameters List<Pulumi.AliCloud.Rds.Inputs.ReadOnlyInstanceParameter>
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    Period int
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    ReplicationAcl string

    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 ssl_enabled = 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.

    ResourceGroupId string
    The ID of resource group which the DB read-only instance belongs.
    SecurityIpType string
    The type of IP address in the IP address whitelist.
    SecurityIps List<string>
    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]).
    ServerCert string
    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 ssl_enabled = 1.
    ServerKey string
    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 ssl_enabled = 1.
    SslEnabled int
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    SwitchTime string

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    Tags Dictionary<string, object>
    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.
    TargetMinorVersion string

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    UpgradeDbInstanceKernelVersion bool
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    UpgradeTime string
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    VswitchId string
    The virtual switch ID to launch DB instances in one VPC.
    WhitelistNetworkType string

    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.

    ZoneId string
    The Zone to launch the DB instance.
    EngineVersion string
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    InstanceStorage int
    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.
    InstanceType string
    DB Instance type. For details, see Instance type table.
    MasterDbInstanceId string
    ID of the master instance.
    Acl string
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    AutoRenew bool
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    AutoRenewPeriod int
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    CaType string
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    ClientCaCert string
    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 ssl_enabled = 1.
    ClientCaEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    ClientCertRevocationList string
    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 ssl_enabled = 1.
    ClientCrlEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    DbInstanceIpArrayAttribute string

    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).

    DbInstanceIpArrayName string

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    DbInstanceStorageType string
    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).
    DeletionProtection bool
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    Direction string
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    EffectiveTime string
    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.
    ForceRestart bool
    Set it to true to make some parameter efficient when modifying them. Default to false.
    InstanceChargeType string
    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.
    InstanceName string
    The name of DB instance. It a string of 2 to 256 characters.
    ModifyMode string
    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.
    Parameters []ReadOnlyInstanceParameterArgs
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    Period int
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    ReplicationAcl string

    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 ssl_enabled = 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.

    ResourceGroupId string
    The ID of resource group which the DB read-only instance belongs.
    SecurityIpType string
    The type of IP address in the IP address whitelist.
    SecurityIps []string
    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]).
    ServerCert string
    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 ssl_enabled = 1.
    ServerKey string
    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 ssl_enabled = 1.
    SslEnabled int
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    SwitchTime string

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    Tags map[string]interface{}
    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.
    TargetMinorVersion string

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    UpgradeDbInstanceKernelVersion bool
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    UpgradeTime string
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    VswitchId string
    The virtual switch ID to launch DB instances in one VPC.
    WhitelistNetworkType string

    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.

    ZoneId string
    The Zone to launch the DB instance.
    engineVersion String
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    instanceStorage Integer
    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.
    instanceType String
    DB Instance type. For details, see Instance type table.
    masterDbInstanceId String
    ID of the master instance.
    acl String
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    autoRenew Boolean
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    autoRenewPeriod Integer
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    caType String
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    clientCaCert String
    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 ssl_enabled = 1.
    clientCaEnabled Integer
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    clientCertRevocationList String
    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 ssl_enabled = 1.
    clientCrlEnabled Integer
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    dbInstanceIpArrayAttribute String

    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).

    dbInstanceIpArrayName String

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    dbInstanceStorageType String
    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).
    deletionProtection Boolean
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction String
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effectiveTime String
    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.
    forceRestart Boolean
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instanceChargeType String
    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.
    instanceName String
    The name of DB instance. It a string of 2 to 256 characters.
    modifyMode String
    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.
    parameters List<ReadOnlyInstanceParameter>
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period Integer
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    replicationAcl String

    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 ssl_enabled = 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.

    resourceGroupId String
    The ID of resource group which the DB read-only instance belongs.
    securityIpType String
    The type of IP address in the IP address whitelist.
    securityIps List<String>
    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]).
    serverCert String
    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 ssl_enabled = 1.
    serverKey String
    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 ssl_enabled = 1.
    sslEnabled Integer
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switchTime String

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags Map<String,Object>
    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.
    targetMinorVersion String

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgradeDbInstanceKernelVersion Boolean
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgradeTime String
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitchId String
    The virtual switch ID to launch DB instances in one VPC.
    whitelistNetworkType String

    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.

    zoneId String
    The Zone to launch the DB instance.
    engineVersion string
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    instanceStorage number
    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.
    instanceType string
    DB Instance type. For details, see Instance type table.
    masterDbInstanceId string
    ID of the master instance.
    acl string
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    autoRenew boolean
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    autoRenewPeriod number
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    caType string
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    clientCaCert string
    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 ssl_enabled = 1.
    clientCaEnabled number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    clientCertRevocationList string
    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 ssl_enabled = 1.
    clientCrlEnabled number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    dbInstanceIpArrayAttribute string

    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).

    dbInstanceIpArrayName string

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    dbInstanceStorageType string
    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).
    deletionProtection boolean
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction string
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effectiveTime string
    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.
    forceRestart boolean
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instanceChargeType string
    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.
    instanceName string
    The name of DB instance. It a string of 2 to 256 characters.
    modifyMode string
    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.
    parameters ReadOnlyInstanceParameter[]
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period number
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    replicationAcl string

    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 ssl_enabled = 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.

    resourceGroupId string
    The ID of resource group which the DB read-only instance belongs.
    securityIpType string
    The type of IP address in the IP address whitelist.
    securityIps string[]
    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]).
    serverCert string
    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 ssl_enabled = 1.
    serverKey string
    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 ssl_enabled = 1.
    sslEnabled number
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switchTime string

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags {[key: string]: any}
    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.
    targetMinorVersion string

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgradeDbInstanceKernelVersion boolean
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgradeTime string
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitchId string
    The virtual switch ID to launch DB instances in one VPC.
    whitelistNetworkType string

    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.

    zoneId string
    The Zone to launch the DB instance.
    engine_version str
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    instance_storage int
    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.
    instance_type str
    DB Instance type. For details, see Instance type table.
    master_db_instance_id str
    ID of the master instance.
    acl str
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    auto_renew bool
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    auto_renew_period int
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    ca_type str
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    client_ca_cert str
    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 ssl_enabled = 1.
    client_ca_enabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    client_cert_revocation_list str
    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 ssl_enabled = 1.
    client_crl_enabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    db_instance_ip_array_attribute str

    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).

    db_instance_ip_array_name str

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    db_instance_storage_type str
    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).
    deletion_protection bool
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction str
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effective_time str
    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.
    force_restart bool
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instance_charge_type str
    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.
    instance_name str
    The name of DB instance. It a string of 2 to 256 characters.
    modify_mode str
    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.
    parameters Sequence[ReadOnlyInstanceParameterArgs]
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period int
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    replication_acl str

    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 ssl_enabled = 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.

    resource_group_id str
    The ID of resource group which the DB read-only instance belongs.
    security_ip_type str
    The type of IP address in the IP address whitelist.
    security_ips Sequence[str]
    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]).
    server_cert str
    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 ssl_enabled = 1.
    server_key str
    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 ssl_enabled = 1.
    ssl_enabled int
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switch_time str

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags Mapping[str, Any]
    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.
    target_minor_version str

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgrade_db_instance_kernel_version bool
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgrade_time str
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitch_id str
    The virtual switch ID to launch DB instances in one VPC.
    whitelist_network_type str

    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.

    zone_id str
    The Zone to launch the DB instance.
    engineVersion String
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    instanceStorage Number
    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.
    instanceType String
    DB Instance type. For details, see Instance type table.
    masterDbInstanceId String
    ID of the master instance.
    acl String
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    autoRenew Boolean
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    autoRenewPeriod Number
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    caType String
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    clientCaCert String
    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 ssl_enabled = 1.
    clientCaEnabled Number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    clientCertRevocationList String
    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 ssl_enabled = 1.
    clientCrlEnabled Number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    dbInstanceIpArrayAttribute String

    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).

    dbInstanceIpArrayName String

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    dbInstanceStorageType String
    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).
    deletionProtection Boolean
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction String
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effectiveTime String
    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.
    forceRestart Boolean
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instanceChargeType String
    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.
    instanceName String
    The name of DB instance. It a string of 2 to 256 characters.
    modifyMode String
    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.
    parameters List<Property Map>
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period Number
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    replicationAcl String

    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 ssl_enabled = 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.

    resourceGroupId String
    The ID of resource group which the DB read-only instance belongs.
    securityIpType String
    The type of IP address in the IP address whitelist.
    securityIps List<String>
    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]).
    serverCert String
    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 ssl_enabled = 1.
    serverKey String
    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 ssl_enabled = 1.
    sslEnabled Number
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switchTime String

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags Map<Any>
    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.
    targetMinorVersion String

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgradeDbInstanceKernelVersion Boolean
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgradeTime String
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitchId String
    The virtual switch ID to launch DB instances in one VPC.
    whitelistNetworkType String

    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.

    zoneId String
    The Zone to launch the DB instance.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ReadOnlyInstance resource produces the following output properties:

    ConnectionString string
    RDS database connection string.
    Engine string
    Database type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Port string
    RDS database connection port.
    ConnectionString string
    RDS database connection string.
    Engine string
    Database type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Port string
    RDS database connection port.
    connectionString String
    RDS database connection string.
    engine String
    Database type.
    id String
    The provider-assigned unique ID for this managed resource.
    port String
    RDS database connection port.
    connectionString string
    RDS database connection string.
    engine string
    Database type.
    id string
    The provider-assigned unique ID for this managed resource.
    port string
    RDS database connection port.
    connection_string str
    RDS database connection string.
    engine str
    Database type.
    id str
    The provider-assigned unique ID for this managed resource.
    port str
    RDS database connection port.
    connectionString String
    RDS database connection string.
    engine String
    Database type.
    id String
    The provider-assigned unique ID for this managed resource.
    port String
    RDS database connection port.

    Look up Existing ReadOnlyInstance Resource

    Get an existing ReadOnlyInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ReadOnlyInstanceState, opts?: CustomResourceOptions): ReadOnlyInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl: Optional[str] = None,
            auto_renew: Optional[bool] = None,
            auto_renew_period: Optional[int] = None,
            ca_type: Optional[str] = None,
            client_ca_cert: Optional[str] = None,
            client_ca_enabled: Optional[int] = None,
            client_cert_revocation_list: Optional[str] = None,
            client_crl_enabled: Optional[int] = None,
            connection_string: Optional[str] = None,
            db_instance_ip_array_attribute: Optional[str] = None,
            db_instance_ip_array_name: Optional[str] = None,
            db_instance_storage_type: Optional[str] = None,
            deletion_protection: Optional[bool] = None,
            direction: Optional[str] = None,
            effective_time: Optional[str] = None,
            engine: Optional[str] = None,
            engine_version: Optional[str] = None,
            force_restart: Optional[bool] = None,
            instance_charge_type: Optional[str] = None,
            instance_name: Optional[str] = None,
            instance_storage: Optional[int] = None,
            instance_type: Optional[str] = None,
            master_db_instance_id: Optional[str] = None,
            modify_mode: Optional[str] = None,
            parameters: Optional[Sequence[ReadOnlyInstanceParameterArgs]] = None,
            period: Optional[int] = None,
            port: Optional[str] = None,
            replication_acl: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            security_ip_type: Optional[str] = None,
            security_ips: Optional[Sequence[str]] = None,
            server_cert: Optional[str] = None,
            server_key: Optional[str] = None,
            ssl_enabled: Optional[int] = None,
            switch_time: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            target_minor_version: Optional[str] = None,
            upgrade_db_instance_kernel_version: Optional[bool] = None,
            upgrade_time: Optional[str] = None,
            vswitch_id: Optional[str] = None,
            whitelist_network_type: Optional[str] = None,
            zone_id: Optional[str] = None) -> ReadOnlyInstance
    func GetReadOnlyInstance(ctx *Context, name string, id IDInput, state *ReadOnlyInstanceState, opts ...ResourceOption) (*ReadOnlyInstance, error)
    public static ReadOnlyInstance Get(string name, Input<string> id, ReadOnlyInstanceState? state, CustomResourceOptions? opts = null)
    public static ReadOnlyInstance get(String name, Output<String> id, ReadOnlyInstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Acl string
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    AutoRenew bool
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    AutoRenewPeriod int
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    CaType string
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    ClientCaCert string
    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 ssl_enabled = 1.
    ClientCaEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    ClientCertRevocationList string
    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 ssl_enabled = 1.
    ClientCrlEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    ConnectionString string
    RDS database connection string.
    DbInstanceIpArrayAttribute string

    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).

    DbInstanceIpArrayName string

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    DbInstanceStorageType string
    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).
    DeletionProtection bool
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    Direction string
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    EffectiveTime string
    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.
    Engine string
    Database type.
    EngineVersion string
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    ForceRestart bool
    Set it to true to make some parameter efficient when modifying them. Default to false.
    InstanceChargeType string
    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.
    InstanceName string
    The name of DB instance. It a string of 2 to 256 characters.
    InstanceStorage int
    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.
    InstanceType string
    DB Instance type. For details, see Instance type table.
    MasterDbInstanceId string
    ID of the master instance.
    ModifyMode string
    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.
    Parameters List<Pulumi.AliCloud.Rds.Inputs.ReadOnlyInstanceParameter>
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    Period int
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    Port string
    RDS database connection port.
    ReplicationAcl string

    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 ssl_enabled = 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.

    ResourceGroupId string
    The ID of resource group which the DB read-only instance belongs.
    SecurityIpType string
    The type of IP address in the IP address whitelist.
    SecurityIps List<string>
    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]).
    ServerCert string
    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 ssl_enabled = 1.
    ServerKey string
    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 ssl_enabled = 1.
    SslEnabled int
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    SwitchTime string

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    Tags Dictionary<string, object>
    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.
    TargetMinorVersion string

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    UpgradeDbInstanceKernelVersion bool
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    UpgradeTime string
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    VswitchId string
    The virtual switch ID to launch DB instances in one VPC.
    WhitelistNetworkType string

    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.

    ZoneId string
    The Zone to launch the DB instance.
    Acl string
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    AutoRenew bool
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    AutoRenewPeriod int
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    CaType string
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    ClientCaCert string
    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 ssl_enabled = 1.
    ClientCaEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    ClientCertRevocationList string
    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 ssl_enabled = 1.
    ClientCrlEnabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    ConnectionString string
    RDS database connection string.
    DbInstanceIpArrayAttribute string

    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).

    DbInstanceIpArrayName string

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    DbInstanceStorageType string
    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).
    DeletionProtection bool
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    Direction string
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    EffectiveTime string
    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.
    Engine string
    Database type.
    EngineVersion string
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    ForceRestart bool
    Set it to true to make some parameter efficient when modifying them. Default to false.
    InstanceChargeType string
    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.
    InstanceName string
    The name of DB instance. It a string of 2 to 256 characters.
    InstanceStorage int
    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.
    InstanceType string
    DB Instance type. For details, see Instance type table.
    MasterDbInstanceId string
    ID of the master instance.
    ModifyMode string
    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.
    Parameters []ReadOnlyInstanceParameterArgs
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    Period int
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    Port string
    RDS database connection port.
    ReplicationAcl string

    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 ssl_enabled = 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.

    ResourceGroupId string
    The ID of resource group which the DB read-only instance belongs.
    SecurityIpType string
    The type of IP address in the IP address whitelist.
    SecurityIps []string
    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]).
    ServerCert string
    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 ssl_enabled = 1.
    ServerKey string
    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 ssl_enabled = 1.
    SslEnabled int
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    SwitchTime string

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    Tags map[string]interface{}
    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.
    TargetMinorVersion string

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    UpgradeDbInstanceKernelVersion bool
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    UpgradeTime string
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    VswitchId string
    The virtual switch ID to launch DB instances in one VPC.
    WhitelistNetworkType string

    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.

    ZoneId string
    The Zone to launch the DB instance.
    acl String
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    autoRenew Boolean
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    autoRenewPeriod Integer
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    caType String
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    clientCaCert String
    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 ssl_enabled = 1.
    clientCaEnabled Integer
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    clientCertRevocationList String
    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 ssl_enabled = 1.
    clientCrlEnabled Integer
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    connectionString String
    RDS database connection string.
    dbInstanceIpArrayAttribute String

    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).

    dbInstanceIpArrayName String

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    dbInstanceStorageType String
    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).
    deletionProtection Boolean
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction String
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effectiveTime String
    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.
    engine String
    Database type.
    engineVersion String
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    forceRestart Boolean
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instanceChargeType String
    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.
    instanceName String
    The name of DB instance. It a string of 2 to 256 characters.
    instanceStorage Integer
    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.
    instanceType String
    DB Instance type. For details, see Instance type table.
    masterDbInstanceId String
    ID of the master instance.
    modifyMode String
    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.
    parameters List<ReadOnlyInstanceParameter>
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period Integer
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    port String
    RDS database connection port.
    replicationAcl String

    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 ssl_enabled = 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.

    resourceGroupId String
    The ID of resource group which the DB read-only instance belongs.
    securityIpType String
    The type of IP address in the IP address whitelist.
    securityIps List<String>
    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]).
    serverCert String
    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 ssl_enabled = 1.
    serverKey String
    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 ssl_enabled = 1.
    sslEnabled Integer
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switchTime String

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags Map<String,Object>
    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.
    targetMinorVersion String

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgradeDbInstanceKernelVersion Boolean
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgradeTime String
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitchId String
    The virtual switch ID to launch DB instances in one VPC.
    whitelistNetworkType String

    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.

    zoneId String
    The Zone to launch the DB instance.
    acl string
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    autoRenew boolean
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    autoRenewPeriod number
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    caType string
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    clientCaCert string
    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 ssl_enabled = 1.
    clientCaEnabled number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    clientCertRevocationList string
    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 ssl_enabled = 1.
    clientCrlEnabled number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    connectionString string
    RDS database connection string.
    dbInstanceIpArrayAttribute string

    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).

    dbInstanceIpArrayName string

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    dbInstanceStorageType string
    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).
    deletionProtection boolean
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction string
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effectiveTime string
    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.
    engine string
    Database type.
    engineVersion string
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    forceRestart boolean
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instanceChargeType string
    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.
    instanceName string
    The name of DB instance. It a string of 2 to 256 characters.
    instanceStorage number
    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.
    instanceType string
    DB Instance type. For details, see Instance type table.
    masterDbInstanceId string
    ID of the master instance.
    modifyMode string
    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.
    parameters ReadOnlyInstanceParameter[]
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period number
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    port string
    RDS database connection port.
    replicationAcl string

    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 ssl_enabled = 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.

    resourceGroupId string
    The ID of resource group which the DB read-only instance belongs.
    securityIpType string
    The type of IP address in the IP address whitelist.
    securityIps string[]
    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]).
    serverCert string
    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 ssl_enabled = 1.
    serverKey string
    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 ssl_enabled = 1.
    sslEnabled number
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switchTime string

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags {[key: string]: any}
    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.
    targetMinorVersion string

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgradeDbInstanceKernelVersion boolean
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgradeTime string
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitchId string
    The virtual switch ID to launch DB instances in one VPC.
    whitelistNetworkType string

    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.

    zoneId string
    The Zone to launch the DB instance.
    acl str
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    auto_renew bool
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    auto_renew_period int
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    ca_type str
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    client_ca_cert str
    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 ssl_enabled = 1.
    client_ca_enabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    client_cert_revocation_list str
    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 ssl_enabled = 1.
    client_crl_enabled int
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    connection_string str
    RDS database connection string.
    db_instance_ip_array_attribute str

    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).

    db_instance_ip_array_name str

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    db_instance_storage_type str
    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).
    deletion_protection bool
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction str
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effective_time str
    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.
    engine str
    Database type.
    engine_version str
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    force_restart bool
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instance_charge_type str
    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.
    instance_name str
    The name of DB instance. It a string of 2 to 256 characters.
    instance_storage int
    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.
    instance_type str
    DB Instance type. For details, see Instance type table.
    master_db_instance_id str
    ID of the master instance.
    modify_mode str
    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.
    parameters Sequence[ReadOnlyInstanceParameterArgs]
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period int
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    port str
    RDS database connection port.
    replication_acl str

    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 ssl_enabled = 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.

    resource_group_id str
    The ID of resource group which the DB read-only instance belongs.
    security_ip_type str
    The type of IP address in the IP address whitelist.
    security_ips Sequence[str]
    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]).
    server_cert str
    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 ssl_enabled = 1.
    server_key str
    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 ssl_enabled = 1.
    ssl_enabled int
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switch_time str

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags Mapping[str, Any]
    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.
    target_minor_version str

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgrade_db_instance_kernel_version bool
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgrade_time str
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitch_id str
    The virtual switch ID to launch DB instances in one VPC.
    whitelist_network_type str

    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.

    zone_id str
    The Zone to launch the DB instance.
    acl String
    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 ssl_enabled = 1. Valid values:

    • cert
    • perfer
    • verify-ca
    • verify-full (supported only when the instance runs PostgreSQL 12 or later)
    autoRenew Boolean
    Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to false.
    autoRenewPeriod Number
    Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is PrePaid. Valid value:[1~12], Default to 1.
    caType String
    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 ssl_enabled = 1. Value range:

    • aliyun: a cloud certificate
    • custom: a custom certificate
    clientCaCert String
    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 ssl_enabled = 1.
    clientCaEnabled Number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the public key
    • 0: disables the public key
    clientCertRevocationList String
    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 ssl_enabled = 1.
    clientCrlEnabled Number
    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 ssl_enabled = 1. Valid values:

    • 1: enables the CRL
    • 0: disables the CRL
    connectionString String
    RDS database connection string.
    dbInstanceIpArrayAttribute String

    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).

    dbInstanceIpArrayName String

    The name of the IP address whitelist. Default value: Default.

    NOTE: A maximum of 200 IP address whitelists can be configured for each instance.

    dbInstanceStorageType String
    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).
    deletionProtection Boolean
    The switch of delete protection. Valid values:

    • true: delete protect.
    • false: no delete protect.
    direction String
    The instance configuration type. Valid values:

    • Up
    • Down
    • TempUpgrade
    • Serverless
    effectiveTime String
    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.
    engine String
    Database type.
    engineVersion String
    Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
    forceRestart Boolean
    Set it to true to make some parameter efficient when modifying them. Default to false.
    instanceChargeType String
    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.
    instanceName String
    The name of DB instance. It a string of 2 to 256 characters.
    instanceStorage Number
    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.
    instanceType String
    DB Instance type. For details, see Instance type table.
    masterDbInstanceId String
    ID of the master instance.
    modifyMode String
    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.
    parameters List<Property Map>
    Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs View database parameter templates. See parameters below.
    period Number
    The duration that you will buy DB instance (in month). It is valid when instance_charge_type is PrePaid. Valid values: [1~9], 12, 24, 36.
    port String
    RDS database connection port.
    replicationAcl String

    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 ssl_enabled = 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.

    resourceGroupId String
    The ID of resource group which the DB read-only instance belongs.
    securityIpType String
    The type of IP address in the IP address whitelist.
    securityIps List<String>
    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]).
    serverCert String
    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 ssl_enabled = 1.
    serverKey String
    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 ssl_enabled = 1.
    sslEnabled Number
    Specifies whether to enable or disable SSL encryption. Valid values:

    • 1: enables SSL encryption
    • 0: disables SSL encryption
    switchTime String

    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 upgrade_db_instance_kernel_version = true. The time must be in UTC.

    NOTE: This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.

    tags Map<Any>
    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.
    targetMinorVersion String

    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 upgrade_db_instance_kernel_version = true. You must specify the minor engine version in one of the following formats:

    • PostgreSQL: rds_postgres_00_. Example: rds_postgres_1200_20200830.
    • MySQL: _. 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: . 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.

    upgradeDbInstanceKernelVersion Boolean
    Whether to upgrade a minor version of the kernel. Valid values:

    • true: upgrade
    • false: not to upgrade
    upgradeTime String
    The method to update the minor engine version. Default value: Immediate. It is valid only when upgrade_db_instance_kernel_version = 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.
    vswitchId String
    The virtual switch ID to launch DB instances in one VPC.
    whitelistNetworkType String

    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.

    zoneId String
    The Zone to launch the DB instance.

    Supporting Types

    ReadOnlyInstanceParameter, ReadOnlyInstanceParameterArgs

    Name string
    The parameter name.
    Value string
    The parameter value.
    Name string
    The parameter name.
    Value string
    The parameter value.
    name String
    The parameter name.
    value String
    The parameter value.
    name string
    The parameter name.
    value string
    The parameter value.
    name str
    The parameter name.
    value str
    The parameter value.
    name String
    The parameter name.
    value String
    The parameter value.

    Import

    RDS readonly instance can be imported using the id, e.g.

    $ pulumi import alicloud:rds/readOnlyInstance:ReadOnlyInstance example rm-abc12345678
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi