All Products
Search
Document Center

Tair:DescribeDBInstanceNetInfo

Last Updated:Jun 18, 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 network information about the instance.

DirectConnectioninteger

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

  • 0: The address is not a private endpoint.
  • 1: The address is a private endpoint.
0
VSwitchIdstring

The ID of the vSwitch.

vsw-bp1e7clcw529l773d****
DBInstanceNetTypestring

The network type of the instance. Valid values:

  • 0: Internet
  • 1: classic network
  • 2: Virtual Private Cloud (VPC)
1
Upgradeablestring

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

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

The expiration time of the classic network endpoint. 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 instance ID.

r-bp1ky7j6qc7umk****
Portstring

The service port of the instance.

6379
VPCIdstring

The ID of the VPC to which the instance belongs.

vpc-bp1nme44gek34slfc****
IPAddressstring

The IP address.

172.16.49.***
IsSlaveProxyinteger

Indicates whether the address is the endpoint for the secondary zone. Valid values: 1 and 0. A value of 1 indicates that the address is the endpoint for the secondary zone.

Note This parameter is returned only after you enable the multi-zone read/write splitting architecture for the instance.
1

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.***",
        "IsSlaveProxy": 1
      }
    ]
  }
}

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