All Products
Search
Document Center

Tair:DescribeDBInstanceNetInfo

Last Updated:Feb 20, 2024

Queries the network information of an ApsaraDB for Redis 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
kvstore:DescribeDBInstanceNetInfoRead
  • DBInstance
    acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

r-bp1zxszhcgatnx****

Response parameters

ParameterTypeDescriptionExample
object
InstanceNetworkTypestring

The network type. Valid values:

  • CLASSIC: The instance runs in a classic network.
  • VPC: The instance runs in a virtual private cloud (VPC).
CLASSIC
RequestIdstring

The ID of the request.

FC77D4E1-2A7C-4F0B-A4CC-CE0B9C314B9B
NetInfoItemsobject []

The list of network information about the instance.

DirectConnectioninteger

Indicates whether the address is a private endpoint. Valid values:

  • 0: no.
  • 1: yes.
0
VSwitchIdstring

The ID of the vSwitch.

vsw-bp1e7clcw529l773d****
DBInstanceNetTypestring

The network type of the endpoint. Valid values:

  • 0: the Internet.
  • 1: classic network.
  • 2: VPC.
1
Upgradeablestring

The remaining validity period of the endpoint of the classic network. Unit: seconds.

Note A value of 0 indicates that the endpoint never expires.
0
ExpiredTimestring

The expiration time of the classic network address of an ApsaraDB for Redis instance. Unit: seconds.

5183779
ConnectionStringstring

The endpoint of the instance.

r-bp1zxszhcgatnx****.redis.rds.aliyuncs.com
IPTypestring

The network type of the IP address. Valid values:

  • Public: Internet.
  • Inner: classic network.
  • Private: VPC.
Inner
VPCInstanceIdstring

The ID of the instance.

r-bp1ky7j6qc7umk****
Portstring

The service port of the ApsaraDB for Redis instance.

6379
VPCIdstring

The ID of the VPC where the instance is deployed.

vpc-bp1nme44gek34slfc****
IPAddressstring

The IP address.

172.16.49.***

Examples

Sample success responses

JSONformat

{
  "InstanceNetworkType": "CLASSIC",
  "RequestId": "FC77D4E1-2A7C-4F0B-A4CC-CE0B9C314B9B",
  "NetInfoItems": {
    "InstanceNetInfo": [
      {
        "DirectConnection": 0,
        "VSwitchId": "vsw-bp1e7clcw529l773d****",
        "DBInstanceNetType": "1",
        "Upgradeable": "0",
        "ExpiredTime": "5183779",
        "ConnectionString": "r-bp1zxszhcgatnx****.redis.rds.aliyuncs.com",
        "IPType": "Inner",
        "VPCInstanceId": "r-bp1ky7j6qc7umk****",
        "Port": "6379",
        "VPCId": "vpc-bp1nme44gek34slfc****",
        "IPAddress": "172.16.49.***"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-12-27The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2022-07-27The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400