All Products
Search
Document Center

AnalyticDB for PostgreSQL:DescribeDBInstanceNetInfo

Last Updated:Mar 03, 2024

Queries the connection information of an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:DescribeDBInstanceNetInfoRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

Note You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-xxxxxxxxxx
ConnectionStringstringNo

The endpoint that is used to connect to the instance.

Note If you do not specify this parameter, the information about all endpoints of the instance is returned.
gp-0xin9q82c33xc****-master.gpdb.rds.aliyuncs.com

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

7565770E-7C45-462D-BA4A-8A5396F2CAD1
DBInstanceNetInfosobject []

The connection information of the instance.

VSwitchIdstring

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

vsw-xxxxxxxx
ConnectionStringstring

The endpoint that is used to connect to the instance.

gp-xxxxxxx.gpdb.rds.aliyuncs.com
IPTypestring

The type of the 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.
Inner
Portstring

The port number.

3432
VpcInstanceIdstring

The ID of the instance that is deployed in a VPC.

vpc-xxxxxxx
VPCIdstring

The VPC ID of the instance.

vpc-xxxxxxx
IPAddressstring

The IP address.

127.0.0.1
AddressTypestring

The type of the endpoint.

Intranet
InstanceNetworkTypestring

The network type of the instance. Valid values:

  • Classic: classic network.
  • VPC: VPC.
Classic

Examples

Sample success responses

JSONformat

{
  "RequestId": "7565770E-7C45-462D-BA4A-8A5396F2CAD1",
  "DBInstanceNetInfos": {
    "DBInstanceNetInfo": [
      {
        "VSwitchId": "vsw-xxxxxxxx",
        "ConnectionString": "gp-xxxxxxx.gpdb.rds.aliyuncs.com",
        "IPType": "Inner",
        "Port": "3432",
        "VpcInstanceId": "vpc-xxxxxxx",
        "VPCId": "vpc-xxxxxxx",
        "IPAddress": "127.0.0.1",
        "AddressType": "Intranet"
      }
    ]
  },
  "InstanceNetworkType": "Classic"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-31The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ConnectionString