tencent cloud

文档反馈

DescribeMigrationCheckJob

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

    1. API Description

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

    This API is used to get the check result and query the check status and progress after a check is created.
    If the check succeeds, you can call the StartMigrateJob API to start migration.
    If the check fails, the cause can be queried. Modify the migration configuration or adjust relevant parameters of the source/target instances through the ModifyMigrationJob API based on the error message.

    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: DescribeMigrationCheckJob.
    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 Task ID

    3. Output Parameters

    Parameter Name Type Description
    Status String Check task execution status. Valid values: notStarted, running, failed, success.
    Note: This field may return null, indicating that no valid values can be obtained.
    BriefMsg String Check task result message
    Note: This field may return null, indicating that no valid values can be obtained.
    StepInfo Array of CheckStep Check step
    Note: This field may return null, indicating that no valid values can be obtained.
    CheckFlag String Check result. Valid values: checkPass, checkNotPass.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the result of a migration check task

    Input Example

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

    Output Example

    {
        "Response": {
            "RequestId": "11d35c90-01bb-11ed-bad9-7b3bbe11abda",
            "CheckFlag": "checkPass",
            "BriefMsg": "success",
            "Status": "success",
            "StepInfo": [
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "ConnectDBCheck",
                    "StepMessage": "",
                    "StepName": "Database connection check",
                    "StepNo": 0,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "VersionCheck",
                    "StepMessage": "",
                    "StepName": "Version check",
                    "StepNo": 1,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [
                        {
                            "CheckItemName": "Source instance permission check",
                            "CheckResult": "warning",
                            "Description": "",
                            "ErrorLog": [
                                "Your permission is as follows: 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 source database account's permissions must include the required account permissions. DTS won't use unnecessary permissions. Therefore, grant permissions according to the principle of least privilege as described at [Source Instance Permission Check](https://www.tencentcloud.com/document/product/571/55424)."
                            ],
                            "FailureReason": "",
                            "HelpDoc": [
                                ""
                            ],
                            "SkipInfo": "",
                            "Solution": ""
                        }
                    ],
                    "HasSkipped": false,
                    "StepId": "SrcPrivilegeCheck",
                    "StepMessage": "",
                    "StepName": "Source instance permission check",
                    "StepNo": 2,
                    "StepStatus": "warning"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "SimpleParamCheck",
                    "StepMessage": "",
                    "StepName": "Partial instance parameter check",
                    "StepNo": 3,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "DstPrivilegeCheck",
                    "StepMessage": "",
                    "StepName": "Target instance permission check",
                    "StepNo": 4,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "DstEmptyCheck",
                    "StepMessage": "",
                    "StepName": "Target instance content conflict check",
                    "StepNo": 5,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "DstSpaceCheck",
                    "StepMessage": "",
                    "StepName": "Target instance space check",
                    "StepNo": 6,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "BinlogParamCheck",
                    "StepMessage": "",
                    "StepName": "Binlog parameter check",
                    "StepNo": 7,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "ConstraintCheck",
                    "StepMessage": "",
                    "StepName": "Foreign key dependency check",
                    "StepNo": 8,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "ConstraintRefCheck",
                    "StepMessage": "",
                    "StepName": "Partial database/table foreign key dependency check",
                    "StepNo": 9,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "ViewCheck",
                    "StepMessage": "",
                    "StepName": "View check",
                    "StepNo": 10,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [],
                    "HasSkipped": false,
                    "StepId": "WarningParamCheck",
                    "StepMessage": "",
                    "StepName": "Warning item check",
                    "StepNo": 11,
                    "StepStatus": "pass"
                },
                {
                    "DetailCheckItems": [
                        {
                            "CheckItemName": "Peripheral check",
                            "CheckResult": "warning",
                            "Description": "",
                            "ErrorLog": [
                                "skipped"
                            ],
                            "FailureReason": "",
                            "HelpDoc": [
                                ""
                            ],
                            "SkipInfo": "",
                            "Solution": ""
                        }
                    ],
                    "HasSkipped": true,
                    "StepId": "OptimizeCheck",
                    "StepMessage": "",
                    "StepName": "Peripheral check",
                    "StepNo": 12,
                    "StepStatus": "failed"
                }
            ]
        }
    }
    

    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.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.