Creates a ticket for scheduled historical data cleanup.
Operation description
Only MySQL instances in Security Collaboration control mode are supported.
For more information about this feature, see Historical Data Cleanup.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:CreateDataCronClearOrder |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Comment |
string |
Yes |
The purpose of the data change. A clear description helps reduce unnecessary communication. |
test |
| RelatedUserList |
array |
No |
The stakeholders of this operation. Stakeholders can view the ticket details and assist in the approval process. Other users, except DMS administrators and DBAs, cannot view the ticket. |
|
|
integer |
No |
The user ID of a stakeholder. Stakeholders can view and collaborate on the ticket. Other users, except administrators and DBAs, cannot view it. |
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 |
Database information. |
||
| DbId |
integer |
Yes |
The database ID. You can call the SearchDatabases operation to query this ID. |
10**** |
| Logic |
boolean |
Yes |
Indicates whether the database is a logical database. Valid values:
|
false |
| CronFormat |
string |
Yes |
The crontab expression for scheduling the task. 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 |
Information about the data tables to be cleaned. |
||
| TableName |
string |
Yes |
The table name. You can call the ListTables operation to query table names. |
t1 |
| ColumnName |
string |
Yes |
The name of the column. |
gmt_create |
| RemainDays |
integer |
Yes |
The retention period of the historical data. Unit: days. For example, a value of 7 means DMS deletes data older than seven days. |
7 |
| TimeUnit |
string |
No |
The time granularity. Required when ColumnName specifies a time-type column. Valid values:
|
MILLISECONDS |
| FilterSQL |
string |
No |
The filter conditions. |
where 1 = 1 |
| specifyDuration |
boolean |
Yes |
Specifies whether to set an end time for the task. Valid values:
|
true |
| DurationHour |
integer |
No |
The maximum duration for running the task. Unit: hours. Note
If the specifyDuration parameter is set to true, this parameter is required. |
4 |
| AttachmentKey |
string |
No |
The attachment key for the ticket. The attachment provides additional instructions for this operation. You can call the GetUserUploadFileJob operation to query the key of the attachment. |
order_attachement.txt |
| Tid |
integer |
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 elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| ErrorMessage |
string |
The error message. |
UnknownError |
| ErrorCode |
string |
The error code. |
UnknownError |
| CreateOrderResult |
array |
The ID of the ticket. |
|
|
integer |
Ticket ID. |
1341532 |
Examples
Success response
JSON format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"CreateOrderResult": [
1341532
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.