tencent cloud

文档反馈

CreateSyncJob

最后更新时间:2024-12-04 15:34:09

    1. API Description

    Domain name for API request: dts.intl.tencentcloudapi.com.

    This API is used to create a sync task.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: CreateSyncJob.
    Version Yes String Common Params. The value used for this API: 2021-12-06.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    PayMode Yes String Billing mode. Valid values: PrePay (monthly subscription); PostPay (pay-as-you-go). Currently, DTS at Tencent Cloud International is free of charge.
    SrcDatabaseType Yes String Source database type, such as mysql, cynosdbmysql, tdapg, tdpg, and tdsqlmysql.
    SrcRegion Yes String Source database region, such as ap-guangzhou.
    DstDatabaseType Yes String Target database type, such as mysql, cynosdbmysql, tdapg, tdpg, tdsqlmysql, and kafka.
    DstRegion Yes String Target database region, such as ap-guangzhou.
    Specification No String Sync task specification, such as Standard.
    Tags.N No Array of TagItem Tag information
    Count No Integer The number of sync tasks purchased at a time. Value range: [1, 10]. Default value: 1.
    AutoRenew No Integer Auto-renewal flag, which takes effect if PayMode is PrePay. Valid values: 1 (auto-renewal enabled); 0 (auto-renewal disabled). Default value: 0.
    InstanceClass No String Sync link specification, such as micro, small, medium, and large. Default value: medium.
    JobName No String Sync task name
    ExistedJobId No String ID of the existing task used to create a similar task

    3. Output Parameters

    Parameter Name Type Description
    JobIds Array of String Sync task IDs
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Creating a sync task

    This example shows you how to create a sync task.

    Input Example

    POST / HTTP/1.1
    Host: dts.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateSyncJob
    <Common request parameters>
    
    {
        "Count": 1,
        "Specification": "Standard",
        "PayMode": "PrePay",
        "DstDatabaseType": "mysql",
        "DstRegion": "ap-guangzhou",
        "SrcDatabaseType": "mysql",
        "SrcRegion": "ap-guangzhou",
        "ExistedJobId": "sync-xascasas"
    }
    

    Output Example

    {
        "Response": {
            "JobIds": [
                "sync-eivc87yk"
            ],
            "RequestId": "03a378be-372a-478b-beb7-19e4dd5027e2"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    AuthFailure.AuthFailureError Authentication failed.
    AuthFailure.UnauthorizedOperationError The current user is not allowed to perform this operation as the authentication failed.
    FailedOperation.FailedOperationError The operation failed.
    InternalError.InternalErrorError An internal error occurred.
    InternalError.InternalInnerCommonError An error occurred while accessing the internal component.
    InternalError.InternalTradeError Failed to call the billing service.
    InternalError.NotEnoughMoneyError The account balance is insufficient.
    InternalError.UnknownError An unknown internal error occurred.
    InvalidParameterValue.InvalidParameterValueError The parameter is invalid.
    OperationDenied.BizOperationDeniedError The operation was denied as the condition was not met.
    OperationDenied.NotEnoughMoneyError The account balance is insufficient.
    OperationDenied.OperationDeniedError The operation was denied.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持