You can call this operation to view all the connection addresses of an instance.

Debugging

You can use OpenAPI Explorer to perform debugging. OpenAPI Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required? Example Description
Action String Yes DescribeDBInstanceNetInfo

The operation that you want to perform. Set this parameter to DescribeDBInstanceNetInfo.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

DBInstanceNetRWSplitType String No Normal

The type of the connection address. Valid values:

  • Normal
  • ReadWriteSplitting
Note By default, all types of connections are listed.
AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID issued by Alibaba Cloud for users to access services.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to guarantee the idempotency of requests. The client token is generated by the client and is unique among different requests. It is a string of up to 64 ASCII characters.

Flag String No -

Optional.

Response parameters

Parameter Type Example Description
DBInstanceNetInfos N/A N/A

The list of the connection addresses for the instance.

ConnectionString String rm-uf6wxxxxx.mysql.rds.aliyuncs.com

The connection address.

IPAddress String 192.168.12.84

The IP address.

IPType String Public

The type of the network. Valid values:

  • For a classic network:
    • Inner
    • Public
  • For a VPC:
    • Private
    • Public
Port String 3306

The connection port.

VPCId String vpc-uf6f7l4fg90xxxxxxxxxx

The ID of the VPC.

VSwitchId String vsw-uf6adz52c2pxxxxxxxxxx

The ID of the VSwitch.

ConnectionStringType String Normal

The type of the connection address. Valid values:

  • Normal
  • ReadWriteSplitting
MaxDelayTime String 12

The latency threshold. This parameter is returned only for the read/write splitting address. Unit: second.

Note No traffic is allocated to read-only instances that exceed the latency threshold.
DistributionType String Standard

The allocation policy of the read request. This parameter is returned only for the read/write splitting address. Valid values:

  • Standard
  • Custom
DBInstanceWeights N/A N/A

The list of instance weights. The instances with read/write splitting addresses return this parameter.

DBInstanceId String rm-uf6wjk5xxxxxxx

The ID of the instance.

DBInstanceType String Master

The type of the instance. Valid values:

  • Master
  • Readonly
Weight String 100

The weight of the instance.

Availability String Unavailable

The availability of the instance. Valid values:

  • Unavailable
  • Available
ExpiredTime String 1209534

The remaining time of the classic network in the hybrid access mode. Unit: second.

SecurityIPGroups N/A N/A

The IP whitelist groups of the instance.

SecurityIPGroupName String Default

The name of the IP whitelist group.

SecurityIPs String 127.0.0.1

The whitelist IP address.

Upgradeable String Disabled

Indicates whether the IP version can be upgraded. Valid values:

  • true
  • false
Note IPv4 can be upgraded to IPv6.
InstanceNetworkType String VPC

The type of the network. Valid values:

  • Classic
  • VPC
RequestId String 777C4593-8053-427B-99E2-105593277CAB

The ID of the request.

SecurityIPMode String safety

The whitelist mode. Valid values:

  • normal
  • safety

Examples

Sample requests


http(s)://rds.aliyuncs.com/? Action=DescribeDBInstanceNetInfo
&DBInstanceId=rm-uf6wjk5xxxxxxx
&<Common request parameters>

Successful response examples

XML format

<DescribeDBInstanceNetInfoResponse>
	  <dBInstanceNetInfos>
		    <connectionString>rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com</connectionString>
		    <connectionStringType>Normal</connectionStringType>
		    <iPAddress>192.168.xx.xx</iPAddress>
		    <iPType>Public</iPType>
		    <port>3306</port>
		    <upgradeable>Disabled</upgradeable>
		    <vPCId></vPCId>
	  </dBInstanceNetInfos>
	  <instanceNetworkType>Classic</instanceNetworkType>
	  <requestId>777C4593-8053-427B-99E2-105593277CAB</requestId>
</DescribeDBInstanceNetInfoResponse>

JSON format

{
	"instanceNetworkType":"Classic",
	"requestId":"777C4593-8053-427B-99E2-105593277CAB",
	"dBInstanceNetInfos":[
		{
			"port":"3306",
			"dBInstanceWeights":[],
			"iPType":"Public",
			"connectionStringType":"Normal",
			"vPCId":"",
			"securityIPGroups":[],
			"connectionString":"rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com",
			"iPAddress":"192.168.xx.xx",
			"upgradeable":"Disabled"
		}
	]
}

Error codes

For a list of error codes, visit the API Error Center.