tencent cloud

文档反馈

DescribeCompareTasks

最后更新时间:2023-10-17 11:03:11

    1. API Description

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

    This API is used to query the list of data consistency check tasks under the current 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: DescribeCompareTasks.
    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 Yes String Migration task ID
    Limit No Integer Number of tasks to be displayed per page. Default value: 20.
    Offset No Integer Pagination offset
    CompareTaskId No String Check task ID
    Status.N No Array of String Data consistency check task status. Valid values: created, readyRun, running, success, stopping, failed, canceled.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Quantity
    Note: This field may return null, indicating that no valid values can be obtained.
    Items Array of CompareTaskItem List of data consistency check tasks
    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 data consistency check tasks

    This example shows you how to query the list of data consistency check tasks.

    Input Example

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

    Output Example

    {
        "Response": {
            "Items": [
                {
                    "CheckProcess": {
                        "Message": "",
                        "Status": "",
                        "StepAll": 0,
                        "StepNow": 0,
                        "Percent": 0,
                        "Steps": []
                    },
                    "CompareProcess": {
                        "Message": "done",
                        "Status": "",
                        "StepAll": 0,
                        "StepNow": 0,
                        "Steps": []
                    },
                    "CompareTaskId": "dts-amm1jw5q-cmp-bmuum7jk",
                    "Conclusion": "same",
                    "Config": {
                        "ObjectItems": [
                            {
                                "DbMode": "partial",
                                "DbName": "big100",
                                "SchemaName": "",
                                "TableMode": "partial",
                                "Tables": null,
                                "ViewMode": "none",
                                "Views": null
                            },
                            {
                                "DbMode": "all",
                                "DbName": "db1",
                                "SchemaName": "",
                                "TableMode": "all",
                                "Tables": null,
                                "ViewMode": "all",
                                "Views": null
                            }
                        ],
                        "ObjectMode": "partial"
                    },
                    "CreatedAt": "2022-07-11 17:21:02",
                    "FinishedAt": "2022-07-11 17:24:54",
                    "Method": "dataCheck",
                    "Options": {
                        "Method": "dataCheck",
                        "SampleRate": 100,
                        "ThreadCount": 1
                    },
                    "JobId": "dts-amm1jw5q",
                    "Message": "done",
                    "StartedAt": "2022-07-11 17:24:09",
                    "Status": "success",
                    "TaskName": "defaultCmpTask"
                }
            ],
            "RequestId": "11d35c90-01bb-11ed-bad9-7b3bbe11abda",
            "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.
    DryRunOperation.DryRunOperationError DryRun operation, which means an unnecessary DryRun parameter is passed in yet the request will still be successful.
    FailedOperation.FailedOperationError The operation failed.
    InternalError.InternalErrorError An internal error occurred.
    InvalidParameter.InvalidParameterError The parameter is invalid.
    InvalidParameterValue.InvalidParameterValueError The parameter is invalid.
    LimitExceeded.LimitExceededError The quantity exceeds the limit.
    MissingParameter.MissingParameterError The parameter is lost.
    OperationDenied.OperationDeniedError The operation was denied.
    RequestLimitExceeded.RequestLimitExceededError The number of requests exceeds the limit.
    ResourceInUse.ResourceInUseError The resource is being used.
    ResourceInsufficient.ResourceInsufficientError The resources are insufficient.
    ResourceNotFound.BizResourceNotFoundError The resource was not found.
    ResourceNotFound.ResourceNotFoundError The resource was not found.
    ResourceUnavailable.ResourceUnavailableError The resource is unavailable.
    ResourcesSoldOut.ResourcesSoldOutError The resources have been sold out.
    UnauthorizedOperation.UnauthorizedOperationError The operation is unauthorized.
    UnknownParameter.UnknownParameterError The parameter is unknown.
    UnsupportedOperation.UnsupportedOperationError The operation is not supported.