1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. RdsDbProxy
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.rds.RdsDbProxy

Explore with Pulumi AI

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",
        },
    ],
});
Copy
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=[
        {
            "instance_id": default_instance.id,
            "weight": "100",
        },
        {
            "instance_id": default_read_only_instance.id,
            "weight": "500",
        },
    ])
Copy
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.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
	})
}
Copy
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",
            },
        },
    });

});
Copy
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());

    }
}
Copy
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'
Copy

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

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

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

The RdsDbProxy resource accepts the following input properties:

DbProxyInstanceNum This property is required. int
The number of proxy instances that are enabled. Valid values: 1 to 60.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The Id of instance that can run database.
InstanceNetworkType
This property is required.
Changes to this property will trigger replacement.
string
The network type of the instance. Set the value to VPC.
VpcId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the virtual private cloud (VPC) to which the instance belongs.
VswitchId
This property is required.
Changes to this property will trigger replacement.
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.

DbProxyInstanceType string
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 This property is required. int
The number of proxy instances that are enabled. Valid values: 1 to 60.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The Id of instance that can run database.
InstanceNetworkType
This property is required.
Changes to this property will trigger replacement.
string
The network type of the instance. Set the value to VPC.
VpcId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the virtual private cloud (VPC) to which the instance belongs.
VswitchId
This property is required.
Changes to this property will trigger replacement.
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.

DbProxyInstanceType string
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 This property is required. Integer
The number of proxy instances that are enabled. Valid values: 1 to 60.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The Id of instance that can run database.
instanceNetworkType
This property is required.
Changes to this property will trigger replacement.
String
The network type of the instance. Set the value to VPC.
vpcId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitchId
This property is required.
Changes to this property will trigger replacement.
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.

dbProxyInstanceType String
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 This property is required. number
The number of proxy instances that are enabled. Valid values: 1 to 60.
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The Id of instance that can run database.
instanceNetworkType
This property is required.
Changes to this property will trigger replacement.
string
The network type of the instance. Set the value to VPC.
vpcId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitchId
This property is required.
Changes to this property will trigger replacement.
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.

dbProxyInstanceType string
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 This property is required. int
The number of proxy instances that are enabled. Valid values: 1 to 60.
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The Id of instance that can run database.
instance_network_type
This property is required.
Changes to this property will trigger replacement.
str
The network type of the instance. Set the value to VPC.
vpc_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitch_id
This property is required.
Changes to this property will trigger replacement.
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_instance_type str
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 This property is required. Number
The number of proxy instances that are enabled. Valid values: 1 to 60.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The Id of instance that can run database.
instanceNetworkType
This property is required.
Changes to this property will trigger replacement.
String
The network type of the instance. Set the value to VPC.
vpcId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitchId
This property is required.
Changes to this property will trigger replacement.
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.

dbProxyInstanceType String
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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_instance_type: Optional[str] = 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)
resources:  _:    type: alicloud:rds:RdsDbProxy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
DbProxyInstanceType string
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 Changes to this property will trigger replacement. string
The Id of instance that can run database.
InstanceNetworkType Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the virtual private cloud (VPC) to which the instance belongs.
VswitchId Changes to this property will trigger replacement. 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.
DbProxyInstanceType string
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 Changes to this property will trigger replacement. string
The Id of instance that can run database.
InstanceNetworkType Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the virtual private cloud (VPC) to which the instance belongs.
VswitchId Changes to this property will trigger replacement. 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.
dbProxyInstanceType String
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 Changes to this property will trigger replacement. String
The Id of instance that can run database.
instanceNetworkType Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitchId Changes to this property will trigger replacement. 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.
dbProxyInstanceType string
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 Changes to this property will trigger replacement. string
The Id of instance that can run database.
instanceNetworkType Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitchId Changes to this property will trigger replacement. 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_instance_type str
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 Changes to this property will trigger replacement. str
The Id of instance that can run database.
instance_network_type Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitch_id Changes to this property will trigger replacement. 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.
dbProxyInstanceType String
The database proxy type. Valid values:

  • common: universal proxy.
  • exclusive: Exclusive proxy (default).
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 Changes to this property will trigger replacement. String
The Id of instance that can run database.
instanceNetworkType Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the virtual private cloud (VPC) to which the instance belongs.
vswitchId Changes to this property will trigger replacement. String
The ID of the vSwitch that is associated with the specified VPC.

Supporting Types

RdsDbProxyReadOnlyInstanceWeight
, RdsDbProxyReadOnlyInstanceWeightArgs

InstanceId This property is required. string
The Id of the instance and its read-only instances that can run database.
Weight This property is required. 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 This property is required. string
The Id of the instance and its read-only instances that can run database.
Weight This property is required. 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 This property is required. String
The Id of the instance and its read-only instances that can run database.
weight This property is required. 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 This property is required. string
The Id of the instance and its read-only instances that can run database.
weight This property is required. 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 This property is required. str
The Id of the instance and its read-only instances that can run database.
weight This property is required. 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 This property is required. String
The Id of the instance and its read-only instances that can run database.
weight This property is required. 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
Copy

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.