Creates a ticket for clearing historical data.
Operation description
For more information about the historical data cleaning, see Clear historical data.
This operation can be used only for MySQL databases.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Comment | string | Yes | The purpose or objective of the data change. This reduces unnecessary communication. | test |
RelatedUserList | array | No | The stakeholders of this operation. All stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than Data Management (DMS) administrators and database administrators (DBAs) are not allowed to view the ticket details. | |
long | No | 243253 | ||
Param | object | Yes | The parameters of the ticket. | |
Classify | string | No | The reason for the data change. | test |
DbItemList | array<object> | Yes | The databases for which you want to clear historical data. | |
object | No | |||
DbId | long | Yes | The ID of the database. You can call the SearchDatabases operation to query the ID of the database. | 1234 |
Logic | boolean | Yes | Indicates whether the database is a logical database. Valid values:
| false |
CronFormat | string | Yes | The crontab expression that you can use to run the task at a specified time. For more information, see Crontab expression. | 0 0 2 * * ? |
CronClearItemList | array<object> | Yes | The tables for which you want to clear historical data. | |
object | No | |||
TableName | string | Yes | The name of the table. You can call the ListTables operation to query the name of the table. | t1 |
ColumnName | string | Yes | The name of the field. | gmt_create |
RemainDays | long | Yes | The retention period of the historical data. Unit: days. For example, if you set the parameter to 7, DMS deletes the data that is retained for more than seven days. | 7 |
TimeUnit | string | No | The type of time granularity. If the ColumnName parameter specifies a field of a time type, this parameter is required. Valid values:
| MILLISECONDS |
FilterSQL | string | No | The filter conditions. | where 1 = 1 |
specifyDuration | boolean | Yes | Specifies whether to specify an end time for the task. Valid values:
| true |
DurationHour | long | No | The amount of time taken to run the task. Unit: hours. Note
If the specifyDuration parameter is set to true, this parameter is required.
| 4 |
AttachmentKey | string | No | The key of the attachment for the ticket. The attachment provides more instructions for this operation. You can call the GetUserUploadFileJob operation to query the key of the attachment. | order_attachement.txt |
Tid | long | No | The ID of the tenant. Note
The ID of the tenant is displayed when you move the pointer over the profile picture in the upper-right corner of the DMS console. For more information, see the View information about the current tenant section of the Manage DMS tenants topic.
| 123454324 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"CreateOrderResult": [
1341532
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|