Creates a data archiving ticket to archive data to dedicated storage, ApsaraDB RDS for MySQL, or other supported destinations.
Operation description
This operation is available only for database instances managed in Security Collaboration mode.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:CreateDataArchiveOrder |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Comment |
string |
Yes |
The description of the task. |
Business test |
| Tid |
integer |
No |
The tenant ID. Call GetUserActiveTenant or ListUserTenants to obtain this value. |
3*** |
| PluginType |
string |
No |
The plugin type. Default value: DATA_ARCHIVE. |
DATA_ARCHIVE |
| RelatedUserList |
array |
No |
The related users. |
|
|
string |
No |
The ID of a related operator. |
123*** |
|
| ParentId |
integer |
No |
The ID of the parent ticket. A parent ticket is generated only when a child ticket is created. |
896**** |
| Param |
object |
Yes |
The data archiving parameters. |
|
| ArchiveMethod |
string |
Yes |
The archiving destination. Valid values: Note
For values other than inner_oss, register the destination database with DMS first. Registered databases appear in the Instances Connected section of the DMS console.
|
adb_mysql |
| RunMethod |
string |
Yes |
The execution method. Valid values:
|
now |
| Variables |
array<object> |
No |
The archiving variables used as filter conditions. Each variable has a name and a pattern. |
|
|
object |
No |
An archiving variable configuration. |
{name: "time", pattern: "yyyy-MM-dd|+2d"} |
|
| Name |
string |
No |
The variable name. Must match the variable name specified in TableWhere when used as a filter condition. |
t |
| Pattern |
string |
No |
The time variable format that defines the variable value. See Configure variables for details. Examples:
Note
In these formats, yyyy-MM-dd| is a fixed prefix. A hyphen (-) indicates a time before task execution, and a plus sign (+) indicates a time after. |
yyyy-MM-dd|-3d |
| Logic |
boolean |
No |
Whether the database is a logical database. |
false |
| TableIncludes |
array<object> |
Yes |
The tables to archive. |
|
|
object |
Yes |
|||
| TableName |
string |
Yes |
The table name. |
table1 |
| TableWhere |
string |
No |
The WHERE clause filter condition. When using a time variable, specify the format: field name <='${variable name}'. The variable name must match the one in the Variables parameter. |
gmt_modified<'${t}' |
| TableMapping |
array |
No |
The table name mappings to the destination database. Optional; uses default mappings if not specified. |
|
|
string |
No |
The table name mapped to the destination database. |
table1 |
|
| OrderAfter |
array |
No |
The post-archiving actions. |
|
|
string |
No |
The post-archiving action. Valid values:
|
delete |
|
| SourceCatalogName |
string |
Yes |
The source database catalog. Valid values:
|
def |
| SourceSchemaName |
string |
Yes |
The source database schema name. For MySQL, this is the database name. For PostgreSQL, this is the schema name. The source and destination schema names must be the same. |
schema_test |
| SourceInstanceName |
string |
Yes |
The source instance name. For self-managed or third-party cloud databases, call GetInstance to query the instance ID. |
rm-bp187l****380w |
| TargetInstanceHost |
string |
Yes |
The destination instance host. Use the internal endpoint if available.
|
amv-bp1****00444.ads.aliyuncs.com |
| CronStr |
string |
No |
A crontab expression for scheduling the archiving task. See Crontab expressions. Required when RunMethod is set to schedule. |
00 05 11 * * ? |
| DatabaseId |
string |
No |
The database ID. For self-managed or third-party cloud databases, call GetDatabase to query the ID. Not required for Alibaba Cloud databases. |
1*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The schema of the response. |
||
| RequestId |
string |
The request ID for log queries and troubleshooting. |
283C461F-11D8-48AA-B695-DF092DA32AF3 |
| Success |
boolean |
Whether the request was successful. Valid values:
|
true |
| ErrorMessage |
string |
The error message returned if the request failed. |
UnknownError |
| ErrorCode |
string |
The error code returned if the request failed. |
UnknownError |
| CreateOrderResult |
array |
The ID of the data archiving ticket. |
|
|
integer |
The data archiving ticket ID. |
12***** |
Examples
Success response
JSON format
{
"RequestId": "283C461F-11D8-48AA-B695-DF092DA32AF3",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"CreateOrderResult": [
0
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.