Creates a data archiving ticket to archive data to destinations such as dedicated storage space or ApsaraDB RDS for MySQL instances.
Operation description
You can call this API operation only for database instances that are managed in Security Collaboration mode.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Comment | string | Yes | The description of the task. | test |
Tid | long | No | The tenant ID. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID. | 3*** |
PluginType | string | No | The type of the plug-in. Default value: DATA_ARCHIVE. | DATA_ARCHIVE |
RelatedUserList | array | No | The list of the related users. | |
string | No | The ID of an operator that is related to the ticket. | 123*** | |
ParentId | long | No | The ID of the parent ticket. A parent ticket is generated only when a child ticket is created. | 123**** |
Param | object | Yes | The parameters for archiving data. | |
ArchiveMethod | string | Yes | The archiving destination to which you want to archive data. Valid values: Note
If you set ArchiveMethod to a value other than inner_oss, you must register the corresponding destination database with Data Management (DMS) before you create the data archiving ticket. After the database is registered with DMS, the database is displayed in the Instances Connected section of the DMS console.
| mysql |
RunMethod | string | Yes | The method that is used to run the data archiving task. Valid values:
| now |
Variables | array | No | The configuration of archiving variables. You can use a time variable as a filter condition for archiving data. Each variable has two attributes: name and pattern. | |
string | No | The configuration of archiving variables. | {name: "time", pattern: "yyyy-MM-dd|+2d"} | |
Logic | boolean | No | Specifies whether the database is a logical database. | false |
TableIncludes | array<object> | Yes | The collection of tables to be archived. | |
object | Yes | |||
TableName | string | Yes | The table name. | table1 |
TableWhere | string | No | The filter condition that is specified by the WHERE clause of the archiving configuration. If a time variable is used in the filter condition, the filter condition is specified in the following format: field name <='${variable name}'. The variable name in the filter condition must be the same as the time variable name that is specified in the Variables parameter. | gmt_modified<'${time}' |
TableMapping | array | No | The table names mapped to the destination database. This parameter is not required and the default value is used. | |
string | No | The table name mapped to the destination database. | table1 | |
OrderAfter | array | No | The post behaviors. | |
string | No | The post behavior. Valid values:
| "delete" | |
SourceCatalogName | string | Yes | The catalog of the source database. Valid values:
| def |
SourceSchemaName | string | Yes | The schema name of the source database. The schema name of the source database is the same as that of the destination database. If the source database is a MySQL database, this parameter specifies the name of the source database. If the source database is a PostgreSQL database, this parameter specifies the schema name of the source database. | schema_test |
SourceInstanceName | string | Yes | The name of the source instance. If the database instance is a self-managed database or a third-party cloud database, you can call the GetInstance operation to query the instance ID. | pc-bp1******* |
TargetInstanceHost | string | Yes | The host of the destination instance. If the destination instance can be accessed over an internal network or the Internet, preferentially set the value to the internal endpoint of the destination instance.
| am-bp1*********.ads.aliyuncs.com |
CronStr | string | No | A crontab expression that specifies the scheduling cycle of the data archiving task. For more information, see the Crontab expressions section of the "Create shadow tables for synchronization" topic. You must specify this parameter if you set RunMethod to schedule. | 00 05 11 * * ? |
DatabaseId | string | No | The database ID. If the database is a self-managed database or a third-party cloud database, you can call the GetDatabase operation to query the database ID. If the database is an Alibaba Cloud database, ignore this parameter. | 1*** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "283C461F-11D8-48AA-B695-DF092DA32AF3",
"Success": true,
"ErrorMessage": "UnknownError",
"ErrorCode": "UnknownError",
"CreateOrderResult": [
0
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |