You can call the DescribeDBInstanceNetInfo operation to query the endpoints of an ApsaraDB RDS instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDBInstanceNetInfo |
The operation that you want to perform. Set the value to DescribeDBInstanceNetInfo. |
ClientToken | String | No | ETnLKlblzczshOTUbOC***** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the generated token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
DBInstanceId | String | Yes | rm-uf6wjk5***** |
The ID of the instance. |
Flag | Integer | No | N/A |
A reserved parameter. |
DBInstanceNetRWSplitType | String | No | Normal |
The type of the endpoint. Valid values:
Note By default, the system returns both types of endpoints.
|
GeneralGroupName | String | No | rgc-2ze***** |
The name of the dedicated cluster to which the instance belongs. This parameter takes effect only when the instance runs MySQL on RDS Standard Edition and is created in a dedicated cluster. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
SecurityIPMode | String | safety |
The whitelist mode of the instance. Valid values:
|
RequestId | String | 777C4593-8053-427B-99E2-105593277CAB |
The ID of the request. |
InstanceNetworkType | String | VPC |
The network type of the instance. Valid values:
|
DBInstanceNetInfos | Array of DBInstanceNetInfo |
Details of the endpoints of the instance. |
|
DBInstanceNetInfo | |||
VSwitchId | String | vsw-uf6adz52c2p***** |
The ID of the vSwitch. |
ConnectionStringType | String | Normal |
The type of the endpoint. Valid values:
|
ConnectionString | String | rm-uf6w*****.mysql.rds.aliyuncs.com |
The endpoint of the instance. |
ExpiredTime | String | 1209534 |
The remaining validity period of the instance of the classic network in hybrid access mode. Unit: seconds. |
Upgradeable | String | Disabled |
Indicates whether the IP version can be updated. Valid values:
|
MaxDelayTime | String | 12 |
The latency threshold. This parameter is returned only for a read/write splitting endpoint. Unit: seconds. Note If the latency on a read-only instance exceeds the specified threshold, ApsaraDB RDS
no longer forwards read requests to the read-only instance.
|
IPType | String | Public |
The network type.
|
Port | String | 3306 |
The port that is used to connect to the instance. |
BabelfishPort | String | 1433 |
The Tabular Data Stream (TDS) port of the instance for which Babelfish is enabled. Note This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information
about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
|
VPCId | String | vpc-uf6f7l4fg90***** |
The ID of the VPC to which the instance belongs. |
DistributionType | String | Standard |
The policy that is used to assign read weights. This parameter is returned only for a read/write splitting endpoint. Valid values:
|
IPAddress | String | 192.168.XX.XX |
The IP address of the instance. |
SecurityIPGroups | Array of securityIPGroup |
Details about the IP whitelists of the instance. |
|
securityIPGroup | |||
SecurityIPs | String | 127.0.XX.XX |
The IP addresses contained in the IP address whitelist. |
SecurityIPGroupName | String | Default |
The name of the IP address whitelist. |
DBInstanceWeights | Array of DBInstanceWeight |
Details of the weight. This parameter is returned only when the read/write splitting feature is enabled for the instance. |
|
DBInstanceWeight | |||
Availability | String | Unavailable |
The availability of the instance. Valid values:
|
Weight | String | 100 |
The weight of the instance. |
DBInstanceId | String | rm-uf6wjk5***** |
The ID of the instance. |
Role | String | N/A |
A deprecated parameter. |
DBInstanceType | String | Master |
The role of the instance. Valid values:
|
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=DescribeDBInstanceNetInfo
&DBInstanceId=rm-uf6wjk5*****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDBInstanceNetInfoResponse>
<dBInstanceNetInfos>
<connectionString>rm-uf6wjk5*****.mysql.rds.aliyuncs.com</connectionString>
<connectionStringType>Normal</connectionStringType>
<iPAddress>192.168.XX.XX</iPAddress>
<iPType>Public</iPType>
<port>3306</port>
<upgradeable>Disabled</upgradeable>
<vPCId/>
</dBInstanceNetInfos>
<instanceNetworkType>Classic</instanceNetworkType>
<requestId>777C4593-8053-427B-99E2-105593277CAB</requestId>
</DescribeDBInstanceNetInfoResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"dBInstanceNetInfos" : {
"connectionString" : "rm-uf6wjk5*****.mysql.rds.aliyuncs.com",
"connectionStringType" : "Normal",
"iPAddress" : "192.168.XX.XX",
"iPType" : "Public",
"port" : 3306,
"upgradeable" : "Disabled",
"vPCId" : ""
},
"instanceNetworkType" : "Classic",
"requestId" : "777C4593-8053-427B-99E2-105593277CAB"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParameter | Illegal parameter | The error message returned because the specified parameters are invalid. |
For a list of error codes, visit the API Error Center.