All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstanceNetInfoForChannel

Last Updated:Jan 16, 2024

Queries all endpoints of an instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
  • MariaDB

Debugging

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

Debug

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
rds:DescribeDBInstanceNetInfoForChannelRead
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

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

0c593ea1-3bea-11e9-b96b-88**********
DBInstanceIdstringYes

The ID of the instance. You can call the DescribeDBInstances operation to query the instance ID.

rm-bp1k8s41l2o52****
FlagstringNo

An internal parameter. You do not need to specify this parameter.

None
DBInstanceNetRWSplitTypestringNo

The type of the endpoint to query. Valid values:

  • 0: a regular endpoint. This is the default value.
  • 1: a read/write splitting endpoint that is assigned after the shared proxy feature is enabled.
0

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

InstanceNetworkTypestring

The network type of the instance. Valid values:

  • VPC: a virtual private cloud (VPC)
  • Classic: classic network
VPC
RequestIdstring

The ID of the request.

61DF1F28-F409-50C0-B90A-CCE82D44****
DBInstanceNetInfosobject []

The information about the instance connection.

Upgradeablestring

An internal parameter. You do not need to specify this parameter.

Disabled
expiredTimestring

The expiration time of the endpoint of the classic network type. Unit: seconds.

5183779
IPTypestring

The network type of the IP address. Valid values:

  • Public: the Internet
  • Inner: the classic network
  • Private: a virtual private cloud (VPC)
Inner
Portstring

The port number of the instance.

6379
VPCIdstring

The VPC ID of the instance.

vpc-bp1nme44gek34slfc****
Availabilitystring

The availability of the instance. Valid values:

  • Unavailable
  • Available
Unavailable
VSwitchIdstring

The vSwitch ID of the instance.

vsw-bp1e7clcw529l773d****
ConnectionStringTypestring

The type of the endpoint. Valid values:

  • Normal: a regular endpoint
  • ReadWriteSplitting: a read/write splitting endpoint that is assigned after the shared proxy feature is enabled.
Normal
ConnectionStringstring

The endpoint of the instance.

rm-uf6w*****.mysql.rds.aliyuncs.com
MaxDelayTimestring

The latency threshold that is allowed for read/write splitting of the shared proxy feature. Unit: seconds.

Note This parameter is returned only when ConnectionStringType is set to ReadWriteSplitting.
12
IPAddressstring

The IP address of the instance.

172.16.XX.XX
DistributionTypestring

The policy that is used to assign read weights. This parameter is returned only for a read/write splitting endpoint that is assigned after the shared proxy feature is enabled. Valid values:

  • Standard: The system automatically allocates read weights to the instance and its read-only instances based on the specifications of the instances.
  • Custom: You must manually allocate read weights to the instance and its read-only instances.
Standard
SecurityIPGroupsobject []

The details of the IP address whitelist.

SecurityIPsstring

The IP addresses that is contained in the IP address whitelist.

127.0.XX.XX
SecurityIPGroupNamestring

The name of the IP address whitelist.

Default
DBInstanceWeightsobject []

The information about read weights to implement read/write splitting after the shared proxy feature is enabled.

Availabilitystring

The availability of the instance. Valid values:

  • Unavailable
  • Available
Unavailable
Weightstring

The weight of the instance.

100
DBInstanceIdstring

The instance ID.

rm-uf6wjk5*****
DBInstanceTypestring

The instance type. Valid values:

  • Master: primary instance
  • Readonly: read-only instance
Master

Examples

Sample success responses

JSONformat

{
  "InstanceNetworkType": "VPC",
  "RequestId": "61DF1F28-F409-50C0-B90A-CCE82D44****",
  "DBInstanceNetInfos": {
    "DBInstanceNetInfo": [
      {
        "Upgradeable": "Disabled",
        "expiredTime": "5183779",
        "IPType": "Inner",
        "Port": "6379",
        "VPCId": "vpc-bp1nme44gek34slfc****",
        "Availability": "Unavailable",
        "VSwitchId": "vsw-bp1e7clcw529l773d****",
        "ConnectionStringType": "Normal",
        "ConnectionString": "rm-uf6w*****.mysql.rds.aliyuncs.com",
        "MaxDelayTime": "12",
        "IPAddress": "172.16.XX.XX",
        "DistributionType": "Standard",
        "SecurityIPGroups": {
          "securityIPGroup": [
            {
              "SecurityIPs": "127.0.XX.XX",
              "SecurityIPGroupName": "Default"
            }
          ]
        },
        "DBInstanceWeights": {
          "DBInstanceWeight": [
            {
              "Availability": "Unavailable",
              "Weight": "100",
              "DBInstanceId": "rm-uf6wjk5*****",
              "DBInstanceType": "Master"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Forbidden.RAMUser not authorized to operate on the specified resource, or this API does not support RAM.-
403IncorrectDBInstanceCharacterTypeCurrent DB Instance character_type does not support this operation.This operation is not supported for the character type of the current instance.
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.
404Readins.NotFoundThe current instance does not contain any read only instance. The operation is not supported.The operation failed. The RDS instance is not attached with read-only RDS instances.
404InvalidRwSplitNetType.NotFoundThe RwSplitNetType is not found.The operation failed. Create an RDS instance for which read/write splitting is enabled and try again.

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

Change history

Change timeSummary of changesOperation
2022-10-28The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    Added Error Codes: 403
    Added Error Codes: 404
2022-06-20Add Operationsee changesets