All Products
Search
Document Center

Data Transmission Service:ModifyDtsJob

Last Updated:Jun 13, 2024

Modifies the configurations of a data synchronization task.

When you configure a data synchronization task in the Data Transmission Service (DTS) console, you can move the pointer over Next: Save Task Settings and Precheck in the Advanced Settings step and click Preview OpenAPI parameters to view the parameters that are used to configure the task by calling an API operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

ModifyDtsJob

The operation that you want to perform. Set the value to ModifyDtsJob.

RegionId

String

No

cn-hangzhou

The ID of the region in which the data synchronization instance resides. For more information, see Supported regions.

DtsInstanceId

String

Yes

dtsbi6e22ay243****

The ID of the data synchronization instance.

SynchronizationDirection

String

No

Forward

The synchronization direction. Valid values:

  • Forward: Data is synchronized from the source database to the destination database.

  • Reverse: Data is synchronized from the destination database to the source database.

Note
  • Default value: Forward.

  • This parameter is required only if the topology of the data synchronization instance is two-way synchronization.

ClientToken

String

No

0c593ea1-3bea-11e9-b96b-88e9fe63****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

DbList

Map

No

{"dtstest":{"name":"dtstest","all":true}}

The objects of the data synchronization task after modification. The value must be a JSON string. For more information, see Objects of DTS tasks.

Note
  • The new value of the DbList parameter overwrites the original value. Make sure that all the objects that you want to synchronize are specified. Otherwise, some objects may be lost. Specify this parameter with caution.

  • Before you call the ModifyDtsJob operation, we recommend that you call the DescribeDtsJobDetail operation to query the current objects of the data synchronization task. Then, you can specify the new objects based on your business requirements. For example, if the current objects are Table A and Table B and you need to add Table C, you must specify Table A, Table B, and Table C for this parameter.

  • The DbList parameter supports passing in up to 10 MB of data.

EtlOperatorColumnReference

String

No

{ "configKeyMap": [ { "moduleCode": "03", "etlOperatorColumnReference": "etlOperatorColumnReference", "etlOperatorSetting": "etlOperatorSetting" }, { "moduleCode": "07", "etlOperatorColumnReference": "etlOperatorColumnReference", "etlOperatorSetting": "etlOperatorSetting" } ], "amp.increment.replicator.compare.all.columns.enable": false, "srcNetType": "VPC", "etlOperatorColumnReference": { "MODIFY_TIME": [ { "datasynchron.test_timing_user_000": "user_create_date" }, { "datasynchron.test_timing_user_001": "user_create_date" }, { "datasynchron.test_timing_user_002": "user_create_date" }, { "datasynchron.test_timing_user_003": "user_create_date" } ] }, "destNetType": "VPC", "originalSrcDbInst": "sg-sit-db2-primary.mysql.polardb.rds.aliyuncs.com", "etlOperatorSetting": "adb_time_travel", "sjobUseJobTask": "1", "srcVpcNetMappingInst": "172.19.XXX.XXX:4261", "destVpcNetMappingInst": "172.19.XXX.XXX:4260", "useJobTask": "1" }

The operator that is related to the extract, transform, and load (ETL) feature and dedicated to T+1 business.

ModifyTypeEnum

String

No

UPDATE_RESERVED

The method that is used to modify the data synchronization task. If you do not specify this parameter, the objects of the data synchronization task are modified by default. If you set this parameter to UPDATE_RESERVED, the reserved parameters are modified.

Reserved

String

No

{\"srcHostPorts\":\"\",\"whitelist.dms.online.ddl.enable\":false,\"filterDDL\":false,\"sqlparser.dms.original.ddl\":true,\"srcOracleType\":\"sid\",\"maxRetryTime\":43200,\"destSSL\":\"0\",\"destOracleType\":\"sid\",\"srcSSL\":\"0\",\"dbListCaseChangeMode\":\"default\",\"SourceEngineVersion\":\"8.0.18\",\"srcNetType\":\"VPC\",\"destNetType\":\"VPC\",\"srcVpcNetMappingInst\":\"172.16.1**.**:10803\",\"destVpcNetMappingInst\":\"172.16.1**.**:11077\",\"useJobTask\":\"1\"}

The reserved parameters of the data synchronization task. The reserved parameters that you specify are added to the existing reserved parameters instead of overwriting the existing reserved parameters. The value of this parameter must be a MAP JSON string. You can specify this parameter to meet special requirements. For example, you can specify whether to automatically start the precheck of the data synchronization task. For more information, see MigrationReserved.

FileOssUrl

String

No

http://db-list-os-file.oss-cn-shanghai.aliyuncs.com/8e42_12185******43989_************

The Object Storage Service (OSS) path of the file that stores the information related to the data synchronization task.

FilterTableName

String

No

testtable

The name of the table to be filtered out.

StructureInitialization

Boolean

No

true

Specifies whether to perform schema migration or synchronization. Valid values:

  • true

  • false

DataInitialization

Boolean

No

true

Specifies whether to perform full data migration or synchronization. Valid values:

  • true

  • false

DataSynchronization

Boolean

No

true

Specifies whether to perform incremental data migration or synchronization. Valid values:

  • false

  • true

DtsJobId

String

No

fpx1149rw7p***

The synchronization task ID. You can call the DescribeDtsJobs operation to query the ID.

Response parameters

Parameter

Type

Example

Description

Status

String

200

The HTTP status code.

RequestId

String

1D6ECADF-C5E9-4C96-8811-77602B31****

The request ID.

DtsJobId

String

bi6e22a****

The DTS task ID.

ErrCode

String

InternalError

The error code returned if the request failed.

Success

Boolean

true

Indicates whether the request was successful.

ErrMessage

Boolean

true

The error message returned if the request failed.

Note

The data type of this parameter is String. Example: The request processing has failed due to some unknown error.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=ModifyDtsJob
&DtsInstanceId=dtsbi6e22ay243****
&DbList={"dtstest":{"name":"dtstest","all":true}}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyDtsJobResponse>
    <DtsJobId>bi6e22a****</DtsJobId>
    <RequestId>1D6ECADF-C5E9-4C96-8811-77602B31****</RequestId>
    <Success>true</Success>
</ModifyDtsJobResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DtsJobId" : "bi6e22a****",
  "RequestId" : "1D6ECADF-C5E9-4C96-8811-77602B31****",
  "Success" : true
}

Error codes

HTTP status code

Error code

Error message

Description

403

OperationDenied.JobStatusModifying

jobs state is modifying, please wait sync subtask ends

The objects to be synchronized were being modified. Wait until the modification is complete.

403

CheckStatus.InvalidInitStatus

Task has not been configured, please configure job first

The task was not configured. Configure the task before you modify the task.

403

DTS.Msg.OperationDenied.JobStatusModifying

jobs state is modifying, please wait sync subtask ends

The objects to be synchronized were being modified. Wait until the modification is complete.

403

DTS.Msg.CheckStatus.InvalidInitStatus

Task has not been configured, please configure job first

The task was not configured. Configure the task before you modify the task.

403

InvalidSecurityToken.Expired

Specified SecurityToken is expired.

The signature expired. Use a new signature.

400

Throttling.User

Request was denied due to user flow control.

The number of requests exceeded the limit, and the request was rejected. Try again later.

500

ServiceUnavailable

The request has failed due to a temporary failure of the server.

The response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.

For a list of error codes, see Service error codes.