Call CreateShardTask to create a sharding task.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateShardTask |
Required parameter. Value: CreateShardTask. |
| DbName | String | Yes | test |
The name of the DRDS database. |
| DrdsInstanceId | String | Yes | drds************ |
The ID of the DRDS instance. |
| SourceTableName | String | Yes | test_tb1 |
The name of the source table. |
| TargetTableName | String | Yes | test_tb2 |
The name of the destination table. |
| 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 resource group resides. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Data | Boolean | true |
Task creation result |
| RequestId | String | F8997D95-94AD-416A-AE70-E24D08****** |
The ID of the request. |
| Success | Boolean | true |
The result of the operation. |
Examples
Sample requests
http(s)://drds.aliyuncs.com/? Action=CreateShardTask
&DbName=test
&DrdsInstanceId=drds************
&SourceTableName=test_tb1
&TargetTableName=test_tb2
&TaskType=SINGLE_TO_SHARD
&<Common request parameters>
Sample success responses
XML format
<Data>true</Data>
<RequestId>F8997D95-94AD-416A-AE70-E24D08******</RequestId>
<Success>true</Success>
JSON format
{
"Data":true,
"RequestId":"F8997D95-94AD-416A-AE70-E24D08******",
"Success":true
}
Error codes
For a list of error codes, visit the API Error Center.