Queries the connection information of an AnalyticDB for PostgreSQL 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 gp-xxxxxxxxxx

The ID of the instance.

Note You can call the DescribeDBInstances operation to query details about all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.

Response parameters

Parameter Type Example Description
RequestId String 7565770E-7C45-462D-BA4A-8A5396F2CAD1

The ID of the request.

DBInstanceNetInfos Array of DBInstanceNetInfo

The connection information of the instance.

DBInstanceNetInfo
VSwitchId String vsw-xxxxxxxx

The ID of the vSwitch. Multiple IDs are separated by commas (,).

ConnectionString String gp-xxxxxxx.gpdb.rds.aliyuncs.com

The endpoint used to connect to the instance.

IPType String Inner

The type of IP address.

  • Valid values for instances in the classic network: Inner and Public
  • Valid values for instances in a virtual private cloud (VPC): Private and Public
Port String 3432

The port number used to connect to the instance.

VpcInstanceId String vpc-xxxxxxx

The ID of the VPC.

VPCId String vpc-xxxxxxx

The ID of the VPC.

IPAddress String 127.0.0.1

The IP address of the instance.

AddressType String Intranet

The IP address type of the instance.

InstanceNetworkType String Classic

The network type of the instance. Valid values:

  • Classic
  • VPC

Examples

Sample requests

https://gpdb.aliyuncs.com/?Action=DescribeDBInstanceNetInfo
&DBInstanceId=gp-xxxxxxxxxx
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDBInstanceNetInfoResponse>
<instanceNetworkType>Classic</instanceNetworkType>
<DBInstanceNetInfos>
    <DBInstanceNetInfo>
        <DBInstanceNetType>1</DBInstanceNetType>
        <connectionString>gp-xxxxxxx.gpdb.rds.aliyuncs.com</connectionString>
        <ipAddress>127.0.0.1</ipAddress>
        <port>3432</port>
        <VPCId>vpc-xxxxxxxxx</VPCId>
        <VSwitchId>vsw-xxxxxxx</VSwitchId>
    </DBInstanceNetInfo>
</DBInstanceNetInfos>
<RequestId>7565770E-7C45-462D-BA4A-8A5396F2CAD1</RequestId>
</DescribeDBInstanceNetInfoResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "instanceNetworkType" : "Classic",
  "DBInstanceNetInfos" : {
    "DBInstanceNetInfo" : [ {
      "DBInstanceNetType" : "1",
      "connectionString" : "gp-xxxxxxx.gpdb.rds.aliyuncs.com",
      "ipAddress" : "127.0.0.1",
      "port" : "3432",
      "VPCId" : "vpc-xxxxxxxxx",
      "VSwitchId" : "vsw-xxxxxxx"
    } ]
  },
  "RequestId" : "7565770E-7C45-462D-BA4A-8A5396F2CAD1"
}

Error codes

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