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",
},
],
});
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",
},
])
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.Rds.GetZones.Invoke(new()
{
Engine = "MySQL",
EngineVersion = "5.6",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VpcId = defaultNetwork.Id,
CidrBlock = "172.16.0.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
VswitchName = name,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Rds.Instance("default", new()
{
Engine = "MySQL",
EngineVersion = "5.7",
InstanceType = "rds.mysql.c1.large",
InstanceStorage = 20,
InstanceChargeType = "Postpaid",
InstanceName = name,
VswitchId = defaultSwitch.Id,
DbInstanceStorageType = "local_ssd",
});
var defaultReadOnlyInstance = new AliCloud.Rds.ReadOnlyInstance("default", new()
{
ZoneId = defaultInstance.ZoneId,
MasterDbInstanceId = defaultInstance.Id,
EngineVersion = defaultInstance.EngineVersion,
InstanceStorage = defaultInstance.InstanceStorage,
InstanceType = defaultInstance.InstanceType,
InstanceName = $"{name}readonly",
VswitchId = defaultSwitch.Id,
});
var defaultRdsDbProxy = new AliCloud.Rds.RdsDbProxy("default", new()
{
InstanceId = defaultInstance.Id,
InstanceNetworkType = "VPC",
VpcId = defaultInstance.VpcId,
VswitchId = defaultInstance.VswitchId,
DbProxyInstanceNum = 2,
DbProxyConnectionPrefix = "example",
DbProxyConnectStringPort = 3306,
DbProxyEndpointReadWriteMode = "ReadWrite",
ReadOnlyInstanceMaxDelayTime = 90,
DbProxyFeatures = "TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1",
ReadOnlyInstanceDistributionType = "Custom",
ReadOnlyInstanceWeights = new[]
{
new AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeightArgs
{
InstanceId = defaultInstance.Id,
Weight = "100",
},
new AliCloud.Rds.Inputs.RdsDbProxyReadOnlyInstanceWeightArgs
{
InstanceId = defaultReadOnlyInstance.Id,
Weight = "500",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rds.RdsFunctions;
import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.rds.Instance;
import com.pulumi.alicloud.rds.InstanceArgs;
import com.pulumi.alicloud.rds.ReadOnlyInstance;
import com.pulumi.alicloud.rds.ReadOnlyInstanceArgs;
import com.pulumi.alicloud.rds.RdsDbProxy;
import com.pulumi.alicloud.rds.RdsDbProxyArgs;
import com.pulumi.alicloud.rds.inputs.RdsDbProxyReadOnlyInstanceWeightArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var default = RdsFunctions.getZones(GetZonesArgs.builder()
.engine("MySQL")
.engineVersion("5.6")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(defaultNetwork.id())
.cidrBlock("172.16.0.0/24")
.zoneId(default_.zones()[0].id())
.vswitchName(name)
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.engine("MySQL")
.engineVersion("5.7")
.instanceType("rds.mysql.c1.large")
.instanceStorage("20")
.instanceChargeType("Postpaid")
.instanceName(name)
.vswitchId(defaultSwitch.id())
.dbInstanceStorageType("local_ssd")
.build());
var defaultReadOnlyInstance = new ReadOnlyInstance("defaultReadOnlyInstance", ReadOnlyInstanceArgs.builder()
.zoneId(defaultInstance.zoneId())
.masterDbInstanceId(defaultInstance.id())
.engineVersion(defaultInstance.engineVersion())
.instanceStorage(defaultInstance.instanceStorage())
.instanceType(defaultInstance.instanceType())
.instanceName(String.format("%sreadonly", name))
.vswitchId(defaultSwitch.id())
.build());
var defaultRdsDbProxy = new RdsDbProxy("defaultRdsDbProxy", RdsDbProxyArgs.builder()
.instanceId(defaultInstance.id())
.instanceNetworkType("VPC")
.vpcId(defaultInstance.vpcId())
.vswitchId(defaultInstance.vswitchId())
.dbProxyInstanceNum(2)
.dbProxyConnectionPrefix("example")
.dbProxyConnectStringPort(3306)
.dbProxyEndpointReadWriteMode("ReadWrite")
.readOnlyInstanceMaxDelayTime(90)
.dbProxyFeatures("TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1")
.readOnlyInstanceDistributionType("Custom")
.readOnlyInstanceWeights(
RdsDbProxyReadOnlyInstanceWeightArgs.builder()
.instanceId(defaultInstance.id())
.weight("100")
.build(),
RdsDbProxyReadOnlyInstanceWeightArgs.builder()
.instanceId(defaultReadOnlyInstance.id())
.weight("500")
.build())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 172.16.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vpcId: ${defaultNetwork.id}
cidrBlock: 172.16.0.0/24
zoneId: ${default.zones[0].id}
vswitchName: ${name}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${name}
vpcId: ${defaultNetwork.id}
defaultInstance:
type: alicloud:rds:Instance
name: default
properties:
engine: MySQL
engineVersion: '5.7'
instanceType: rds.mysql.c1.large
instanceStorage: '20'
instanceChargeType: Postpaid
instanceName: ${name}
vswitchId: ${defaultSwitch.id}
dbInstanceStorageType: local_ssd
defaultReadOnlyInstance:
type: alicloud:rds:ReadOnlyInstance
name: default
properties:
zoneId: ${defaultInstance.zoneId}
masterDbInstanceId: ${defaultInstance.id}
engineVersion: ${defaultInstance.engineVersion}
instanceStorage: ${defaultInstance.instanceStorage}
instanceType: ${defaultInstance.instanceType}
instanceName: ${name}readonly
vswitchId: ${defaultSwitch.id}
defaultRdsDbProxy:
type: alicloud:rds:RdsDbProxy
name: default
properties:
instanceId: ${defaultInstance.id}
instanceNetworkType: VPC
vpcId: ${defaultInstance.vpcId}
vswitchId: ${defaultInstance.vswitchId}
dbProxyInstanceNum: 2
dbProxyConnectionPrefix: example
dbProxyConnectStringPort: 3306
dbProxyEndpointReadWriteMode: ReadWrite
readOnlyInstanceMaxDelayTime: 90
dbProxyFeatures: TransactionReadSqlRouteOptimizeStatus:1;ConnectionPersist:1;ReadWriteSpliting:1
readOnlyInstanceDistributionType: Custom
readOnlyInstanceWeights:
- instanceId: ${defaultInstance.id}
weight: '100'
- instanceId: ${defaultReadOnlyInstance.id}
weight: '500'
variables:
default:
fn::invoke:
Function: alicloud:rds:getZones
Arguments:
engine: MySQL
engineVersion: '5.6'
NOTE: Resource
alicloud.rds.RdsDbProxy
should be created afteralicloud.rds.ReadOnlyInstance
, so thedepends_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 string
- The unique name of the resource.
- args RdsDbProxyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RdsDbProxyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RdsDbProxyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RdsDbProxyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RdsDbProxyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var rdsDbProxyResource = new AliCloud.Rds.RdsDbProxy("rdsDbProxyResource", new()
{
InstanceId = "string",
VswitchId = "string",
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",
});
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"),
})
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());
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")
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",
});
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
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:
- Db
Proxy intInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- Instance
Id string - The Id of instance that can run database.
- Instance
Network stringType - The network type of the instance. Set the value to VPC.
- Vpc
Id string - The ID of the virtual private cloud (VPC) to which the instance belongs.
- Vswitch
Id string - The ID of the vSwitch that is associated with the specified VPC.
- Db
Proxy intConnect String Port - The port number that is associated with the proxy endpoint.
- Db
Proxy stringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- Db
Proxy stringEndpoint Read Write Mode 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 stringFeatures 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 stringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- Db
Proxy stringSsl Enabled - 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 stringTime - 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 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.
- Read
Only stringInstance Distribution Type 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 intInstance Max Delay Time 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 List<Pulumi.Instance Weights Ali Cloud. Rds. Inputs. Rds Db Proxy Read Only Instance Weight> - 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 stringId - The ID of the resource group.
- Switch
Time 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.
- Upgrade
Time 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 intInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- Instance
Id string - The Id of instance that can run database.
- Instance
Network stringType - The network type of the instance. Set the value to VPC.
- Vpc
Id string - The ID of the virtual private cloud (VPC) to which the instance belongs.
- Vswitch
Id string - The ID of the vSwitch that is associated with the specified VPC.
- Db
Proxy intConnect String Port - The port number that is associated with the proxy endpoint.
- Db
Proxy stringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- Db
Proxy stringEndpoint Read Write Mode 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 stringFeatures 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 stringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- Db
Proxy stringSsl Enabled - 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 stringTime - 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 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.
- Read
Only stringInstance Distribution Type 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 intInstance Max Delay Time 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 []RdsInstance Weights Db Proxy Read Only Instance Weight Args - 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 stringId - The ID of the resource group.
- Switch
Time 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.
- Upgrade
Time 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 IntegerInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- instance
Id String - The Id of instance that can run database.
- instance
Network StringType - The network type of the instance. Set the value to VPC.
- vpc
Id String - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch
Id String - The ID of the vSwitch that is associated with the specified VPC.
- db
Proxy IntegerConnect String Port - The port number that is associated with the proxy endpoint.
- db
Proxy StringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db
Proxy StringEndpoint Read Write Mode 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 StringFeatures 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 StringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db
Proxy StringSsl Enabled - 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 StringTime - 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 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.
- read
Only StringInstance Distribution Type 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 IntegerInstance Max Delay Time 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 List<RdsInstance Weights Db Proxy Read Only Instance Weight> - 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 StringId - The ID of the resource group.
- switch
Time 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.
- upgrade
Time 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 numberInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- instance
Id string - The Id of instance that can run database.
- instance
Network stringType - The network type of the instance. Set the value to VPC.
- vpc
Id string - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch
Id string - The ID of the vSwitch that is associated with the specified VPC.
- db
Proxy numberConnect String Port - The port number that is associated with the proxy endpoint.
- db
Proxy stringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db
Proxy stringEndpoint Read Write Mode 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 stringFeatures 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 stringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db
Proxy stringSsl Enabled - 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 stringTime - 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 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.
- read
Only stringInstance Distribution Type 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 numberInstance Max Delay Time 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 RdsInstance Weights Db Proxy Read Only Instance Weight[] - 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 stringId - The ID of the resource group.
- switch
Time 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.
- upgrade
Time 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_ intinstance_ num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- instance_
id str - The Id of instance that can run database.
- instance_
network_ strtype - The network type of the instance. Set the value to VPC.
- vpc_
id str - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch_
id str - The ID of the vSwitch that is associated with the specified VPC.
- db_
proxy_ intconnect_ string_ port - The port number that is associated with the proxy endpoint.
- db_
proxy_ strconnection_ prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db_
proxy_ strendpoint_ read_ write_ mode 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_ strfeatures 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_ strinstance_ type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db_
proxy_ strssl_ enabled - 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_ strtime - 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_ strinstance_ distribution_ type 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_ intinstance_ max_ delay_ time 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_ Sequence[Rdsinstance_ weights Db Proxy Read Only Instance Weight Args] - 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_ strid - 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.
- db
Proxy NumberInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- instance
Id String - The Id of instance that can run database.
- instance
Network StringType - The network type of the instance. Set the value to VPC.
- vpc
Id String - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch
Id String - The ID of the vSwitch that is associated with the specified VPC.
- db
Proxy NumberConnect String Port - The port number that is associated with the proxy endpoint.
- db
Proxy StringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db
Proxy StringEndpoint Read Write Mode 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 StringFeatures 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 StringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db
Proxy StringSsl Enabled - 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 StringTime - 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 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.
- read
Only StringInstance Distribution Type 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 NumberInstance Max Delay Time 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 List<Property Map>Instance Weights - 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 StringId - The ID of the resource group.
- switch
Time 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.
- upgrade
Time 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:
- Db
Proxy stringConnection String - Connection instance string.
- Db
Proxy stringEndpoint Aliases - Remarks of agent terminal.
- Db
Proxy stringEndpoint Id - Proxy connection address ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Net
Type string - Network type of proxy connection address.
- Ssl
Expired stringTime - The time when the certificate expires.
- Db
Proxy stringConnection String - Connection instance string.
- Db
Proxy stringEndpoint Aliases - Remarks of agent terminal.
- Db
Proxy stringEndpoint Id - Proxy connection address ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Net
Type string - Network type of proxy connection address.
- Ssl
Expired stringTime - The time when the certificate expires.
- db
Proxy StringConnection String - Connection instance string.
- db
Proxy StringEndpoint Aliases - Remarks of agent terminal.
- db
Proxy StringEndpoint Id - Proxy connection address ID.
- id String
- The provider-assigned unique ID for this managed resource.
- net
Type String - Network type of proxy connection address.
- ssl
Expired StringTime - The time when the certificate expires.
- db
Proxy stringConnection String - Connection instance string.
- db
Proxy stringEndpoint Aliases - Remarks of agent terminal.
- db
Proxy stringEndpoint Id - Proxy connection address ID.
- id string
- The provider-assigned unique ID for this managed resource.
- net
Type string - Network type of proxy connection address.
- ssl
Expired stringTime - The time when the certificate expires.
- db_
proxy_ strconnection_ string - Connection instance string.
- db_
proxy_ strendpoint_ aliases - Remarks of agent terminal.
- db_
proxy_ strendpoint_ id - 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_ strtime - The time when the certificate expires.
- db
Proxy StringConnection String - Connection instance string.
- db
Proxy StringEndpoint Aliases - Remarks of agent terminal.
- db
Proxy StringEndpoint Id - Proxy connection address ID.
- id String
- The provider-assigned unique ID for this managed resource.
- net
Type String - Network type of proxy connection address.
- ssl
Expired StringTime - 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Db
Proxy intConnect String Port - The port number that is associated with the proxy endpoint.
- Db
Proxy stringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- Db
Proxy stringConnection String - Connection instance string.
- Db
Proxy stringEndpoint Aliases - Remarks of agent terminal.
- Db
Proxy stringEndpoint Id - Proxy connection address ID.
- Db
Proxy stringEndpoint Read Write Mode 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 stringFeatures 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 intInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- Db
Proxy stringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- Db
Proxy stringSsl Enabled - 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 stringTime - 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 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.
- Instance
Id string - The Id of instance that can run database.
- Instance
Network stringType - The network type of the instance. Set the value to VPC.
- Net
Type string - Network type of proxy connection address.
- Read
Only stringInstance Distribution Type 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 intInstance Max Delay Time 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 List<Pulumi.Instance Weights Ali Cloud. Rds. Inputs. Rds Db Proxy Read Only Instance Weight> - 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 stringId - The ID of the resource group.
- Ssl
Expired stringTime - The time when the certificate expires.
- Switch
Time 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.
- Upgrade
Time 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.
- Vpc
Id string - The ID of the virtual private cloud (VPC) to which the instance belongs.
- Vswitch
Id string - The ID of the vSwitch that is associated with the specified VPC.
- Db
Proxy intConnect String Port - The port number that is associated with the proxy endpoint.
- Db
Proxy stringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- Db
Proxy stringConnection String - Connection instance string.
- Db
Proxy stringEndpoint Aliases - Remarks of agent terminal.
- Db
Proxy stringEndpoint Id - Proxy connection address ID.
- Db
Proxy stringEndpoint Read Write Mode 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 stringFeatures 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 intInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- Db
Proxy stringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- Db
Proxy stringSsl Enabled - 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 stringTime - 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 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.
- Instance
Id string - The Id of instance that can run database.
- Instance
Network stringType - The network type of the instance. Set the value to VPC.
- Net
Type string - Network type of proxy connection address.
- Read
Only stringInstance Distribution Type 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 intInstance Max Delay Time 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 []RdsInstance Weights Db Proxy Read Only Instance Weight Args - 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 stringId - The ID of the resource group.
- Ssl
Expired stringTime - The time when the certificate expires.
- Switch
Time 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.
- Upgrade
Time 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.
- Vpc
Id string - The ID of the virtual private cloud (VPC) to which the instance belongs.
- Vswitch
Id string - The ID of the vSwitch that is associated with the specified VPC.
- db
Proxy IntegerConnect String Port - The port number that is associated with the proxy endpoint.
- db
Proxy StringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db
Proxy StringConnection String - Connection instance string.
- db
Proxy StringEndpoint Aliases - Remarks of agent terminal.
- db
Proxy StringEndpoint Id - Proxy connection address ID.
- db
Proxy StringEndpoint Read Write Mode 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 StringFeatures 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 IntegerInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- db
Proxy StringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db
Proxy StringSsl Enabled - 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 StringTime - 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 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.
- instance
Id String - The Id of instance that can run database.
- instance
Network StringType - The network type of the instance. Set the value to VPC.
- net
Type String - Network type of proxy connection address.
- read
Only StringInstance Distribution Type 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 IntegerInstance Max Delay Time 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 List<RdsInstance Weights Db Proxy Read Only Instance Weight> - 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 StringId - The ID of the resource group.
- ssl
Expired StringTime - The time when the certificate expires.
- switch
Time 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.
- upgrade
Time 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.
- vpc
Id String - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch
Id String - The ID of the vSwitch that is associated with the specified VPC.
- db
Proxy numberConnect String Port - The port number that is associated with the proxy endpoint.
- db
Proxy stringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db
Proxy stringConnection String - Connection instance string.
- db
Proxy stringEndpoint Aliases - Remarks of agent terminal.
- db
Proxy stringEndpoint Id - Proxy connection address ID.
- db
Proxy stringEndpoint Read Write Mode 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 stringFeatures 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 numberInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- db
Proxy stringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db
Proxy stringSsl Enabled - 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 stringTime - 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 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.
- instance
Id string - The Id of instance that can run database.
- instance
Network stringType - The network type of the instance. Set the value to VPC.
- net
Type string - Network type of proxy connection address.
- read
Only stringInstance Distribution Type 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 numberInstance Max Delay Time 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 RdsInstance Weights Db Proxy Read Only Instance Weight[] - 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 stringId - The ID of the resource group.
- ssl
Expired stringTime - The time when the certificate expires.
- switch
Time 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.
- upgrade
Time 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.
- vpc
Id string - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch
Id string - The ID of the vSwitch that is associated with the specified VPC.
- db_
proxy_ intconnect_ string_ port - The port number that is associated with the proxy endpoint.
- db_
proxy_ strconnection_ prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db_
proxy_ strconnection_ string - Connection instance string.
- db_
proxy_ strendpoint_ aliases - Remarks of agent terminal.
- db_
proxy_ strendpoint_ id - Proxy connection address ID.
- db_
proxy_ strendpoint_ read_ write_ mode 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_ strfeatures 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_ intinstance_ num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- db_
proxy_ strinstance_ type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db_
proxy_ strssl_ enabled - 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_ strtime - The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
- effective_
time str When modifying the number of proxy instances,The time when you want to apply the new database proxy settings.Valid values:
- Immediate: ApsaraDB RDS immediately applies the new settings.
- MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
- SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.
NOTE: Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.
- instance_
id str - The Id of instance that can run database.
- instance_
network_ strtype - The network type of the instance. Set the value to VPC.
- net_
type str - Network type of proxy connection address.
- read_
only_ strinstance_ distribution_ type 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_ intinstance_ max_ delay_ time 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_ Sequence[Rdsinstance_ weights Db Proxy Read Only Instance Weight Args] - 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_ strid - The ID of the resource group.
- ssl_
expired_ strtime - The time when the certificate expires.
- switch_
time str - The point in time at which you want to upgrade the database proxy version of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
- upgrade_
time str - The time when you want to upgrade the database proxy version of the instance. Valid values:
- MaintainTime: ApsaraDB RDS performs the upgrade during the maintenance window that you specified. This is the default value. For more information, see Modify the maintenance window.
- Immediate: ApsaraDB RDS immediately performs the upgrade.
- SpecificTime: ApsaraDB RDS performs the upgrade at a specified point in time.
- vpc_
id str - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch_
id str - The ID of the vSwitch that is associated with the specified VPC.
- db
Proxy NumberConnect String Port - The port number that is associated with the proxy endpoint.
- db
Proxy StringConnection Prefix - The new prefix of the proxy endpoint. Enter a prefix.
- db
Proxy StringConnection String - Connection instance string.
- db
Proxy StringEndpoint Aliases - Remarks of agent terminal.
- db
Proxy StringEndpoint Id - Proxy connection address ID.
- db
Proxy StringEndpoint Read Write Mode 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 StringFeatures 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 NumberInstance Num - The number of proxy instances that are enabled. Valid values: 1 to 60.
- db
Proxy StringInstance Type - The database proxy type. Valid values:
- common: universal proxy.
- exclusive: Exclusive proxy (default).
- db
Proxy StringSsl Enabled - 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 StringTime - 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 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.
- instance
Id String - The Id of instance that can run database.
- instance
Network StringType - The network type of the instance. Set the value to VPC.
- net
Type String - Network type of proxy connection address.
- read
Only StringInstance Distribution Type 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 NumberInstance Max Delay Time 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 List<Property Map>Instance Weights - 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 StringId - The ID of the resource group.
- ssl
Expired StringTime - The time when the certificate expires.
- switch
Time 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.
- upgrade
Time 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.
- vpc
Id String - The ID of the virtual private cloud (VPC) to which the instance belongs.
- vswitch
Id String - The ID of the vSwitch that is associated with the specified VPC.
Supporting Types
RdsDbProxyReadOnlyInstanceWeight, RdsDbProxyReadOnlyInstanceWeightArgs
- Instance
Id string - The Id of the instance and its read-only instances that can run database.
- Weight string
- Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
- Instance
Id string - The Id of the instance and its read-only instances that can run database.
- Weight string
- Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
- instance
Id String - The Id of the instance and its read-only instances that can run database.
- weight String
- Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
- instance
Id string - The Id of the instance and its read-only instances that can run database.
- weight string
- Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
- instance_
id str - The Id of the instance and its read-only instances that can run database.
- weight str
- Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
- instance
Id String - The Id of the instance and its read-only instances that can run database.
- weight String
- Weight of instances that can run the database and their read-only instances. Read weights increase in increments of 100, and the maximum read weight is 10000.
Import
RDS database proxy feature can be imported using the id, e.g.
$ pulumi import alicloud:rds/rdsDbProxy:RdsDbProxy example abc12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.