1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. ReadOnlyInstance
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.rds.ReadOnlyInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 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 example = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "5.6",
    });
    const exampleNetwork = new alicloud.vpc.Network("example", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const exampleSwitch = new alicloud.vpc.Switch("example", {
        vpcId: exampleNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: example.then(example => example.zones?.[0]?.id),
        vswitchName: name,
    });
    const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("example", {
        name: name,
        vpcId: exampleNetwork.id,
    });
    const exampleInstance = new alicloud.rds.Instance("example", {
        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("example", {
        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 = alicloud.rds.get_zones(engine="MySQL",
        engine_version="5.6")
    example_network = alicloud.vpc.Network("example",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    example_switch = alicloud.vpc.Switch("example",
        vpc_id=example_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=example.zones[0].id,
        vswitch_name=name)
    example_security_group = alicloud.ecs.SecurityGroup("example",
        name=name,
        vpc_id=example_network.id)
    example_instance = alicloud.rds.Instance("example",
        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("example",
        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
    		}
    		example, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSwitch, err := vpc.NewSwitch(ctx, "example", &vpc.SwitchArgs{
    			VpcId:       exampleNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(example.Zones[0].Id),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: exampleNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := rds.NewInstance(ctx, "example", &rds.InstanceArgs{
    			Engine:             pulumi.String("MySQL"),
    			EngineVersion:      pulumi.String("5.6"),
    			InstanceType:       pulumi.String("rds.mysql.t1.small"),
    			InstanceStorage:    pulumi.Int(20),
    			InstanceChargeType: pulumi.String("Postpaid"),
    			InstanceName:       pulumi.String(name),
    			VswitchId:          exampleSwitch.ID(),
    			SecurityIps: pulumi.StringArray{
    				pulumi.String("10.168.1.12"),
    				pulumi.String("100.69.7.112"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds.NewReadOnlyInstance(ctx, "example", &rds.ReadOnlyInstanceArgs{
    			ZoneId:             exampleInstance.ZoneId,
    			MasterDbInstanceId: exampleInstance.ID(),
    			EngineVersion:      exampleInstance.EngineVersion,
    			InstanceStorage:    exampleInstance.InstanceStorage,
    			InstanceType:       exampleInstance.InstanceType,
    			InstanceName:       pulumi.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 example = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var exampleNetwork = new AliCloud.Vpc.Network("example", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var exampleSwitch = new AliCloud.Vpc.Switch("example", new()
        {
            VpcId = exampleNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = example.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VswitchName = name,
        });
    
        var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("example", new()
        {
            Name = name,
            VpcId = exampleNetwork.Id,
        });
    
        var exampleInstance = new AliCloud.Rds.Instance("example", 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("example", 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 example = 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(example.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vswitchName(name)
                .build());
    
            var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .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
        name: example
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      exampleSwitch:
        type: alicloud:vpc:Switch
        name: example
        properties:
          vpcId: ${exampleNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${example.zones[0].id}
          vswitchName: ${name}
      exampleSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: example
        properties:
          name: ${name}
          vpcId: ${exampleNetwork.id}
      exampleInstance:
        type: alicloud:rds:Instance
        name: example
        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
        name: example
        properties:
          zoneId: ${exampleInstance.zoneId}
          masterDbInstanceId: ${exampleInstance.id}
          engineVersion: ${exampleInstance.engineVersion}
          instanceStorage: ${exampleInstance.instanceStorage}
          instanceType: ${exampleInstance.instanceType}
          instanceName: ${name}readonly
          vswitchId: ${exampleSwitch.id}
    variables:
      example:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '5.6'
    

    Create ReadOnlyInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ReadOnlyInstance(name: string, args: ReadOnlyInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def ReadOnlyInstance(resource_name: str,
                         args: ReadOnlyInstanceArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ReadOnlyInstance(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         engine_version: Optional[str] = None,
                         master_db_instance_id: Optional[str] = None,
                         instance_type: Optional[str] = None,
                         instance_storage: Optional[int] = None,
                         db_instance_ip_array_name: Optional[str] = None,
                         modify_mode: Optional[str] = None,
                         client_cert_revocation_list: Optional[str] = None,
                         client_crl_enabled: Optional[int] = None,
                         db_instance_ip_array_attribute: Optional[str] = None,
                         acl: Optional[str] = None,
                         db_instance_storage_type: Optional[str] = None,
                         deletion_protection: Optional[bool] = None,
                         direction: Optional[str] = None,
                         effective_time: Optional[str] = None,
                         client_ca_cert: Optional[str] = None,
                         force_restart: Optional[bool] = None,
                         instance_charge_type: Optional[str] = None,
                         instance_name: Optional[str] = None,
                         ca_type: Optional[str] = None,
                         auto_renew_period: Optional[int] = None,
                         auto_renew: Optional[bool] = None,
                         client_ca_enabled: Optional[int] = 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, str]] = 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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var readOnlyInstanceResource = new AliCloud.Rds.ReadOnlyInstance("readOnlyInstanceResource", new()
    {
        EngineVersion = "string",
        MasterDbInstanceId = "string",
        InstanceType = "string",
        InstanceStorage = 0,
        DbInstanceIpArrayName = "string",
        ModifyMode = "string",
        ClientCertRevocationList = "string",
        ClientCrlEnabled = 0,
        DbInstanceIpArrayAttribute = "string",
        Acl = "string",
        DbInstanceStorageType = "string",
        DeletionProtection = false,
        Direction = "string",
        EffectiveTime = "string",
        ClientCaCert = "string",
        ForceRestart = false,
        InstanceChargeType = "string",
        InstanceName = "string",
        CaType = "string",
        AutoRenewPeriod = 0,
        AutoRenew = false,
        ClientCaEnabled = 0,
        Parameters = new[]
        {
            new AliCloud.Rds.Inputs.ReadOnlyInstanceParameterArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        Period = 0,
        ReplicationAcl = "string",
        ResourceGroupId = "string",
        SecurityIpType = "string",
        SecurityIps = new[]
        {
            "string",
        },
        ServerCert = "string",
        ServerKey = "string",
        SslEnabled = 0,
        SwitchTime = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TargetMinorVersion = "string",
        UpgradeDbInstanceKernelVersion = false,
        UpgradeTime = "string",
        VswitchId = "string",
        WhitelistNetworkType = "string",
        ZoneId = "string",
    });
    
    example, err := rds.NewReadOnlyInstance(ctx, "readOnlyInstanceResource", &rds.ReadOnlyInstanceArgs{
    	EngineVersion:              pulumi.String("string"),
    	MasterDbInstanceId:         pulumi.String("string"),
    	InstanceType:               pulumi.String("string"),
    	InstanceStorage:            pulumi.Int(0),
    	DbInstanceIpArrayName:      pulumi.String("string"),
    	ModifyMode:                 pulumi.String("string"),
    	ClientCertRevocationList:   pulumi.String("string"),
    	ClientCrlEnabled:           pulumi.Int(0),
    	DbInstanceIpArrayAttribute: pulumi.String("string"),
    	Acl:                        pulumi.String("string"),
    	DbInstanceStorageType:      pulumi.String("string"),
    	DeletionProtection:         pulumi.Bool(false),
    	Direction:                  pulumi.String("string"),
    	EffectiveTime:              pulumi.String("string"),
    	ClientCaCert:               pulumi.String("string"),
    	ForceRestart:               pulumi.Bool(false),
    	InstanceChargeType:         pulumi.String("string"),
    	InstanceName:               pulumi.String("string"),
    	CaType:                     pulumi.String("string"),
    	AutoRenewPeriod:            pulumi.Int(0),
    	AutoRenew:                  pulumi.Bool(false),
    	ClientCaEnabled:            pulumi.Int(0),
    	Parameters: rds.ReadOnlyInstanceParameterArray{
    		&rds.ReadOnlyInstanceParameterArgs{
    			Name:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Period:          pulumi.Int(0),
    	ReplicationAcl:  pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	SecurityIpType:  pulumi.String("string"),
    	SecurityIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ServerCert: pulumi.String("string"),
    	ServerKey:  pulumi.String("string"),
    	SslEnabled: pulumi.Int(0),
    	SwitchTime: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TargetMinorVersion:             pulumi.String("string"),
    	UpgradeDbInstanceKernelVersion: pulumi.Bool(false),
    	UpgradeTime:                    pulumi.String("string"),
    	VswitchId:                      pulumi.String("string"),
    	WhitelistNetworkType:           pulumi.String("string"),
    	ZoneId:                         pulumi.String("string"),
    })
    
    var readOnlyInstanceResource = new ReadOnlyInstance("readOnlyInstanceResource", ReadOnlyInstanceArgs.builder()
        .engineVersion("string")
        .masterDbInstanceId("string")
        .instanceType("string")
        .instanceStorage(0)
        .dbInstanceIpArrayName("string")
        .modifyMode("string")
        .clientCertRevocationList("string")
        .clientCrlEnabled(0)
        .dbInstanceIpArrayAttribute("string")
        .acl("string")
        .dbInstanceStorageType("string")
        .deletionProtection(false)
        .direction("string")
        .effectiveTime("string")
        .clientCaCert("string")
        .forceRestart(false)
        .instanceChargeType("string")
        .instanceName("string")
        .caType("string")
        .autoRenewPeriod(0)
        .autoRenew(false)
        .clientCaEnabled(0)
        .parameters(ReadOnlyInstanceParameterArgs.builder()
            .name("string")
            .value("string")
            .build())
        .period(0)
        .replicationAcl("string")
        .resourceGroupId("string")
        .securityIpType("string")
        .securityIps("string")
        .serverCert("string")
        .serverKey("string")
        .sslEnabled(0)
        .switchTime("string")
        .tags(Map.of("string", "string"))
        .targetMinorVersion("string")
        .upgradeDbInstanceKernelVersion(false)
        .upgradeTime("string")
        .vswitchId("string")
        .whitelistNetworkType("string")
        .zoneId("string")
        .build());
    
    read_only_instance_resource = alicloud.rds.ReadOnlyInstance("readOnlyInstanceResource",
        engine_version="string",
        master_db_instance_id="string",
        instance_type="string",
        instance_storage=0,
        db_instance_ip_array_name="string",
        modify_mode="string",
        client_cert_revocation_list="string",
        client_crl_enabled=0,
        db_instance_ip_array_attribute="string",
        acl="string",
        db_instance_storage_type="string",
        deletion_protection=False,
        direction="string",
        effective_time="string",
        client_ca_cert="string",
        force_restart=False,
        instance_charge_type="string",
        instance_name="string",
        ca_type="string",
        auto_renew_period=0,
        auto_renew=False,
        client_ca_enabled=0,
        parameters=[{
            "name": "string",
            "value": "string",
        }],
        period=0,
        replication_acl="string",
        resource_group_id="string",
        security_ip_type="string",
        security_ips=["string"],
        server_cert="string",
        server_key="string",
        ssl_enabled=0,
        switch_time="string",
        tags={
            "string": "string",
        },
        target_minor_version="string",
        upgrade_db_instance_kernel_version=False,
        upgrade_time="string",
        vswitch_id="string",
        whitelist_network_type="string",
        zone_id="string")
    
    const readOnlyInstanceResource = new alicloud.rds.ReadOnlyInstance("readOnlyInstanceResource", {
        engineVersion: "string",
        masterDbInstanceId: "string",
        instanceType: "string",
        instanceStorage: 0,
        dbInstanceIpArrayName: "string",
        modifyMode: "string",
        clientCertRevocationList: "string",
        clientCrlEnabled: 0,
        dbInstanceIpArrayAttribute: "string",
        acl: "string",
        dbInstanceStorageType: "string",
        deletionProtection: false,
        direction: "string",
        effectiveTime: "string",
        clientCaCert: "string",
        forceRestart: false,
        instanceChargeType: "string",
        instanceName: "string",
        caType: "string",
        autoRenewPeriod: 0,
        autoRenew: false,
        clientCaEnabled: 0,
        parameters: [{
            name: "string",
            value: "string",
        }],
        period: 0,
        replicationAcl: "string",
        resourceGroupId: "string",
        securityIpType: "string",
        securityIps: ["string"],
        serverCert: "string",
        serverKey: "string",
        sslEnabled: 0,
        switchTime: "string",
        tags: {
            string: "string",
        },
        targetMinorVersion: "string",
        upgradeDbInstanceKernelVersion: false,
        upgradeTime: "string",
        vswitchId: "string",
        whitelistNetworkType: "string",
        zoneId: "string",
    });
    
    type: alicloud:rds:ReadOnlyInstance
    properties:
        acl: string
        autoRenew: false
        autoRenewPeriod: 0
        caType: string
        clientCaCert: string
        clientCaEnabled: 0
        clientCertRevocationList: string
        clientCrlEnabled: 0
        dbInstanceIpArrayAttribute: string
        dbInstanceIpArrayName: string
        dbInstanceStorageType: string
        deletionProtection: false
        direction: string
        effectiveTime: string
        engineVersion: string
        forceRestart: false
        instanceChargeType: string
        instanceName: string
        instanceStorage: 0
        instanceType: string
        masterDbInstanceId: string
        modifyMode: string
        parameters:
            - name: string
              value: string
        period: 0
        replicationAcl: string
        resourceGroupId: string
        securityIpType: string
        securityIps:
            - string
        serverCert: string
        serverKey: string
        sslEnabled: 0
        switchTime: string
        tags:
            string: string
        targetMinorVersion: string
        upgradeDbInstanceKernelVersion: false
        upgradeTime: string
        vswitchId: string
        whitelistNetworkType: string
        zoneId: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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, string>
    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]string
    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,String>
    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]: string}
    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, str]
    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<String>
    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, str]] = 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, string>
    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]string
    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,String>
    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]: string}
    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, str]
    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<String>
    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi