tencent cloud

文档反馈

DescribeMigrationDetail

最后更新时间:2024-07-24 10:34:15

    1. API Description

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

    This API is used to query the details of a migration 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: DescribeMigrationDetail.
    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 Data migration task ID

    3. Output Parameters

    Parameter Name Type Description
    JobId String Data migration task ID
    Note: This field may return null, indicating that no valid values can be obtained.
    JobName String Data migration task name
    Note: This field may return null, indicating that no valid values can be obtained.
    CreateTime String Task creation (submission) time in the format of yyyy-mm-dd hh:mm:ss
    Note: This field may return null, indicating that no valid values can be obtained.
    UpdateTime String Task update time in the format of yyyy-mm-dd hh:mm:ss
    Note: This field may return null, indicating that no valid values can be obtained.
    StartTime String Task start time in the format of yyyy-mm-dd hh:mm:ss
    Note: This field may return null, indicating that no valid values can be obtained.
    EndTime String Task end time in the format of yyyy-mm-dd hh:mm:ss
    Note: This field may return null, indicating that no valid values can be obtained.
    BriefMsg String Migration task error message
    Note: This field may return null, indicating that no valid values can be obtained.
    Status String Task status. Valid values: created(Created), checking (Checking), checkPass (Check passed), checkNotPass (Check not passed), readyRun (Ready for running), running (Running), readyComplete (Preparation completed), success (Successful), failed (Failed), stopping (Stopping), completing (Completing), pausing (Pausing), manualPaused (Paused). Note: This field may return null, indicating that no valid values can be obtained.
    Action MigrateAction Task operation information
    Note: This field may return null, indicating that no valid values can be obtained.
    StepInfo MigrateDetailInfo Information of the migration task execution process. The check and migration step information will be displayed in the check and migration stages respectively.
    Note: This field may return null, indicating that no valid values can be obtained.
    SrcInfo DBEndpointInfo Source instance information
    Note: This field may return null, indicating that no valid values can be obtained.
    DstInfo DBEndpointInfo Target database information
    Note: This field may return null, indicating that no valid values can be obtained.
    CompareTask CompareTaskInfo Data consistency check result
    Note: This field may return null, indicating that no valid values can be obtained.
    Tags Array of TagItem Tag information
    Note: This field may return null, indicating that no valid values can be obtained.
    RunMode String Running mode. Valid values: immediate, timed.
    Note: This field may return null, indicating that no valid values can be obtained.
    ExpectRunTime String Expected start time in the format of "2006-01-02 15:04:05", which is required if RunMode is timed.
    Note: This field may return null, indicating that no valid values can be obtained.
    MigrateOption MigrateOption Migration options, which describe how the task performs migration.
    Note: This field may return null, indicating that no valid values can be obtained.
    CheckStepInfo CheckStepInfo Check task running details
    Note: This field may return null, indicating that no valid values can be obtained.
    TradeInfo TradeInfo Billing information
    Note: This field may return null, indicating that no valid values can be obtained.
    ErrorInfo Array of ErrorInfoItem Task error information
    Note: This field may return null, indicating that no valid values can be obtained.
    DumperResumeCtrl String Whether the task can be reentered in the full export stage. Valid values: yes, no. yes: The current task can be reentered. no: The current task is in the full export stage which cannot be reentered. If the value of this parameter is no, the checkpoint restart is not supported when the task is restarted in the export stage.
    RateLimitOption RateLimitOption Task throttling information
    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 details of a migration task

    This example shows you how to query the details of a migration task.

    Input Example

    POST / HTTP/1.1
    Host: dts.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeMigrationDetail
    <Common Request Parameters>
    
    {
        "JobId": "dts-amm1jw5q"
    }
    

    Output Example

    {
        "Response": {
            "Action": {
                "AllAction": [
                    "view",
                    "modify",
                    "check",
                    "start",
                    "configure",
                    "stop",
                    "complete",
                    "resume",
                    "createCmpTask",
                    "isolate",
                    "offline",
                    "resize",
                    "recover"
                ],
                "AllowedAction": [
                    "view",
                    "stop",
                    "complete",
                    "createCmpTask",
                    "view",
                    "isolate",
                    "resize"
                ]
            },
            "CheckStepInfo": {
                "EndAt": "2022-07-11 17:19:25",
                "Progress": {
                    "Message": "success",
                    "Percent": 100,
                    "Status": "success",
                    "StepAll": 12,
                    "Steps": [
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "ConnectDBCheck",
                            "StepMessage": "",
                            "StepName": "Database Connection Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "VersionCheck",
                            "StepMessage": "",
                            "StepName": "Version Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "SrcPrivilegeCheck",
                            "StepMessage": "",
                            "StepName": "Source Instance Permission Check",
                            "StepNo": 0,
                            "Warnings": [
                                {
                                    "HelpDoc": "",
                                    "Message": "Your authorization: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'root'@'%' WITH GRANT OPTION. The range of source account permissions exceeds the required account permissions. Tencent Cloud DTS will not use more permissions than necessary, please authorize based on the principle of minimization: https://www.tencentcloud.com/document/product/571/58700?from_cn_redirect=1",
                                    "Solution": ""
                                }
                            ]
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "SimpleParamCheck",
                            "StepMessage": "",
                            "StepName": "Partial Instance Parameter Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "DstPrivilegeCheck",
                            "StepMessage": "",
                            "StepName": "Target Instance Permission Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "DstEmptyCheck",
                            "StepMessage": "",
                            "StepName": "Target Database Content Conflict Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "DstSpaceCheck",
                            "StepMessage": "",
                            "StepName": "Target Instance Space Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "BinlogParamCheck",
                            "StepMessage": "",
                            "StepName": "Binlog Parameter Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "ConstraintCheck",
                            "StepMessage": "",
                            "StepName": "Foreign Key Dependency Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "ConstraintRefCheck",
                            "StepMessage": "",
                            "StepName": "Partial Foreign Key Table Dependency Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "ViewCheck",
                            "StepMessage": "",
                            "StepName": "View Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 100,
                            "StartTime": "",
                            "Status": "finished",
                            "StepId": "WarningParamCheck",
                            "StepMessage": "",
                            "StepName": "Warning Items Check",
                            "StepNo": 0,
                            "Warnings": []
                        },
                        {
                            "Errors": [],
                            "Percent": 0,
                            "StartTime": "",
                            "Status": "skipped",
                            "StepId": "OptimizeCheck",
                            "StepMessage": "",
                            "StepName": "Peripheral Check",
                            "StepNo": 0,
                            "Warnings": [
                                {
                                    "HelpDoc": "",
                                    "Message": "skipped",
                                    "Solution": ""
                                }
                            ]
                        }
                    ],
                    "StepNow": 12
                },
                "StartAt": "2022-07-11 17:18:57"
            },
            "CompareTask": {
                "CompareTaskId": "dts-amm1jw5q-cmp-bmuum7jk",
                "Status": "consistent"
            },
            "CreateTime": "2022-07-11 16:20:49",
            "DstInfo": {
                "AccessType": "cdb",
                "DatabaseType": "mysql",
                "ExtraAttr": [],
                "Info": [
                    {
                        "Account": "",
                        "AccountMode": "",
                        "AccountRole": "",
                        "CcnGwId": "",
                        "CvmInstanceId": "",
                        "DbKernel": "",
                        "EngineVersion": "",
                        "Host": "",
                        "InstanceId": "cdb-o7uph0cj",
                        "Password": "xxx",
                        "Port": 0,
                        "Role": "",
                        "SubnetId": "",
                        "TmpSecretId": "",
                        "TmpSecretKey": "",
                        "TmpToken": "",
                        "UniqDcgId": "",
                        "UniqVpnGwId": "",
                        "User": "root",
                        "VpcId": ""
                    }
                ],
                "NodeType": "simple",
                "Region": "ap-guangzhou",
                "Supplier": ""
            },
            "EndTime": "0000-00-00 00:00:00",
            "ErrorInfo": [],
            "ExpectRunTime": "2022-07-11 17:16:50",
            "JobId": "dts-amm1jw5q",
            "JobName": "test_config_api",
            "BriefMsg": "",
            "MigrateOption": {
                "Consistency": {
                    "Mode": "full"
                },
                "DatabaseTable": {
                    "Databases": [
                        {
                            "DBMode": "partial",
                            "DbName": "big100",
                            "EventMode": "",
                            "FunctionMode": "",
                            "NewDbName": "",
                            "NewSchemaName": "",
                            "ProcedureMode": "",
                            "RoleMode": "",
                            "Roles": [],
                            "SchemaMode": "",
                            "SchemaName": "",
                            "TableMode": "partial",
                            "Tables": [
                                {
                                    "NewTableName": "",
                                    "TableEditMode": "",
                                    "TableName": "sbtest1",
                                    "TmpTables": []
                                },
                                {
                                    "NewTableName": "new_sbtest10",
                                    "TableEditMode": "rename",
                                    "TableName": "sbtest10",
                                    "TmpTables": []
                                },
                                {
                                    "NewTableName": "",
                                    "TableEditMode": "",
                                    "TableName": "sbtest100",
                                    "TmpTables": []
                                }
                            ],
                            "TriggerMode": "",
                            "ViewMode": "none",
                            "Views": []
                        },
                        {
                            "DBMode": "all",
                            "DbName": "db1",
                            "EventMode": "",
                            "FunctionMode": "",
                            "NewDbName": "",
                            "NewSchemaName": "",
                            "ProcedureMode": "",
                            "RoleMode": "",
                            "Roles": [],
                            "SchemaMode": "",
                            "SchemaName": "",
                            "TableMode": "",
                            "Tables": [],
                            "TriggerMode": "",
                            "ViewMode": "",
                            "Views": []
                        }
                    ],
                    "AdvancedObjects": [
                        "function"
                    ],
                    "ObjectMode": "partial"
                },
                "ExtraAttr": [],
                "IsMigrateAccount": false,
                "IsDstReadOnly": false,
                "IsOverrideRoot": false,
                "MigrateType": "fullAndIncrement"
            },
            "RequestId": "ac300ff0-00f2-11ed-b005-4930e69d89c2",
            "RunMode": "immediate",
            "SrcInfo": {
                "AccessType": "intranet",
                "DatabaseType": "mysql",
                "ExtraAttr": [],
                "Info": [
                    {
                        "Account": "",
                        "AccountMode": "",
                        "AccountRole": "",
                        "CcnGwId": "",
                        "CvmInstanceId": "",
                        "DbKernel": "",
                        "EngineVersion": "5.7",
                        "Host": "9.123.456.789",
                        "InstanceId": "",
                        "Password": "xxx",
                        "Port": 31035,
                        "Role": "",
                        "SubnetId": "",
                        "TmpSecretId": "",
                        "TmpSecretKey": "",
                        "TmpToken": "",
                        "UniqDcgId": "",
                        "UniqVpnGwId": "",
                        "User": "root",
                        "VpcId": ""
                    }
                ],
                "NodeType": "simple",
                "Region": "ap-guangzhou",
                "Supplier": ""
            },
            "StartTime": "2022-07-11 17:20:56",
            "Status": "readyComplete",
            "StepInfo": {
                "MasterSlaveDistance": 0,
                "SecondsBehindMaster": 0,
                "StepAll": 3,
                "StepInfo": [
                    {
                        "StepMessage": "",
                        "Percent": 100,
                        "Errors": [],
                        "StartTime": "2022-07-11 17:21:59",
                        "Status": "finished",
                        "StepId": "dumper",
                        "StepName": "Export from Source Database",
                        "StepNo": 1,
                        "Warnings": []
                    },
                    {
                        "StepMessage": "",
                        "Percent": 100,
                        "Errors": [],
                        "StartTime": "2022-07-11 17:22:43",
                        "Status": "finished",
                        "StepId": "loader",
                        "StepName": "Data Import",
                        "StepNo": 2,
                        "Warnings": []
                    },
                    {
                        "StepMessage": "",
                        "Percent": 100,
                        "Errors": [],
                        "StartTime": "2022-07-11 17:23:26",
                        "Status": "running",
                        "StepId": "sinker",
                        "StepName": "Incremental Sync",
                        "StepNo": 3,
                        "Warnings": []
                    }
                ],
                "StepNow": 3
            },
            "Tags": [],
            "TradeInfo": {
                "BillingType": "billing",
                "DealName": "20220711715001047929481",
                "ExpireTime": "0000-00-00 00:00:00",
                "InstanceClass": "xlarge",
                "IsolateReason": "",
                "LastDealName": "",
                "OfflineReason": "",
                "PayType": "postpay",
                "TradeStatus": "normal",
                "OfflineTime": "",
                "IsolateTime": ""
            },
            "UpdateTime": "2022-07-11 19:53:03",
            "DumperResumeCtrl": "no"
        }
    }
    

    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.ControllerNotFoundError The current API is not registered due to an exception.
    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.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.