You can call this operation to query the information of the PolarDB cluster in the DRDS logical database.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Required | DescribeDrdsDBCluster | The operation that you want to perform. The value is DescribeDrdsDBCluster. |
DbInstanceId | String | Required | pc-***************** | The ID of the PolarDB cluster. |
DbName | String | Required | drds_test | The name of the DRDS database. |
DrdsInstanceId | String | Required | drds********* | The ID of a DRDS instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DbInstance | Struct | The details of each PolarDB cluster. | |
DBInstanceId | String | pc-***************** |
The ID of the PolarDB cluster. |
DBInstanceStatus | String | 1 | The status of the PolarDB instance. |
DBNodes | Array | The information about the nodes in the PolarDB Cluster. | |
DBNode | |||
DBNodeId | String | pi-*************** | The ID of the node in the apsaradb for PolarDB cluster. |
DBNodeRole | String | Reader | The role of a node in the apsaradb for PolarDB cluster. Valid values:
|
DBNodeStatus | String | Running | The status of the nodes in the PolarDB cluster. |
ZoneId | String | cn-hangzhou-i | The ID of the zone where the node of the PolarDB cluster resides. |
DbInstType | String | POLARDB | The type of storage used by the DRDS database. |
Endpoints | Array | The endpoint of the PolarDB read /write splitting endpoint | |
Endpoint | |||
EndpointId | String | pe-***************** | The ID of the PolarDB connection address. |
NodeIds | String | pi-*****************,pi-***************** | The ID list of the nodes in the PolarDB connection string. Separate multiple nodes with commas (,). |
ReadWeight | Integer | 85 | The read ratio of this connection address managed by the DRDS database. |
Engine | String | POLARDB | The type of the DRDS database storage engine. |
EngineVersion | String | 8.0 | The version of the DRDS database storage engine. |
ExpireTime | String | 2019-09-27, 11:22:33 | The time when the PolarDB cluster expires. |
NetworkType | String | VPC | The network type of the PolarDB cluster. |
PayType | String | Postpaid | The billing method of the PolarDB cluster. |
Port | Integer | 3306 | The PolarDB access port. |
RdsInstType | String | ignore | The type of RDS instance. PolarDB cluster does not support this parameter. |
ReadMode | String | CUSTOM | This parameter specifies the Read mode when the database storage type is PolarDB.
Valid values:
|
RemainDays | String | 0 | The number of days remaining on the PolarDB for MySQL instance. |
RequestId | String | 60A77FD6-0DE4-4A34-B6FB-9C2673****** | The ID of the request. |
Success | Boolean | true | The result of the request. |
Examples
Sample requests
http(s)://drds.aliyuncs.com/? Action=DescribeDrdsDBCluster
&DbInstanceId=pc-*****************
&DbName=test
&DrdsInstanceId=drds*********
&<Common request parameters>
Sample success responses
XML
format
<RequestId>60A77FD6-0DE4-4A34-B6FB-9C2673******</RequestId>
<DbInstance>
<DbInstType>POLARDB</DbInstType>
<EngineVersion>8.0</EngineVersion>
<DBInstanceStatus>1</DBInstanceStatus>
<Port>3306</Port>
<PayType>Postpaid</PayType>
<Endpoints>
<Endpoint>
<ReadWeight>85</ReadWeight>
<NodeIds>pi-*****************</NodeIds>
<EndpointId>pc-*****************</EndpointId>
</Endpoint>
<Endpoint>
<ReadWeight>15</ReadWeight>
<NodeIds>pi-*****************,pi-*****************</NodeIds>
<EndpointId>pe-*****************</EndpointId>
</Endpoint>
</Endpoints>
<DBInstanceId>pc-*****************</DBInstanceId>
<DBNodes>
<DBNode>
<DBNodeStatus>Running</DBNodeStatus>
<ZoneId>cn-hangzhou-i</ZoneId>
<DBNodeRole>Reader</DBNodeRole>
<DBNodeId>pi-*****************</DBNodeId>
</DBNode>
<DBNode>
<DBNodeStatus>Running</DBNodeStatus>
<ZoneId>cn-hangzhou-i</ZoneId>
<DBNodeRole>Writer</DBNodeRole>
<DBNodeId>pi-*****************</DBNodeId>
</DBNode>
<DBNode>
<DBNodeStatus>Running</DBNodeStatus>
<ZoneId>cn-hangzhou-i</ZoneId>
<DBNodeRole>Reader</DBNodeRole>
<DBNodeId>pi-*****************</DBNodeId>
</DBNode>
</DBNodes>
<NetworkType>VPC</NetworkType>
<ReadMode>CUSTOM</ReadMode>
<ExpireTime/>
<RemainDays>0</RemainDays>
<Engine>POLARDB</Engine>
</DbInstance>
<Success>true</Success>
JSON
format
{
"RequestId": "60A77FD6-0DE4-4A34-B6FB-9C2673******",
"DbInstance": {
"DbInstType": "POLARDB",
"EngineVersion": "8.0",
"DBInstanceStatus": 1,
"Port": 3306,
"PayType": "Postpaid",
"Endpoints": {
"Endpoint": [
{
"ReadWeight": 85,
"NodeIds": "pi-*****************",
"EndpointId": "pc-*****************"
},
{
"ReadWeight": 15,
"NodeIds": "pi-*****************,pi-*****************",
"EndpointId": "pe-*****************"
}
]
},
"DBInstanceId": "pc-*****************",
"DBNodes": {
"DBNode": [
{
"DBNodeStatus": "Running",
"ZoneId": "cn-hangzhou-i",
"DBNodeRole": "Reader",
"DBNodeId": "pi-*****************"
},
{
"DBNodeStatus": "Running",
"ZoneId": "cn-hangzhou-i",
"DBNodeRole": "Writer",
"DBNodeId": "pi-*****************"
},
{
"DBNodeStatus": "Running",
"ZoneId": "cn-hangzhou-i",
"DBNodeRole": "Reader",
"DBNodeId": "pi-*****************"
}
]
},
"NetworkType": "VPC",
"ReadMode": "CUSTOM",
"ExpireTime": "",
"RemainDays": 0,
"Engine": "POLARDB"
},
"Success": true
}
Error Codes
For a list of error codes, visit the API Error Center.