Purchases a data synchronization instance.

Before you call this operation, make sure that you fully understand the billing methods and pricing of Data Transmission Service (DTS).

After you purchase a data synchronization instance, you must call the ConfigureSynchronizationJob operation to configure a data synchronization task. Then, the task is automatically started.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes CreateSynchronizationJob

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

DestRegion String Yes cn-hangzhou

The ID of the region where the destination database resides. For more information, see List of supported regions.

Note If the SourceRegion parameter is set to the China (Hong Kong) region or a region outside the Chinese mainland, you must set the DestRegion parameter to the same region ID.
PayType String Yes PostPaid

The billing method of the data synchronization instance.

  • PrePaid: subscription
  • PostPaid (default value): pay-as-you-go
SourceRegion String Yes cn-hangzhou

The ID of the region where the source database resides. For more information, see List of supported regions.

SynchronizationJobClass String Yes small

The specification of the data synchronization instance. Valid values: micro, small, medium, and large.

Note For more information about the test performance of each specification, see Specifications of data synchronization instances.
RegionId String No cn-hangzhou

The ID of the region where the data synchronization instance resides. The region ID is the same as the value of the DestRegion parameter.

Topology String No oneway

The synchronization topology. Valid values:

  • oneway: one-way synchronization
  • bidirectional: two-way synchronization
Note
  • The default value is oneway.
  • This parameter can be set to bidirectional only when the SourceEndpoint.InstanceType and DestinationEndpoint.InstanceType parameters are set to MySQL, PolarDB, or Redis.
Period String No Year

The billing cycle of the subscription instance. Valid values:

  • Year
  • Month
Note You must specify this parameter only if you set the PayType parameter to PrePaid.
UsedTime Integer No 1

The subscription length.

  • If the billing cycle is Year, the value range is 1 to 5.
  • If the billing cycle is Month, the value range is 1 to 60.
Note You must specify this parameter only if you set the PayType parameter to PrePaid.
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 value, but you must make sure that it is unique among different requests. The ClientToken parameter can contain only ASCII characters and cannot exceed 64 characters in length.

SourceEndpoint.InstanceType String No MySQL

The instance type of the source database. Valid values:

  • MySQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
  • PolarDB: PolarDB for MySQL cluster or PolarDB O Edition cluster
  • Redis: Redis database
  • DRDS: PolarDB-X instance V1.0
Note
DestinationEndpoint.InstanceType String No MySQL

The instance type of the destination database. Valid values:

  • MySQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
  • PolarDB: PolarDB for MySQL cluster or PolarDB O Edition cluster
  • Redis: Redis database
  • MaxCompute: MaxCompute project
Note
networkType String No Intranet

The network type. Valid value: Intranet, which indicates virtual private cloud (VPC).

AccountId String No 12323344****

The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.

DBInstanceCount Integer No 3

If you set the SourceEndpoint.InstanceType parameter to DRDS, you must specify the DBInstanceCount parameter. This parameter specifies the number of private RDS instances attached to the source PolarDB-X instance. Default value: 1.

Response parameters

Parameter Type Example Description
ErrCode String InternalError

The error code returned if the call failed.

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

The error message returned if the call failed.

RequestId String 9056C8B0-5799-493A-9655-70F607B8****

The ID of the request.

Success String true

Indicates whether the call was successful.

SynchronizationJobId String dtshvj11k25255****

The ID of the data synchronization instance.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=CreateSynchronizationJob
&SourceRegion=cn-hangzhou
&DestRegion=cn-hangzhou
&SynchronizationJobClass=small
&PayType=PostPaid 
&<Common request parameters>

Sample success responses

XML format

<CreateSynchronizationJobResponse>
      <SynchronizationJobId>dtshvj11k25255****</SynchronizationJobId>
      <RequestId>9056C8B0-5799-493A-9655-70F607B8****</RequestId>
      <Success>true</Success>
</CreateSynchronizationJobResponse>

JSON format

{
    "SynchronizationJobId": "dtshvj11k25255****",
    "RequestId": "9056C8B0-5799-493A-9655-70F607B8****",
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.