tencent cloud

Feedback

DescribeSyncJobs

Last updated: 2024-07-24 10:26:16

    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 100 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, 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 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": [
                        "pause",
                        "stop",
                        "limitRate",
                        "view",
                        "resize",
                        "isolate",
                        "postPay2prePay",
                        "configureOptObj"
                    ],
                    "AllActions": [
                        "view",
                        "configure",
                        "check",
                        "start",
                        "stop",
                        "resume",
                        "pause",
                        "continue",
                        "limitRate",
                        "resize",
                        "isolate",
                        "offline",
                        "recover",
                        "postPay2prePay",
                        "configureOptObj",
                        "checkOptObj",
                        "startOptObj",
                        "createCmpTask"
                    ],
                    "AutoRenew": 0,
                    "AutoRetryTimeRangeMinutes": 0,
                    "CreateTime": "2023-12-18 20:55:27",
                    "Detail": {
                        "CauseOfCompareDisable": "The current task has opened DML filtering().",
                        "CurrentStepProgress": 0,
                        "ErrInfo": {
                            "Message": "",
                            "Reason": "",
                            "Solution": ""
                        },
                        "MasterSlaveDistance": 0,
                        "Message": "",
                        "Progress": -1,
                        "SecondsBehindMaster": 0,
                        "StepAll": 4,
                        "StepInfos": [
                            {
                                "Errors": null,
                                "Progress": -1,
                                "StartTime": "2023-12-20 17:03:39",
                                "Status": "finished",
                                "StepId": "schema-init",
                                "StepName": "Incremental database table initialization",
                                "StepNo": 1,
                                "Warnings": []
                            },
                            {
                                "Errors": null,
                                "Progress": -1,
                                "StartTime": "2023-12-20 17:03:49",
                                "Status": "finished",
                                "StepId": "dumper",
                                "StepName": "Full export",
                                "StepNo": 2,
                                "Warnings": []
                            },
                            {
                                "Errors": null,
                                "Progress": -1,
                                "StartTime": "2023-12-20 17:07:50",
                                "Status": "finished",
                                "StepId": "loader",
                                "StepName": "Full import",
                                "StepNo": 3,
                                "Warnings": []
                            },
                            {
                                "Errors": null,
                                "Progress": -1,
                                "StartTime": "2023-12-20 17:16:49",
                                "Status": "running",
                                "StepId": "sinker",
                                "StepName": "Sync incrementally",
                                "StepNo": 4,
                                "Warnings": []
                            }
                        ],
                        "StepNow": 4
                    },
                    "DstAccessType": "noProxy",
                    "DstDatabaseType": "mysql",
                    "DstInfo": {
                        "Account": "",
                        "AccountMode": "",
                        "AccountRole": "",
                        "CcnId": "",
                        "CcnOwnerUin": "",
                        "CvmInstanceId": "",
                        "DatabaseNetEnv": "",
                        "DbKernel": "",
                        "DbName": "",
                        "EncryptConn": "",
                        "EngineVersion": "",
                        "InstanceId": "",
                        "Ip": "11.141.232.156",
                        "Password": "",
                        "Port": 3306,
                        "Region": "ap-guangzhou",
                        "Role": "",
                        "RoleExternalId": "",
                        "SubnetId": "",
                        "Supplier": "",
                        "TmpSecretId": "",
                        "TmpSecretKey": "",
                        "TmpToken": "",
                        "UniqDcgId": "",
                        "UniqVpnGwId": "",
                        "User": "root",
                        "VpcId": ""
                    },
                    "DstInfos": {
                        "AccessType": "",
                        "DatabaseType": "",
                        "Info": null,
                        "Region": ""
                    },
                    "DstNodeType": "single",
                    "DstRegion": "ap-qingyuan",
                    "DumperResumeCtrl": "yes",
                    "EndTime": "0000-00-00 00:00:00",
                    "ExpectRunTime": "0000-00-00 00:00:00",
                    "ExpireTime": "0000-00-00 00:00:00",
                    "InstanceClass": "medium",
                    "JobId": "sync-09vy1os1",
                    "JobName": "roger_test",
                    "Objects": {
                        "Databases": [
                            {
                                "DbMode": "All",
                                "DbName": "db_big",
                                "EventMode": "",
                                "FunctionMode": "",
                                "NewDbName": "",
                                "NewSchemaName": "",
                                "ProcedureMode": "",
                                "SchemaName": "",
                                "TableMode": "All",
                                "TriggerMode": "",
                                "ViewMode": "All"
                            }
                        ],
                        "Mode": "Partial",
                        "OnlineDDL": {
                            "Status": ""
                        }
                    },
                    "OfflineTime": "0000-00-00 00:00:00",
                    "Options": {
                        "AddAdditionalColumn": false,
                        "AutoRetryTimeRangeMinutes": 0,
                        "ConflictHandleOption": {
                            "ConditionColumn": "",
                            "ConditionOperator": "",
                            "ConditionOrderInSrcAndDst": ""
                        },
                        "ConflictHandleType": "Cover",
                        "DdlOptions": null,
                        "DealOfExistSameTable": "ExecuteAfterIgnore",
                        "InitType": "Full",
                        "KafkaOption": {
                            "DDLTopicName": "",
                            "DataType": "",
                            "TopicRules": [],
                            "TopicType": ""
                        },
                        "OpTypes": null,
                        "RateLimitOption": {
                            "CurrentDumpRps": 0,
                            "CurrentDumpThread": 8,
                            "CurrentLoadRps": 0,
                            "CurrentLoadThread": 8,
                            "CurrentSinkerThread": 32,
                            "DefaultDumpRps": 0,
                            "DefaultDumpThread": 8,
                            "DefaultLoadRps": 0,
                            "DefaultLoadThread": 8,
                            "DefaultSinkerThread": 32,
                            "HasUserSetRateLimit": "no"
                        }
                    },
                    "PayMode": "PostPay",
                    "RunMode": "Immediate",
                    "Specification": "",
                    "SrcAccessType": "noProxy",
                    "SrcDatabaseType": "mysql",
                    "SrcInfo": {
                        "Account": "",
                        "AccountMode": "",
                        "AccountRole": "",
                        "CcnId": "",
                        "CcnOwnerUin": "",
                        "CvmInstanceId": "",
                        "DatabaseNetEnv": "",
                        "DbKernel": "",
                        "DbName": "",
                        "EncryptConn": "",
                        "EngineVersion": "",
                        "InstanceId": "",
                        "Ip": "11.141.232.195",
                        "Password": "",
                        "Port": 3306,
                        "Region": "ap-guangzhou",
                        "Role": "",
                        "RoleExternalId": "",
                        "SubnetId": "",
                        "Supplier": "",
                        "TmpSecretId": "",
                        "TmpSecretKey": "",
                        "TmpToken": "",
                        "UniqDcgId": "",
                        "UniqVpnGwId": "",
                        "User": "root",
                        "VpcId": ""
                    },
                    "SrcInfos": {
                        "AccessType": "",
                        "DatabaseType": "",
                        "Info": null,
                        "Region": ""
                    },
                    "SrcNodeType": "single",
                    "SrcRegion": "ap-qingyuan",
                    "StartTime": "2023-12-19 15:54:18",
                    "Status": "Running",
                    "Tags": [],
                    "TradeStatus": "Normal"
                }
            ],
            "RequestId": "268b0711-a3b2-4692-8c91-88d743bc8b9f",
            "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.