Domain name for API request: dcdb.tencentcloudapi.com.
This API is used to query the information of shards of a TencentDB instance.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeDCDBShards. |
Version | Yes | String | Common Params. The value used for this API: 2018-04-11. |
Region | No | String | Common Params. This parameter is not required for this API. |
InstanceId | Yes | String | Instance ID in the format of dcdbt-ow728lmc. |
ShardInstanceIds.N | No | Array of String | Shard ID list. |
Offset | No | Integer | Offset. Default value: 0 |
Limit | No | Integer | Number of returned results. Default value: 20. Maximum value: 100. |
OrderBy | No | String | Sort by field. Only createtime is supported currently. |
OrderByType | No | String | Sorting order. Valid values: desc, asc |
Parameter Name | Type | Description |
---|---|---|
TotalCount | Integer | Number of eligible shards |
Shards | Array of DCDBShardInfo | Shard information list |
DcnFlag | Integer | Disaster recovery flag. Valid values: 0 (none), 1 (source instance), 2 (disaster recovery instance) Note: This field may return null, indicating that no valid values can be obtained. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: dcdb.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDCDBShards
<Common request parameters>
{
"InstanceId": "dcdbt-21dfpcv1"
}
{
"Response": {
"DcnFlag": 0,
"RequestId": "f976f43c-6dd3-4dbf-869b-a1b0eac50506",
"Shards": [
{
"Cpu": 2,
"CreateTime": "2021-12-01 11:49:54",
"InstanceId": "dcdbt-21dfpcv1",
"Memory": 4,
"MemoryUsage": 0.94,
"NodeCount": 2,
"Paymode": "prepaid",
"PeriodEndTime": "2023-01-01 11:12:24",
"Pid": 1002231,
"ProjectId": 0,
"ProxyVersion": "\"1.17.6-M-V2.0R723D002\"",
"Range": "0-31",
"Region": "ap-guangzhou",
"ShardId": 434,
"ShardInstanceId": "shard-ngbrea6b",
"ShardMasterZone": "ap-guangzhou-1",
"ShardSerialId": "set_1643096858_1",
"ShardSlaveZones": [
"ap-guangzhou-1"
],
"Status": 2,
"StatusDesc": "Running",
"Storage": 10,
"StorageUsage": 0.01,
"SubnetId": "subnet-ovkcc9x6",
"VpcId": "vpc-j97vcvb5",
"Zone": "ap-guangzhou-2"
},
{
"Cpu": 1,
"CreateTime": "2021-12-01 11:49:54",
"InstanceId": "dcdbt-21dfpcv1",
"Memory": 2,
"MemoryUsage": 0.99,
"NodeCount": 2,
"Paymode": "prepaid",
"PeriodEndTime": "2023-01-01 11:12:24",
"Pid": 1002231,
"ProjectId": 0,
"ProxyVersion": "\"1.17.6-M-V2.0R723D002\"",
"Range": "32-63",
"Region": "ap-guangzhou",
"ShardId": 435,
"ShardInstanceId": "shard-5zf65smf",
"ShardMasterZone": "ap-guangzhou-1",
"ShardSerialId": "set_1643096949_3",
"ShardSlaveZones": [
"ap-guangzhou-1"
],
"Status": 2,
"StatusDesc": "Running",
"Storage": 10,
"StorageUsage": 0.011,
"SubnetId": "subnet-ovkcc9x6",
"VpcId": "vpc-j97vcvb5",
"Zone": "ap-guangzhou-2"
}
],
"TotalCount": 2
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalError.CamAuthFailed | CAM authentication request failed. |
InternalError.DbOperationFailed | Failed to query the database. |
InternalError.FenceError | Failed to query the information of a dedicated cluster. |
InternalError.GetInstanceDetailFailed | Failed to get the instance details. |
InternalError.GetInstanceInfoFailed | Failed to get the instance information. |
InternalError.GetVpcFailed | Failed to query the VPC information. |
InternalError.InnerSystemError | Internal system error. |
InvalidParameter.GenericParameterError | An error occurred while verifying parameter validity. |
InvalidParameter.InstanceNotFound | Failed to find the requested instance. |
InvalidParameterValue.IllegalExclusterID | The dedicated cluster to which the database instance belongs was not found. |
InvalidParameterValue.SpecIdIllegal | The specification information of the database instance was not found. |
UnauthorizedOperation.PermissionDenied | You have no permission to manipulate this API or resource. |
本页内容是否解决了您的问题?