tencent cloud

Feedback

DescribeSyncJobs

Last updated: 2023-10-17 11:03:09

    1. API Description

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

    This API is used to query the information of 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: DescribeSyncJobs.
    Version Yes String Common Params. The value used for this API: 2021-12-06.
    Region No String Common Params. This parameter is not required for this API.
    JobId No String Sync task ID, such as sync-werwfs23.
    JobName No String Sync task name
    Order No String Sort by field, such as CreateTime.
    OrderSeq No String Sorting order. Valid values: ASC, DESC. Default value: DESC by CreateTime.
    Offset No Integer Offset. Default value: 0.
    Limit No Integer Number of sync task instances to be returned. Value range: [1,100]. Default value: 20.
    Status.N No Array of String The set of status values, such as Initialized,CheckPass,Running,ResumableErr,Stopped.
    RunMode No String Running mode. Valid values: Immediate, Timed.
    JobType No String Task type, such as mysql2mysql (sync from MySQL to MySQL).
    PayMode No String Billing mode. Valid values: PrePay (prepaid); PostPay (postpaid).
    TagFilters.N No Array of TagFilter tag

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of tasks
    Note: This field may return null, indicating that no valid values can be obtained.
    JobList Array of SyncJobInfo Array of task details
    Note: This field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of sync tasks

    This example shows you how to query the list of sync tasks.

    Input Example

    POST / HTTP/1.1
    Host: dts.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeSyncJobs
    <Common request parameters>
    
    {
        "JobId": "sync-bkm3mppi"
    }
    

    Output Example

    {
        "Response": {
            "JobList": [
                {
                    "Actions": [
                        "configure",
                        "release",
                        "view"
                    ],
                    "AllActions": [
                        "view",
                        "configure",
                        "check",
                        "start",
                        "stop",
                        "release",
                        "resume"
                    ],
                    "CreateTime": "2022-01-05 10:40:57",
                    "Detail": {
                        "CurrentStepProgress": -1,
                        "MasterSlaveDistance": -1,
                        "Message": "",
                        "Progress": 0,
                        "SecondsBehindMaster": -1,
                        "StepAll": 0,
                        "StepInfos": null,
                        "StepNow": 0
                    },
                    "DstAccessType": "",
                    "DstDatabaseType": "mysql",
                    "DstInfo": {
                        "Account": "",
                        "AccountMode": "",
                        "AccountRole": "",
                        "CcnId": "",
                        "CvmInstanceId": "",
                        "DbKernel": "",
                        "DbName": "",
                        "EngineVersion": "",
                        "Ip": "",
                        "Password": "",
                        "Port": 0,
                        "RoleExternalId": "",
                        "SubnetId": "",
                        "Supplier": "",
                        "TmpSecretId": "",
                        "TmpSecretKey": "",
                        "TmpToken": "",
                        "UniqDcgId": "",
                        "UniqVpnGwId": "",
                        "User": "",
                        "VpcId": ""
                    },
                    "DstRegion": "ap-guangzhou",
                    "EndTime": "0000-00-00 00:00:00",
                    "ExpectRunTime": "0000-00-00 00:00:00",
                    "ExpireTime": "0000-00-00 00:00:00",
                    "JobId": "sync-bkm3mppi",
                    "JobName": "跨账å<8f>·tdsql-mysql",
                    "PayMode": "PostPay",
                    "RunMode": "",
                    "SrcAccessType": "",
                    "SrcDatabaseType": "tdsqlmysql",
                    "SrcInfo": {
                        "Account": "",
                        "AccountMode": "",
                        "AccountRole": "",
                        "CcnId": "",
                        "CvmInstanceId": "",
                        "DbKernel": "",
                        "DbName": "",
                        "EngineVersion": "",
                        "Ip": "",
                        "Password": "",
                        "Port": 0,
                        "RoleExternalId": "",
                        "SubnetId": "",
                        "Supplier": "",
                        "TmpSecretId": "",
                        "TmpSecretKey": "",
                        "TmpToken": "",
                        "UniqDcgId": "",
                        "UniqVpnGwId": "",
                        "User": "",
                        "VpcId": ""
                    },
                    "SrcRegion": "ap-guangzhou",
                    "StartTime": "0000-00-00 00:00:00",
                    "Status": "UnInitialized",
                    "Tags": []
                }
            ],
            "RequestId": "23c18100-6df2-11ec-9c54-0dbb24194274",
            "TotalCount": 1
        }
    }
    

    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.NotAllowOperation This operation is prohibited.
    InternalError.DatabaseError Failed to access the database on the DTS platform.
    InternalError.InternalErrorError An internal error occurred.
    InternalError.ProtocolError A communication protocol error occurred.
    InvalidParameter The parameter is incorrect.
    InvalidParameterValue.InvalidParameterValueError The parameter is invalid.