1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. rds
  5. RdsDbProxy
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.rds.RdsDbProxy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Information about RDS database exclusive agent and its usage, see What is RDS DB Proxy.

    NOTE: Available since v1.193.0.

    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 default = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "5.6",
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
        vswitchName: name,
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultInstance = new alicloud.rds.Instance("default", {
        engine: "MySQL",
        engineVersion: "5.7",
        instanceType: "rds.mysql.c1.large",
        instanceStorage: 20,
        instanceChargeType: "Postpaid",
        instanceName: name,
        vswitchId: defaultSwitch.id,
        dbInstanceStorageType: "local_ssd",
    });
    const defaultReadOnlyInstance = new alicloud.rds.ReadOnlyInstance("default", {
        zoneId: defaultInstance.zoneId,
        masterDbInstanceId: defaultInstance.id,
        engineVersion: defaultInstance.engineVersion,
        instanceStorage: defaultInstance.instanceStorage,
        instanceType: defaultInstance.instanceType,
        instanceName: `${name}readonly`,
        vswitchId: defaultSwitch.id,
    });
    const defaultRdsDbProxy = new alicloud.rds.RdsDbProxy("default", {
        instanceId: defaultInstance.id,
        instanceNetworkType: "VPC",
        vpcId: defaultInstance.vpcId,
        vswitchId: defaultInstance.vswitchId,
        dbProxyInstanceNum: 2,
        dbProxyConnectionPrefix: "example",
        dbProxyConnectStringPort: 3306,
        dbProxyEndpointReadWriteMode: "ReadWrite",
        readOnlyInstanceMaxDelayTime: 90,
        dbProxyFeatures: "TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1",
        readOnlyInstanceDistributionType: "Custom",
        readOnlyInstanceWeights: [
            {
                instanceId: defaultInstance.id,
                weight: "100",
            },
            {
                instanceId: defaultReadOnlyInstance.id,
                weight: "500",
            },
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.rds.get_zones(engine="MySQL",
        engine_version="5.6")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.zones[0].id,
        vswitch_name=name)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_instance = alicloud.rds.Instance("default",
        engine="MySQL",
        engine_version="5.7",
        instance_type="rds.mysql.c1.large",
        instance_storage=20,
        instance_charge_type="Postpaid",
        instance_name=name,
        vswitch_id=default_switch.id,
        db_instance_storage_type="local_ssd")
    default_read_only_instance = alicloud.rds.ReadOnlyInstance("default",
        zone_id=default_instance.zone_id,
        master_db_instance_id=default_instance.id,
        engine_version=default_instance.engine_version,
        instance_storage=default_instance.instance_storage,
        instance_type=default_instance.instance_type,
        instance_name=f"{name}readonly",
        vswitch_id=default_switch.id)
    default_rds_db_proxy = alicloud.rds.RdsDbProxy("default",
        instance_id=default_instance.id,
        instance_network_type="VPC",
        vpc_id=default_instance.vpc_id,
        vswitch_id=default_instance.vswitch_id,
        db_proxy_instance_num=2,
        db_proxy_connection_prefix="example",
        db_proxy_connect_string_port=3306,
        db_proxy_endpoint_read_write_mode="ReadWrite",
        read_only_instance_max_delay_time=90,
        db_proxy_features="TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1",
        read_only_instance_distribution_type="Custom",
        read_only_instance_weights=[
            alicloud.rds.RdsDbProxyReadOnlyInstanceWeightArgs(
                instance_id=default_instance.id,
                weight="100",
            ),
            alicloud.rds.RdsDbProxyReadOnlyInstanceWeightArgs(
                instance_id=default_read_only_instance.id,
                weight="500",
            ),
        ])
    
    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
    		}
    		_default, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "default", &rds.InstanceArgs{
    			Engine:                pulumi.String("MySQL"),
    			EngineVersion:         pulumi.String("5.7"),
    			InstanceType:          pulumi.String("rds.mysql.c1.large"),
    			InstanceStorage:       pulumi.Int(20),
    			InstanceChargeType:    pulumi.String("Postpaid"),
    			InstanceName:          pulumi.String(name),
    			VswitchId:             defaultSwitch.ID(),
    			DbInstanceStorageType: pulumi.String("local_ssd"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultReadOnlyInstance, err := rds.NewReadOnlyInstance(ctx, "default", &rds.ReadOnlyInstanceArgs{
    			ZoneId:             defaultInstance.ZoneId,
    			MasterDbInstanceId: defaultInstance.ID(),
    			EngineVersion:      defaultInstance.EngineVersion,
    			InstanceStorage:    defaultInstance.InstanceStorage,
    			InstanceType:       defaultInstance.InstanceType,
    			InstanceName:       pulumi.String(fmt.Sprintf("%vreadonly", name)),
    			VswitchId:          defaultSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds.NewRdsDbProxy(ctx, "default", &rds.RdsDbProxyArgs{
    			InstanceId:                       defaultInstance.ID(),
    			InstanceNetworkType:              pulumi.String("VPC"),
    			VpcId:                            defaultInstance.VpcId,
    			VswitchId:                        defaultInstance.VswitchId,
    			DbProxyInstanceNum:               pulumi.Int(2),
    			DbProxyConnectionPrefix:          pulumi.String("example"),
    			DbProxyConnectStringPort:         pulumi.Int(3306),
    			DbProxyEndpointReadWriteMode:     pulumi.String("ReadWrite"),
    			ReadOnlyInstanceMaxDelayTime:     pulumi.Int(90),
    			DbProxyFeatures:                  pulumi.String("TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1"),
    			ReadOnlyInstanceDistributionType: pulumi.String("Custom"),
    			ReadOnlyInstanceWeights: rds.RdsDbProxyReadOnlyInstanceWeightArray{
    				&rds.RdsDbProxyReadOnlyInstanceWeightArgs{
    					InstanceId: defaultInstance.ID(),
    					Weight:     pulumi.String("100"),
    				},
    				&rds.RdsDbProxyReadOnlyInstanceWeightArgs{
    					InstanceId: defaultReadOnlyInstance.ID(),
    					Weight:     pulumi.String("500"),
    				},
    			},
    		})
    		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 @default = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            VswitchName = name,
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("default", new()
        {
            Engine = "MySQL",
            EngineVersion = "5.7",
            InstanceType = "rds.mysql.c1.large",
            InstanceStorage = 20,
            InstanceChargeType = "Postpaid",
            InstanceName = name,
            VswitchId = defaultSwitch.Id,
            DbInstanceStorageType = "local_ssd",
        });
    
        var defaultReadOnlyInstance = new AliCloud.Rds.ReadOnlyInstance("default", new()
        {
            ZoneId = defaultInstance.ZoneId,
            MasterDbInstanceId = defaultInstance.Id,
            EngineVersion = defaultInstance.EngineVersion,
            InstanceStorage = defaultInstance.InstanceStorage,
            InstanceType = defaultInstance.InstanceType,
            InstanceName = $"{name}readonly",
            VswitchId = defaultSwitch.Id,
        });
    
        var defaultRdsDbProxy = new AliCloud.Rds.RdsDbProxy("default", new()
        {
            InstanceId = defaultInstance.Id,
            InstanceNetworkType = "VPC",
            VpcId = defaultInstance.VpcId,
            VswitchId = defaultInstance.VswitchId,
            DbProxyInstanceNum = 2,
            DbProxyConnectionPrefix = "example",
            DbProxyConnectStringPort = 3306,
            DbProxyEndpointReadWriteMode = "ReadWrite",
            ReadOnlyInstanceMaxDelayTime = 90,
            DbProxyFeatures = "TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1",
            ReadOnlyInstanceDistributionType = "Custom",
            ReadOnlyInstanceWeights = new[]
            {
                new AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeightArgs
                {
                    InstanceId = defaultInstance.Id,
                    Weight = "100",
                },
                new AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeightArgs
                {
                    InstanceId = defaultReadOnlyInstance.Id,
                    Weight = "500",
                },
            },
        });
    
    });
    
    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 com.pulumi.alicloud.rds.RdsDbProxy;
    import com.pulumi.alicloud.rds.RdsDbProxyArgs;
    import com.pulumi.alicloud.rds.inputs.RdsDbProxyReadOnlyInstanceWeightArgs;
    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 default = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.zones()[0].id())
                .vswitchName(name)
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("5.7")
                .instanceType("rds.mysql.c1.large")
                .instanceStorage("20")
                .instanceChargeType("Postpaid")
                .instanceName(name)
                .vswitchId(defaultSwitch.id())
                .dbInstanceStorageType("local_ssd")
                .build());
    
            var defaultReadOnlyInstance = new ReadOnlyInstance("defaultReadOnlyInstance", ReadOnlyInstanceArgs.builder()
                .zoneId(defaultInstance.zoneId())
                .masterDbInstanceId(defaultInstance.id())
                .engineVersion(defaultInstance.engineVersion())
                .instanceStorage(defaultInstance.instanceStorage())
                .instanceType(defaultInstance.instanceType())
                .instanceName(String.format("%sreadonly", name))
                .vswitchId(defaultSwitch.id())
                .build());
    
            var defaultRdsDbProxy = new RdsDbProxy("defaultRdsDbProxy", RdsDbProxyArgs.builder()
                .instanceId(defaultInstance.id())
                .instanceNetworkType("VPC")
                .vpcId(defaultInstance.vpcId())
                .vswitchId(defaultInstance.vswitchId())
                .dbProxyInstanceNum(2)
                .dbProxyConnectionPrefix("example")
                .dbProxyConnectStringPort(3306)
                .dbProxyEndpointReadWriteMode("ReadWrite")
                .readOnlyInstanceMaxDelayTime(90)
                .dbProxyFeatures("TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1")
                .readOnlyInstanceDistributionType("Custom")
                .readOnlyInstanceWeights(            
                    RdsDbProxyReadOnlyInstanceWeightArgs.builder()
                        .instanceId(defaultInstance.id())
                        .weight("100")
                        .build(),
                    RdsDbProxyReadOnlyInstanceWeightArgs.builder()
                        .instanceId(defaultReadOnlyInstance.id())
                        .weight("500")
                        .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.zones[0].id}
          vswitchName: ${name}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:rds:Instance
        name: default
        properties:
          engine: MySQL
          engineVersion: '5.7'
          instanceType: rds.mysql.c1.large
          instanceStorage: '20'
          instanceChargeType: Postpaid
          instanceName: ${name}
          vswitchId: ${defaultSwitch.id}
          dbInstanceStorageType: local_ssd
      defaultReadOnlyInstance:
        type: alicloud:rds:ReadOnlyInstance
        name: default
        properties:
          zoneId: ${defaultInstance.zoneId}
          masterDbInstanceId: ${defaultInstance.id}
          engineVersion: ${defaultInstance.engineVersion}
          instanceStorage: ${defaultInstance.instanceStorage}
          instanceType: ${defaultInstance.instanceType}
          instanceName: ${name}readonly
          vswitchId: ${defaultSwitch.id}
      defaultRdsDbProxy:
        type: alicloud:rds:RdsDbProxy
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          instanceNetworkType: VPC
          vpcId: ${defaultInstance.vpcId}
          vswitchId: ${defaultInstance.vswitchId}
          dbProxyInstanceNum: 2
          dbProxyConnectionPrefix: example
          dbProxyConnectStringPort: 3306
          dbProxyEndpointReadWriteMode: ReadWrite
          readOnlyInstanceMaxDelayTime: 90
          dbProxyFeatures: TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1
          readOnlyInstanceDistributionType: Custom
          readOnlyInstanceWeights:
            - instanceId: ${defaultInstance.id}
              weight: '100'
            - instanceId: ${defaultReadOnlyInstance.id}
              weight: '500'
    variables:
      default:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '5.6'
    

    NOTE: Resource alicloud.rds.RdsDbProxy should be created after alicloud.rds.ReadOnlyInstance, so the depends_on statement is necessary.

    Create RdsDbProxy Resource

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

    Constructor syntax

    new RdsDbProxy(name: string, args: RdsDbProxyArgs, opts?: CustomResourceOptions);
    @overload
    def RdsDbProxy(resource_name: str,
                   args: RdsDbProxyArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def RdsDbProxy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   instance_id: Optional[str] = None,
                   vswitch_id: Optional[str] = None,
                   instance_network_type: Optional[str] = None,
                   vpc_id: Optional[str] = None,
                   db_proxy_instance_num: Optional[int] = None,
                   db_proxy_endpoint_read_write_mode: Optional[str] = None,
                   effective_specific_time: Optional[str] = None,
                   effective_time: Optional[str] = None,
                   db_proxy_ssl_enabled: Optional[str] = None,
                   db_proxy_connection_prefix: Optional[str] = None,
                   db_proxy_features: Optional[str] = None,
                   read_only_instance_max_delay_time: Optional[int] = None,
                   read_only_instance_weights: Optional[Sequence[RdsDbProxyReadOnlyInstanceWeightArgs]] = None,
                   resource_group_id: Optional[str] = None,
                   switch_time: Optional[str] = None,
                   upgrade_time: Optional[str] = None,
                   read_only_instance_distribution_type: Optional[str] = None,
                   db_proxy_connect_string_port: Optional[int] = None)
    func NewRdsDbProxy(ctx *Context, name string, args RdsDbProxyArgs, opts ...ResourceOption) (*RdsDbProxy, error)
    public RdsDbProxy(string name, RdsDbProxyArgs args, CustomResourceOptions? opts = null)
    public RdsDbProxy(String name, RdsDbProxyArgs args)
    public RdsDbProxy(String name, RdsDbProxyArgs args, CustomResourceOptions options)
    
    type: alicloud:rds:RdsDbProxy
    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 RdsDbProxyArgs
    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 RdsDbProxyArgs
    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 RdsDbProxyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RdsDbProxyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RdsDbProxyArgs
    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 rdsDbProxyResource = new AliCloud.Rds.RdsDbProxy("rdsDbProxyResource", new()
    {
        InstanceId = "string",
        VswitchId = "string",
        InstanceNetworkType = "string",
        VpcId = "string",
        DbProxyInstanceNum = 0,
        DbProxyEndpointReadWriteMode = "string",
        EffectiveSpecificTime = "string",
        EffectiveTime = "string",
        DbProxySslEnabled = "string",
        DbProxyConnectionPrefix = "string",
        DbProxyFeatures = "string",
        ReadOnlyInstanceMaxDelayTime = 0,
        ReadOnlyInstanceWeights = new[]
        {
            new AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeightArgs
            {
                InstanceId = "string",
                Weight = "string",
            },
        },
        ResourceGroupId = "string",
        SwitchTime = "string",
        UpgradeTime = "string",
        ReadOnlyInstanceDistributionType = "string",
        DbProxyConnectStringPort = 0,
    });
    
    example, err := rds.NewRdsDbProxy(ctx, "rdsDbProxyResource", &rds.RdsDbProxyArgs{
    	InstanceId:                   pulumi.String("string"),
    	VswitchId:                    pulumi.String("string"),
    	InstanceNetworkType:          pulumi.String("string"),
    	VpcId:                        pulumi.String("string"),
    	DbProxyInstanceNum:           pulumi.Int(0),
    	DbProxyEndpointReadWriteMode: pulumi.String("string"),
    	EffectiveSpecificTime:        pulumi.String("string"),
    	EffectiveTime:                pulumi.String("string"),
    	DbProxySslEnabled:            pulumi.String("string"),
    	DbProxyConnectionPrefix:      pulumi.String("string"),
    	DbProxyFeatures:              pulumi.String("string"),
    	ReadOnlyInstanceMaxDelayTime: pulumi.Int(0),
    	ReadOnlyInstanceWeights: rds.RdsDbProxyReadOnlyInstanceWeightArray{
    		&rds.RdsDbProxyReadOnlyInstanceWeightArgs{
    			InstanceId: pulumi.String("string"),
    			Weight:     pulumi.String("string"),
    		},
    	},
    	ResourceGroupId:                  pulumi.String("string"),
    	SwitchTime:                       pulumi.String("string"),
    	UpgradeTime:                      pulumi.String("string"),
    	ReadOnlyInstanceDistributionType: pulumi.String("string"),
    	DbProxyConnectStringPort:         pulumi.Int(0),
    })
    
    var rdsDbProxyResource = new RdsDbProxy("rdsDbProxyResource", RdsDbProxyArgs.builder()
        .instanceId("string")
        .vswitchId("string")
        .instanceNetworkType("string")
        .vpcId("string")
        .dbProxyInstanceNum(0)
        .dbProxyEndpointReadWriteMode("string")
        .effectiveSpecificTime("string")
        .effectiveTime("string")
        .dbProxySslEnabled("string")
        .dbProxyConnectionPrefix("string")
        .dbProxyFeatures("string")
        .readOnlyInstanceMaxDelayTime(0)
        .readOnlyInstanceWeights(RdsDbProxyReadOnlyInstanceWeightArgs.builder()
            .instanceId("string")
            .weight("string")
            .build())
        .resourceGroupId("string")
        .switchTime("string")
        .upgradeTime("string")
        .readOnlyInstanceDistributionType("string")
        .dbProxyConnectStringPort(0)
        .build());
    
    rds_db_proxy_resource = alicloud.rds.RdsDbProxy("rdsDbProxyResource",
        instance_id="string",
        vswitch_id="string",
        instance_network_type="string",
        vpc_id="string",
        db_proxy_instance_num=0,
        db_proxy_endpoint_read_write_mode="string",
        effective_specific_time="string",
        effective_time="string",
        db_proxy_ssl_enabled="string",
        db_proxy_connection_prefix="string",
        db_proxy_features="string",
        read_only_instance_max_delay_time=0,
        read_only_instance_weights=[alicloud.rds.RdsDbProxyReadOnlyInstanceWeightArgs(
            instance_id="string",
            weight="string",
        )],
        resource_group_id="string",
        switch_time="string",
        upgrade_time="string",
        read_only_instance_distribution_type="string",
        db_proxy_connect_string_port=0)
    
    const rdsDbProxyResource = new alicloud.rds.RdsDbProxy("rdsDbProxyResource", {
        instanceId: "string",
        vswitchId: "string",
        instanceNetworkType: "string",
        vpcId: "string",
        dbProxyInstanceNum: 0,
        dbProxyEndpointReadWriteMode: "string",
        effectiveSpecificTime: "string",
        effectiveTime: "string",
        dbProxySslEnabled: "string",
        dbProxyConnectionPrefix: "string",
        dbProxyFeatures: "string",
        readOnlyInstanceMaxDelayTime: 0,
        readOnlyInstanceWeights: [{
            instanceId: "string",
            weight: "string",
        }],
        resourceGroupId: "string",
        switchTime: "string",
        upgradeTime: "string",
        readOnlyInstanceDistributionType: "string",
        dbProxyConnectStringPort: 0,
    });
    
    type: alicloud:rds:RdsDbProxy
    properties:
        dbProxyConnectStringPort: 0
        dbProxyConnectionPrefix: string
        dbProxyEndpointReadWriteMode: string
        dbProxyFeatures: string
        dbProxyInstanceNum: 0
        dbProxySslEnabled: string
        effectiveSpecificTime: string
        effectiveTime: string
        instanceId: string
        instanceNetworkType: string
        readOnlyInstanceDistributionType: string
        readOnlyInstanceMaxDelayTime: 0
        readOnlyInstanceWeights:
            - instanceId: string
              weight: string
        resourceGroupId: string
        switchTime: string
        upgradeTime: string
        vpcId: string
        vswitchId: string
    

    RdsDbProxy Resource Properties

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

    Inputs

    The RdsDbProxy resource accepts the following input properties:

    DbProxyInstanceNum int
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    InstanceId string
    The Id of instance that can run database.
    InstanceNetworkType string
    The network type of the instance. Set the value to VPC.
    VpcId string
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    VswitchId string
    The ID of the vSwitch that is associated with the specified VPC.
    DbProxyConnectStringPort int
    The port number that is associated with the proxy endpoint.
    DbProxyConnectionPrefix string
    The new prefix of the proxy endpoint. Enter a prefix.
    DbProxyEndpointReadWriteMode string

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    DbProxyFeatures string

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    DbProxySslEnabled string
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    EffectiveSpecificTime string
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    EffectiveTime string

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    ReadOnlyInstanceDistributionType string

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    ReadOnlyInstanceMaxDelayTime int

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    ReadOnlyInstanceWeights List<Pulumi.AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeight>
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    ResourceGroupId string
    The ID of the resource group.
    SwitchTime string
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    UpgradeTime string
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    DbProxyInstanceNum int
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    InstanceId string
    The Id of instance that can run database.
    InstanceNetworkType string
    The network type of the instance. Set the value to VPC.
    VpcId string
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    VswitchId string
    The ID of the vSwitch that is associated with the specified VPC.
    DbProxyConnectStringPort int
    The port number that is associated with the proxy endpoint.
    DbProxyConnectionPrefix string
    The new prefix of the proxy endpoint. Enter a prefix.
    DbProxyEndpointReadWriteMode string

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    DbProxyFeatures string

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    DbProxySslEnabled string
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    EffectiveSpecificTime string
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    EffectiveTime string

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    ReadOnlyInstanceDistributionType string

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    ReadOnlyInstanceMaxDelayTime int

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    ReadOnlyInstanceWeights []RdsDbProxyReadOnlyInstanceWeightArgs
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    ResourceGroupId string
    The ID of the resource group.
    SwitchTime string
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    UpgradeTime string
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    dbProxyInstanceNum Integer
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    instanceId String
    The Id of instance that can run database.
    instanceNetworkType String
    The network type of the instance. Set the value to VPC.
    vpcId String
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitchId String
    The ID of the vSwitch that is associated with the specified VPC.
    dbProxyConnectStringPort Integer
    The port number that is associated with the proxy endpoint.
    dbProxyConnectionPrefix String
    The new prefix of the proxy endpoint. Enter a prefix.
    dbProxyEndpointReadWriteMode String

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    dbProxyFeatures String

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    dbProxySslEnabled String
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effectiveSpecificTime String
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effectiveTime String

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    readOnlyInstanceDistributionType String

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    readOnlyInstanceMaxDelayTime Integer

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    readOnlyInstanceWeights List<RdsDbProxyReadOnlyInstanceWeight>
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resourceGroupId String
    The ID of the resource group.
    switchTime String
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgradeTime String
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    dbProxyInstanceNum number
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    instanceId string
    The Id of instance that can run database.
    instanceNetworkType string
    The network type of the instance. Set the value to VPC.
    vpcId string
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitchId string
    The ID of the vSwitch that is associated with the specified VPC.
    dbProxyConnectStringPort number
    The port number that is associated with the proxy endpoint.
    dbProxyConnectionPrefix string
    The new prefix of the proxy endpoint. Enter a prefix.
    dbProxyEndpointReadWriteMode string

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    dbProxyFeatures string

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    dbProxySslEnabled string
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effectiveSpecificTime string
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effectiveTime string

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    readOnlyInstanceDistributionType string

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    readOnlyInstanceMaxDelayTime number

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    readOnlyInstanceWeights RdsDbProxyReadOnlyInstanceWeight[]
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resourceGroupId string
    The ID of the resource group.
    switchTime string
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgradeTime string
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    db_proxy_instance_num int
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    instance_id str
    The Id of instance that can run database.
    instance_network_type str
    The network type of the instance. Set the value to VPC.
    vpc_id str
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitch_id str
    The ID of the vSwitch that is associated with the specified VPC.
    db_proxy_connect_string_port int
    The port number that is associated with the proxy endpoint.
    db_proxy_connection_prefix str
    The new prefix of the proxy endpoint. Enter a prefix.
    db_proxy_endpoint_read_write_mode str

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    db_proxy_features str

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    db_proxy_ssl_enabled str
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effective_specific_time str
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effective_time str

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    read_only_instance_distribution_type str

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    read_only_instance_max_delay_time int

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    read_only_instance_weights Sequence[RdsDbProxyReadOnlyInstanceWeightArgs]
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resource_group_id str
    The ID of the resource group.
    switch_time str
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgrade_time str
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    dbProxyInstanceNum Number
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    instanceId String
    The Id of instance that can run database.
    instanceNetworkType String
    The network type of the instance. Set the value to VPC.
    vpcId String
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitchId String
    The ID of the vSwitch that is associated with the specified VPC.
    dbProxyConnectStringPort Number
    The port number that is associated with the proxy endpoint.
    dbProxyConnectionPrefix String
    The new prefix of the proxy endpoint. Enter a prefix.
    dbProxyEndpointReadWriteMode String

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    dbProxyFeatures String

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    dbProxySslEnabled String
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effectiveSpecificTime String
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effectiveTime String

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    readOnlyInstanceDistributionType String

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    readOnlyInstanceMaxDelayTime Number

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    readOnlyInstanceWeights List<Property Map>
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resourceGroupId String
    The ID of the resource group.
    switchTime String
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgradeTime String
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.

    Outputs

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

    DbProxyConnectionString string
    Connection instance string.
    DbProxyEndpointAliases string
    Remarks of agent terminal.
    DbProxyEndpointId string
    Proxy connection address ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    NetType string
    Network type of proxy connection address.
    SslExpiredTime string
    The time when the certificate expires.
    DbProxyConnectionString string
    Connection instance string.
    DbProxyEndpointAliases string
    Remarks of agent terminal.
    DbProxyEndpointId string
    Proxy connection address ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    NetType string
    Network type of proxy connection address.
    SslExpiredTime string
    The time when the certificate expires.
    dbProxyConnectionString String
    Connection instance string.
    dbProxyEndpointAliases String
    Remarks of agent terminal.
    dbProxyEndpointId String
    Proxy connection address ID.
    id String
    The provider-assigned unique ID for this managed resource.
    netType String
    Network type of proxy connection address.
    sslExpiredTime String
    The time when the certificate expires.
    dbProxyConnectionString string
    Connection instance string.
    dbProxyEndpointAliases string
    Remarks of agent terminal.
    dbProxyEndpointId string
    Proxy connection address ID.
    id string
    The provider-assigned unique ID for this managed resource.
    netType string
    Network type of proxy connection address.
    sslExpiredTime string
    The time when the certificate expires.
    db_proxy_connection_string str
    Connection instance string.
    db_proxy_endpoint_aliases str
    Remarks of agent terminal.
    db_proxy_endpoint_id str
    Proxy connection address ID.
    id str
    The provider-assigned unique ID for this managed resource.
    net_type str
    Network type of proxy connection address.
    ssl_expired_time str
    The time when the certificate expires.
    dbProxyConnectionString String
    Connection instance string.
    dbProxyEndpointAliases String
    Remarks of agent terminal.
    dbProxyEndpointId String
    Proxy connection address ID.
    id String
    The provider-assigned unique ID for this managed resource.
    netType String
    Network type of proxy connection address.
    sslExpiredTime String
    The time when the certificate expires.

    Look up Existing RdsDbProxy Resource

    Get an existing RdsDbProxy 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?: RdsDbProxyState, opts?: CustomResourceOptions): RdsDbProxy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_proxy_connect_string_port: Optional[int] = None,
            db_proxy_connection_prefix: Optional[str] = None,
            db_proxy_connection_string: Optional[str] = None,
            db_proxy_endpoint_aliases: Optional[str] = None,
            db_proxy_endpoint_id: Optional[str] = None,
            db_proxy_endpoint_read_write_mode: Optional[str] = None,
            db_proxy_features: Optional[str] = None,
            db_proxy_instance_num: Optional[int] = None,
            db_proxy_ssl_enabled: Optional[str] = None,
            effective_specific_time: Optional[str] = None,
            effective_time: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_network_type: Optional[str] = None,
            net_type: Optional[str] = None,
            read_only_instance_distribution_type: Optional[str] = None,
            read_only_instance_max_delay_time: Optional[int] = None,
            read_only_instance_weights: Optional[Sequence[RdsDbProxyReadOnlyInstanceWeightArgs]] = None,
            resource_group_id: Optional[str] = None,
            ssl_expired_time: Optional[str] = None,
            switch_time: Optional[str] = None,
            upgrade_time: Optional[str] = None,
            vpc_id: Optional[str] = None,
            vswitch_id: Optional[str] = None) -> RdsDbProxy
    func GetRdsDbProxy(ctx *Context, name string, id IDInput, state *RdsDbProxyState, opts ...ResourceOption) (*RdsDbProxy, error)
    public static RdsDbProxy Get(string name, Input<string> id, RdsDbProxyState? state, CustomResourceOptions? opts = null)
    public static RdsDbProxy get(String name, Output<String> id, RdsDbProxyState 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:
    DbProxyConnectStringPort int
    The port number that is associated with the proxy endpoint.
    DbProxyConnectionPrefix string
    The new prefix of the proxy endpoint. Enter a prefix.
    DbProxyConnectionString string
    Connection instance string.
    DbProxyEndpointAliases string
    Remarks of agent terminal.
    DbProxyEndpointId string
    Proxy connection address ID.
    DbProxyEndpointReadWriteMode string

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    DbProxyFeatures string

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    DbProxyInstanceNum int
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    DbProxySslEnabled string
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    EffectiveSpecificTime string
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    EffectiveTime string

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    InstanceId string
    The Id of instance that can run database.
    InstanceNetworkType string
    The network type of the instance. Set the value to VPC.
    NetType string
    Network type of proxy connection address.
    ReadOnlyInstanceDistributionType string

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    ReadOnlyInstanceMaxDelayTime int

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    ReadOnlyInstanceWeights List<Pulumi.AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeight>
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    ResourceGroupId string
    The ID of the resource group.
    SslExpiredTime string
    The time when the certificate expires.
    SwitchTime string
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    UpgradeTime string
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    VpcId string
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    VswitchId string
    The ID of the vSwitch that is associated with the specified VPC.
    DbProxyConnectStringPort int
    The port number that is associated with the proxy endpoint.
    DbProxyConnectionPrefix string
    The new prefix of the proxy endpoint. Enter a prefix.
    DbProxyConnectionString string
    Connection instance string.
    DbProxyEndpointAliases string
    Remarks of agent terminal.
    DbProxyEndpointId string
    Proxy connection address ID.
    DbProxyEndpointReadWriteMode string

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    DbProxyFeatures string

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    DbProxyInstanceNum int
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    DbProxySslEnabled string
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    EffectiveSpecificTime string
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    EffectiveTime string

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    InstanceId string
    The Id of instance that can run database.
    InstanceNetworkType string
    The network type of the instance. Set the value to VPC.
    NetType string
    Network type of proxy connection address.
    ReadOnlyInstanceDistributionType string

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    ReadOnlyInstanceMaxDelayTime int

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    ReadOnlyInstanceWeights []RdsDbProxyReadOnlyInstanceWeightArgs
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    ResourceGroupId string
    The ID of the resource group.
    SslExpiredTime string
    The time when the certificate expires.
    SwitchTime string
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    UpgradeTime string
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    VpcId string
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    VswitchId string
    The ID of the vSwitch that is associated with the specified VPC.
    dbProxyConnectStringPort Integer
    The port number that is associated with the proxy endpoint.
    dbProxyConnectionPrefix String
    The new prefix of the proxy endpoint. Enter a prefix.
    dbProxyConnectionString String
    Connection instance string.
    dbProxyEndpointAliases String
    Remarks of agent terminal.
    dbProxyEndpointId String
    Proxy connection address ID.
    dbProxyEndpointReadWriteMode String

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    dbProxyFeatures String

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    dbProxyInstanceNum Integer
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    dbProxySslEnabled String
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effectiveSpecificTime String
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effectiveTime String

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    instanceId String
    The Id of instance that can run database.
    instanceNetworkType String
    The network type of the instance. Set the value to VPC.
    netType String
    Network type of proxy connection address.
    readOnlyInstanceDistributionType String

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    readOnlyInstanceMaxDelayTime Integer

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    readOnlyInstanceWeights List<RdsDbProxyReadOnlyInstanceWeight>
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resourceGroupId String
    The ID of the resource group.
    sslExpiredTime String
    The time when the certificate expires.
    switchTime String
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgradeTime String
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    vpcId String
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitchId String
    The ID of the vSwitch that is associated with the specified VPC.
    dbProxyConnectStringPort number
    The port number that is associated with the proxy endpoint.
    dbProxyConnectionPrefix string
    The new prefix of the proxy endpoint. Enter a prefix.
    dbProxyConnectionString string
    Connection instance string.
    dbProxyEndpointAliases string
    Remarks of agent terminal.
    dbProxyEndpointId string
    Proxy connection address ID.
    dbProxyEndpointReadWriteMode string

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    dbProxyFeatures string

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    dbProxyInstanceNum number
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    dbProxySslEnabled string
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effectiveSpecificTime string
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effectiveTime string

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    instanceId string
    The Id of instance that can run database.
    instanceNetworkType string
    The network type of the instance. Set the value to VPC.
    netType string
    Network type of proxy connection address.
    readOnlyInstanceDistributionType string

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    readOnlyInstanceMaxDelayTime number

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    readOnlyInstanceWeights RdsDbProxyReadOnlyInstanceWeight[]
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resourceGroupId string
    The ID of the resource group.
    sslExpiredTime string
    The time when the certificate expires.
    switchTime string
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgradeTime string
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    vpcId string
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitchId string
    The ID of the vSwitch that is associated with the specified VPC.
    db_proxy_connect_string_port int
    The port number that is associated with the proxy endpoint.
    db_proxy_connection_prefix str
    The new prefix of the proxy endpoint. Enter a prefix.
    db_proxy_connection_string str
    Connection instance string.
    db_proxy_endpoint_aliases str
    Remarks of agent terminal.
    db_proxy_endpoint_id str
    Proxy connection address ID.
    db_proxy_endpoint_read_write_mode str

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    db_proxy_features str

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    db_proxy_instance_num int
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    db_proxy_ssl_enabled str
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effective_specific_time str
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effective_time str

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    instance_id str
    The Id of instance that can run database.
    instance_network_type str
    The network type of the instance. Set the value to VPC.
    net_type str
    Network type of proxy connection address.
    read_only_instance_distribution_type str

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    read_only_instance_max_delay_time int

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    read_only_instance_weights Sequence[RdsDbProxyReadOnlyInstanceWeightArgs]
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resource_group_id str
    The ID of the resource group.
    ssl_expired_time str
    The time when the certificate expires.
    switch_time str
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgrade_time str
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    vpc_id str
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitch_id str
    The ID of the vSwitch that is associated with the specified VPC.
    dbProxyConnectStringPort Number
    The port number that is associated with the proxy endpoint.
    dbProxyConnectionPrefix String
    The new prefix of the proxy endpoint. Enter a prefix.
    dbProxyConnectionString String
    Connection instance string.
    dbProxyEndpointAliases String
    Remarks of agent terminal.
    dbProxyEndpointId String
    Proxy connection address ID.
    dbProxyEndpointReadWriteMode String

    The read and write attributes of the proxy terminal. Valid values:

    • ReadWrite: The proxy terminal connects to the primary instance and can receive both read and write requests.
    • ReadOnly: The proxy terminal does not connect to the primary instance and can receive only read requests. This is the default value.

    NOTE: Note This setting causes your instance to restart. Proceed with caution.

    dbProxyFeatures String

    The features that you want to enable for the proxy endpoint. If you specify more than one feature, separate the features with semicolons (;). Format: Feature 1:Status;Feature 2:Status;.... Do not add a semicolon (;) at the end of the last value. Valid feature values:

    • ReadWriteSpliting: read/write splitting.
    • ConnectionPersist: connection pooling.
    • TransactionReadSqlRouteOptimizeStatus: transaction splitting. Valid status values:
    • 1: enabled.
    • 0: disabled.

    NOTE: Note You must specify this parameter only when the read/write splitting feature is enabled.

    dbProxyInstanceNum Number
    The number of proxy instances that are enabled. Valid values: 1 to 60.
    dbProxySslEnabled String
    The SSL configuration setting that you want to apply on the instance. Valid values:

    • Close: disables SSL encryption.
    • Open: enables SSL encryption or modifies the endpoint that requires SSL encryption.
    • Update: updates the validity period of the SSL certificate.
    effectiveSpecificTime String
    The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    effectiveTime String

    When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:

    • Immediate: ApsaraDB RDS immediately applies the new settings.
    • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
    • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

    NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.

    instanceId String
    The Id of instance that can run database.
    instanceNetworkType String
    The network type of the instance. Set the value to VPC.
    netType String
    Network type of proxy connection address.
    readOnlyInstanceDistributionType String

    The policy that is used to allocate read weights. Valid values:

    • Standard: ApsaraDB RDS automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
    • Custom: You must manually allocate read weights to the instance and its read-only instances.

    NOTE: Note If you set the ReadOnlyInstanceDistributionType parameter to Custom, you must specify the ReadOnlyInstanceWeight parameter.

    readOnlyInstanceMaxDelayTime Number

    The maximum latency threshold that is allowed for read/write splitting. If the latency on a read-only instance exceeds the threshold that you specified, ApsaraDB RDS no longer forwards read requests to the read-only instance. If you do not specify this parameter, the default value of this parameter is retained. Unit: seconds. Valid values: 0 to 3600.

    NOTE: Note If the instance runs PostgreSQL, you can enable only the read/write splitting feature, which is specified by ReadWriteSpliting.

    readOnlyInstanceWeights List<Property Map>
    A list of the read weights of the instance and its read-only instances. It contains two sub-fields(instance_id and weight). Read weights increase in increments of 100, and the maximum read weight is 10000. See read_only_instance_weight below.
    resourceGroupId String
    The ID of the resource group.
    sslExpiredTime String
    The time when the certificate expires.
    switchTime String
    The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
    upgradeTime String
    The time when you want to upgrade the database proxy version of the instance. Valid values:

    • MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
    • Immediate: ApsaraDB RDS immediately performs the upgrade.
    • SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
    vpcId String
    The ID of the virtual private cloud (VPC) to which the instance belongs.
    vswitchId String
    The ID of the vSwitch that is associated with the specified VPC.

    Supporting Types

    RdsDbProxyReadOnlyInstanceWeight, RdsDbProxyReadOnlyInstanceWeightArgs

    InstanceId string
    The Id of the instance and its read-only instances that can run database.
    Weight string
    Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
    InstanceId string
    The Id of the instance and its read-only instances that can run database.
    Weight string
    Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
    instanceId String
    The Id of the instance and its read-only instances that can run database.
    weight String
    Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
    instanceId string
    The Id of the instance and its read-only instances that can run database.
    weight string
    Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
    instance_id str
    The Id of the instance and its read-only instances that can run database.
    weight str
    Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
    instanceId String
    The Id of the instance and its read-only instances that can run database.
    weight String
    Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.

    Import

    RDS database proxy feature can be imported using the id, e.g.

    $ pulumi import alicloud:rds/rdsDbProxy:RdsDbProxy example 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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi