All Products
Search
Document Center

Data Transmission Service:ModifySubscription

Last Updated:Oct 19, 2023

Modifies the objects of a change tracking task and the types of data changes to be tracked.

When you configure a change tracking 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 ModifySubscription

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

RegionId String No cn-hangzhou

The region ID of the change tracking instance. For more information, see Supported regions.

DtsInstanceId String Yes dtsboss6pn1w******

The ID of the change tracking instance. You can call the DescribeDtsJobs operation to query the instance ID.

DbList String Yes {"dtstest":{"name":"dtstest","all":true}}

The objects of the change tracking 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 for which you want to track changes are specified. Otherwise, some objects may be lost. Specify this parameter with caution.
  • You can call the DescribeDtsJobDetail operation to query the original objects of the task.
DtsJobId String Yes boss6pn1w******

The ID of the change tracking task. You can call the DescribeDtsJobs operation to query the task ID.

SubscriptionDataTypeDDL Boolean Yes true

Specifies whether to track DDL statements. Valid values:

  • true
  • false
SubscriptionDataTypeDML Boolean Yes true

Specifies whether to track DML statements. Valid values:

  • true
  • false

Response parameters

Parameter

Type

Example

Description

HttpStatusCode String 200

The HTTP status code.

RequestId String 068FA72F-4800-4A54-90BB-94806068****

The request ID.

ErrCode String InternalError

The error code returned if the request failed.

Success String true

Indicates whether the request was successful.

ErrMessage String The request processing has failed due to some unknown error.

The error message returned if the request failed.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=ModifySubscription
&DbList={"dtstest":{"name":"dtstest","all":true}}
&DtsInstanceId=dtsboss6pn1w******
&DtsJobId=boss6pn1w******
&SubscriptionDataTypeDDL=true
&SubscriptionDataTypeDML=true

Sample success responses

XML format

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

<ModifySubscriptionResponse>
    <RequestId>068FA72F-4800-4A54-90BB-94806068****</RequestId>
    <HttpStatusCode>200</HttpStatusCode>
    <Success>true</Success>
</ModifySubscriptionResponse>

JSON format

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

{
  "RequestId" : "068FA72F-4800-4A54-90BB-94806068****",
  "HttpStatusCode" : 200,
  "Success" : true
}

Error codes

HTTP status code

Error code

Error message

Description

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.
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. The signature expired. Use a new signature.

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