This topic describes the UpdateProjectConfig API provided by OceanBase Migration Service (OMS): how to use this API to update task configuration.
Purpose
This interface is used to update the parameter configurations of a data migration or synchronization task.
Call description
This API uses full replacement update:
Full coverage: When you call this API, you must pass in a complete set of configuration information.
Unspecified deletion: Configuration items not included in the new configuration set will be deleted.
Differential update: Only configuration items inconsistent with the current system records will be updated to the new ones.
Limitations
This interface applies only to OMS V4.2.4 and later.
Request path
POST /api/v2?Action=UpdateProjectConfig
Request parameters
Parameter |
Type |
Description |
|---|---|---|
| id | string | The ID of the data migration or synchronization task. |
| commonTransferConfig | object | The common transfer configuration. |
| ├─ sinkStoreFormat | string | The object storage type of the destination table, which can be DEFAULT, ROW, COLUMN, or COMPOUND. |
| ├─ sourceStoreFormat | string | The object storage type of the source table, which can be DEFAULT, ROW, COLUMN, or COMPOUND. |
| fullTransferConfig | object | The full migration/synchronization configuration. |
| ├─ fullTransferSpeedMode | string | The concurrent speed for full migration, which can be STEADY, NORMAL, or FAST. |
| ├─ throttleRps | integer | The maximum transfer rate allowed in records per second for the full migration/synchronization phase. The input value of this parameter cannot be greater than that of throttleIOPS. If you set this parameter to null, no RPS throttling is performed. |
| ├─ throttleIOPS | integer | The maximum transfer rate allowed in bytes per second for the full migration/synchronization phase. The input value of this parameter cannot be greater than that of throttleRps. If you set this parameter to null, no IOPS throttling is performed. |
| ├─ fullVerifySpeedMode | string | The concurrent speed for full verification, which can be STEADY, NORMAL, or FAST. |
| incrTransferConfig | object | The incremental synchronization configuration. |
| ├─ startTimestamp | string | The starting timestamp of incremental synchronization. This parameter is supported only when incremental synchronization is enabled but full migration is not. |
| ├─ storeLogKeptHour | integer | The log retention period in hours when incremental logs are pulled by using the Store component. The default value is 7, and the maximum value is 365. |
| ├─ incrLogPullSpeedMode | string | The incremental log pulling speed, which can be STEADY (low), NORMAL (medium), FAST (high), or CUSTOM (custom). |
| ├─ incrLogPullSpeedConfig | object | The incremental log pulling resource configuration. This parameter only takes effect when incrLogPullSpeedMode is set to CUSTOM. |
| ├─├─ memory | integer | The memory limit for incremental log pulling. |
| ├─ incrLogSyncSpeedMode | string | The incremental data writing speed, which can be STEADY (low), NORMAL (medium), FAST (high), or CUSTOM (custom). |
| ├─ incrLogSyncSpeedConfig | object | The incremental data writing resource configuration. This parameter only takes effect when incrLogSyncSpeedMode is set to CUSTOM. |
| ├─├─ memory | integer | The memory limit for incremental log writing. |
| ├─├─ writerWorkerNum | integer | The number of concurrent incremental log writers. |
| ├─ throttleRps | integer | The maximum transfer rate allowed in records per second for incremental synchronization. The input value of this parameter cannot be greater than that of throttleIOPS. If you set this parameter to null, no RPS throttling is performed. |
| ├─ throttleIOPS | integer | The maximum transfer rate allowed in bytes per second for incremental synchronization. The input value of this parameter cannot be greater than that of throttleRps. If you set this parameter to null, no IOPS throttling is performed. |
| ├─ recordTypeWhiteList | array | The data types of incremental data to be synchronized when incremental synchronization is enabled. Valid values: HEARTBEAT, INSERT, UPDATE, DELETE, BEGIN, COMMIT, ROLLBACK, DDL, and ROW. |
| ├─ supportDDLTypes | array | The supported DDL types.
|
| ├─ incrOnlineDdlConfig | array | The value of this parameter indicates the Online DDL tool that is adapted. Valid values: GH_OST, PT_OSC, and ALIYUN_DMS, which respectively indicate the gh-ost, pt-osc, and Alibaba Cloud DMS tools.
|
| reverseIncrTransferConfig | object | The configuration of reverse incremental synchronization. |
| ├─ startTimestamp | string | The starting timestamp of reverse incremental synchronization. This parameter is supported only when incremental synchronization is enabled but full migration is not. |
| ├─ storeLogKeptHour | integer | The log retention period in hours when incremental logs are pulled by using the Store component. The default value is 7, and the maximum value is 365. |
| ├─ incrLogPullSpeedMode | string | The incremental log pulling speed, which can be STEADY (low), NORMAL (medium), FAST (high), or CUSTOM (custom). |
| ├─ incrLogPullSpeedConfig | object | The incremental log pulling resource configuration. This parameter only takes effect when incrLogPullSpeedMode is set to CUSTOM. |
| ├─├─ memory | integer | The memory limit for incremental log pulling. |
| ├─ incrLogSyncSpeedMode | string | The incremental data writing speed, which can be STEADY (low), NORMAL (medium), FAST (high), or CUSTOM (custom). |
| ├─ incrLogSyncSpeedConfig | object | The incremental data writing resource configuration. This parameter only takes effect when incrLogSyncSpeedMode is set to CUSTOM. |
| ├─├─ memory | integer | The memory limit for incremental log writing. |
| ├─├─ writerWorkerNum | integer | The number of concurrent incremental log writers. |
| ├─ throttleRps | integer | The maximum transfer rate allowed in records per second for reverse incremental synchronization. The input value of this parameter cannot be greater than that of throttleIOPS. If you set this parameter to null, no RPS throttling is performed. |
| ├─ throttleIOPS | integer | The maximum transfer rate allowed in bytes per second for reverse incremental synchronization. The input value of this parameter cannot be greater than that of throttleRps. If you set this parameter to null, no IOPS throttling is performed. |
| ├─ recordTypeWhiteList | array | The data types of incremental data to be synchronized when incremental synchronization is enabled. Valid values: HEARTBEAT, INSERT, UPDATE, DELETE, BEGIN, COMMIT, ROLLBACK, DDL, and ROW. |
| ├─ supportDDLTypes | array | The supported DDL types.
|
| ├─ incrOnlineDdlConfig | array | The value of this parameter indicates the Online DDL tool that is adapted. Valid values: GH_OST, PT_OSC, and ALIYUN_DMS, which respectively indicate the gh-ost, pt-osc, and Alibaba Cloud DMS tools.
|
Response parameters
Parameter |
Type |
Description |
|---|---|---|
| success | boolean | Indicates whether the call is successful. |
| errorDetail | object | Details of the error. |
| code | string | Error code. |
| message | string | Description. |
| advice | string | Suggestion. |
| requestId | string | Request ID. |
| pageNumber | integer[int32] | The page number, which takes effect only in a paged query. |
| pageSize | integer[int32] | The page size, which takes effect only in a paged query. |
| totalCount | integer[int64] | The total number of records, which takes effect only in a paged query. |
| cost | string | The time consumed in the request, in seconds. |
Examples
Sample request
{
"id":"np_4w3a****",
"commonTransferConfig":{
"sinkStoreFormat":"DEFAULT",
"sourceStoreFormat":"DEFAULT"
},
"fullTransferConfig":{
"fullTransferSpeedMode":"NORMAL",
"throttleRps": 1000,
"throttleIOPS": 1000,
"fullVerifySpeedMode":"NORMAL"
},
"incrTransferConfig":{
"startTimestamp":1689201369,
"storeLogKeptHour":168,
"incrLogPullSpeedMode":"NORMAL",
"incrLogPullSpeedConfig":{
"memory":4
},
"incrLogSyncSpeedMode":"CUSTOM",
"incrLogSyncSpeedConfig":{
"memory":4,
"writerWorkerNum":2
},
"throttleRps": 1000,
"throttleIOPS": 1000,
"recordTypeWhiteList":[
"DELETE",
"INSERT",
"UPDATE",
"DDL",
],
"supportDDLTypes":[
"CREATE_TABLE",
"ALTER_TABLE"
],
"incrOnlineDdlConfig":[
"ALIYUN_DMS"
]
}
}
Sample response
{
"Success":true,
"ErrorDetail":{
"Code":"CM-RES***11",
"Level":"WARN",
"Message":"A system error occurred.",
"Proposal":"Contact the administrator."
},
"Code":"INNER_ERROR",
"Message":"A system error occurred.",
"Advice":"Contact the administrator.",
"RequestId":"XCVSADG****DSGDS",
"PageNumber":1,
"PageSize":1,
"TotalCount":1,
"Cost":"27 ms"
}
