Checks whether a task to convert a table shard or shard a table is valid.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ValidateShardTask |
The operation that you want to perform. Set the value to ValidateShardTask. |
| DrdsInstanceId | String | Yes | drds23ds**** |
The ID of the PolarDB-X 1.0 instance. |
| DbName | String | Yes | test |
The name of the database. |
| SourceTableName | String | Yes | buyer |
The name of the table or table shard on which you want to perform the task. |
| TargetTableName | String | Yes | buyer_new |
The name of the table or table shard on which you perform the task. |
| TaskType | String | Yes | SINGLE_TO_SHARD |
The type of the task. Valid values:
|
| RegionId | String | No | cn-hangzhou |
The ID of the region where the PolarDB-X 1.0 instance is created. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| List | Array of List |
Indicates the check results. |
|
| Item | String | same_schema |
Indicates the name of a check item. |
| Result | Integer | 0 |
Indicates the result of the check item. Valid values:
|
| RequestId | String | 0B6B7BDC-575D-4A77-A4F8-24B7EFAS45FG |
Indicates the ID of the request. |
| Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ValidateShardTask
&DrdsInstanceId=drds23ds****
&DbName=test
&SourceTableName=buyer
&TargetTableName=buyer_new
&TaskType=SINGLE_TO_SHARD
&<Common request parameters>
Sample success responses
XML format
<RequestId>0B6B7BDC-575D-4A77-A4F8-24B7EFAS45FG</RequestId>
<List>
<Item>same_schema</Item>
<Result>0</Result>
</List>
<Success>true</Success>
JSON format
{"RequestId":"0B6B7BDC-575D-4A77-A4F8-24B7EFAS45FG","List":[{"Item":"same_schema","Result":"0"}],"Success":"true"}
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred. |
For a list of error codes, visit the API Error Center.