Queries the endpoints of an ApsaraDB for RDS instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDBInstanceNetInfo

The operation that you want to perform. Set the value to DescribeDBInstanceNetInfo.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

Flag String No -

A hidden parameter.

DBInstanceNetRWSplitType String No Normal

The type of endpoint to query. Valid values:

  • Normal
  • ReadWriteSplitting
Note The system returns both types of endpoints by default.

Response parameters

Parameter Type Example Description
RequestId String 777C4593-8053-427B-99E2-105593277CAB

The ID of the request.

InstanceNetworkType String VPC

The network type of the instance. Valid values:

  • Classic
  • VPC
SecurityIPMode String safety

The whitelist mode of the instance. Valid values:

  • normal: The instance uses the standard whitelist mode.
  • safety: The instance uses the enhanced whitelist mode.
DBInstanceNetInfos Array

An array that consists of endpoints.

Upgradeable String Disabled

Indicates whether the IP version can be updated. Valid values: Enable | Disabled.

Note The IP version can be updated from IPv4 to IPv6.
ExpiredTime String 1209534

The remaining validity period of the classic network in hybrid access mode. Unit: seconds.

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

The endpoint of the instance.

IPAddress String 192.168.12.84

The IP address associated with the endpoint.

IPType String Public

The network type of the endpoint. Valid values:

  • If the instance resides in a classic network:
    • Inner: The endpoint is an internal endpoint.
    • Public: The endpoint is a public endpoint.
  • If the instance resides in a VPC:
    • Private: The endpoint is an internal endpoint.
    • Public: The endpoint is a public endpoint.
Port String 3306

The port associated with the endpoint.

VPCId String vpc-uf6f7l4fg90xxxxxxxxxx

The ID of the VPC.

VSwitchId String vsw-uf6adz52c2pxxxxxxxxxx

The ID of the VSwitch associated with the specified VPC.

ConnectionStringType String Normal

The type of the endpoint. Valid values:

  • Normal
  • ReadWriteSplitting
MaxDelayTime String 12

The latency threshold that is allowed by the endpoint. 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, the system no longer routes read requests to the read-only instance.
DistributionType String Standard

The policy that is used to allocate read weights. This parameter is returned only for a read/write splitting endpoint. Valid values:

  • Standard: The system automatically allocates a read weight to each instance based on the instance specifications.
  • Custom: You must manually allocate a read weight to each instance.
SecurityIPGroups Array

An array that consists of IP address whitelists.

SecurityIPGroupName String Default

The name of the IP address whitelist.

SecurityIPs String 127.0.0.1

The IP addresses in the IP address whitelist.

DBInstanceWeights Array

An array that consists of read weights. This parameter is returned only when read/write splitting is enabled for the instance.

DBInstanceId String rm-uf6wjk5xxxxxxx

The ID of the instance.

DBInstanceType String Master

The role of the instance. Valid values:

  • Master: The instance is a primary instance.
  • Readonly: The instance is a read-only instance.
Availability String Unavailable

The availability of the instance. Valid values:

  • Unavailable
  • Available
Weight String 100

The read weight of the instance.

Examples

Sample requests

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

Sample success responses

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

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

Error codes

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