You need to enable JavaScript to run this app.
导航
DescribeDiagnosticsInfos
最近更新时间:2025.01.22 12:04:50首次发布时间:2025.01.22 12:04:50

调用 DescribeDiagnosticsInfos 接口查询实例的连接诊断结果。

请求类型

同步请求。

调试

请求参数

参数
类型
是否必选
示例值
描述
InstanceId
String
mysql-db6d920e****
实例 ID。
DiagnosticsType
String
PrivateLink

诊断的连接类型。取值:

  • PrivateLink:私网连接。
  • PublicLink:公网连接。

说明

该字段作为请求参数时,默认值为 PrivateLink

DiagnosticsResult
String
Normal

连接诊断的整体结果。取值:

  • Normal:正常。
  • Abnormal:异常。
  • NotDiagnose:未诊断。
  • Diagnosing:诊断中。
  • DiagnoseFailed:诊断失败。
PageSize
Integer
10
每页记录数。最小值为 1,最大值不超过 100。默认值为 10。
PageNumber
Integer
1
当前页页码。取值最小为 1。默认值为 1。

返回参数

参数
类型
示例值
描述
DiagnosticsInfos
Object[]
请参见返回示例。
具体诊断信息。
DiagnosticsTaskStatus
String
Success

诊断任务的执行状态。取值:

  • NotStart:未诊断。
  • Running:诊断中。
  • Failed:诊断失败。
  • Success:诊断完成。
LastDiagnosticsTime
String
2024-10-31T02:57:20.000Z
最近一次进行连接诊断的时间。时间格式为 yyyy-MM-ddTHH:mm:ss.sssZ(UTC 时间)。
Total
Integer
3
符合查询条件的诊断结果总数。

示例

请求示例

POST /?Action=DescribeDiagnosticsInfos&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds.volcengineapi.com
X-Date: 20211202T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
    "InstanceId": "mysql-db6d920e****"
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2024103112060529E360524F9BD51239CB-3b3e28",
        "Action": "DescribeDiagnosticsInfos",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": {
        "DiagnosticsInfos": [
            {
                "DiagnosticsItems": [
                    {
                        "DiagnosticsItem": "MySQLInstanceStatus",
                        "DiagnosticsResult": "Normal",
                        "PossibleEffect": "",
                        "Suggestion": ""
                    },
                    {
                        "DiagnosticsItem": "ECSInstanceStatus",
                        "DiagnosticsResult": "Normal",
                        "PossibleEffect": "",
                        "Suggestion": ""
                    },
                    {
                        "DiagnosticsItem": "SameVpc",
                        "DiagnosticsResult": "Normal",
                        "PossibleEffect": "",
                        "Suggestion": ""
                    },
                    {
                        "DiagnosticsItem": "SameNetworkType",
                        "DiagnosticsResult": "Normal",
                        "PossibleEffect": "",
                        "Suggestion": ""
                    },
                    {
                        "DiagnosticsItem": "EcsSecurityGroupPolicy",
                        "DiagnosticsResult": "Normal",
                        "PossibleEffect": "",
                        "Suggestion": ""
                    },
                    {
                        "DiagnosticsItem": "MySQLWhiteListPolicy",
                        "DiagnosticsResult": "Abnormal",
                        "PossibleEffect": "云服务器(ECS)无法访问MySQL实例",
                        "Suggestion": "检测到您MySQL实例所绑定白名单未放通对云服务器(ECS) IP的访问"
                    }
                ],
                "DiagnosticsRecordId": "6a5af3e3b36145cd95f11a5b90fd4da9",
                "DiagnosticsResult": "Abnormal",
                "EcsInfo": {
                    "EcsInstanceId": "i-yd7nac9mv44uvzod****",
                    "EcsInstanceName": "测试实例ECS",
                    "EcsPrivateIpv4Address": "192.***.***.5",
                    "EcsPrivateIpv6Address": null,
                    "EcsVpcId": "vpc-3jh82ag7t5g5c3pncmemv****",
                    "EcsVpcName": "测试私有网络"
                },
                "EndpointInfo": {
                    "EndpointId": "mysql-db6d920e****-cluster",
                    "EndpointName": "默认终端",
                    "PriaveDomain": "mysqldb6d920e****.rds-boe.ivolces.com",
                    "PrivateIpv4Address": "192.***.***.19:3306",
                    "PrivateIpv6Address": "",
                    "PublicDomain": "mysql-db6d920e****-public.rds-boe.volces.com",
                    "PublicIpAddress": "192.***.***.19:3306",
                    "VpcId": "vpc-3jh82ag7t5g5c3pncmemv****",
                    "VpcName": "测试私有网络"
                },
                "InstanceId": "mysql-db6d920e****"
            },
            {
                "DiagnosticsItems": [
                    {
                        "DiagnosticsItem": "MySQLInstanceStatus",
                        "DiagnosticsResult": "Normal",
                        "PossibleEffect": "",
                        "Suggestion": ""
                    },
                    {
                        "DiagnosticsItem": "MySQLWhiteListPolicy",
                        "DiagnosticsResult": "Abnormal",
                        "PossibleEffect": "无法访问MySQL实例",
                        "Suggestion": "检测到您MySQL实例所绑定白名单未放通对指定公网IP的访问"
                    }
                ],
                "DiagnosticsRecordId": "013bebfa2c7349039da3646213cc7ffa",
                "DiagnosticsResult": "Abnormal",
                "EndpointInfo": {
                    "EndpointId": "mysql-db6d920e****-cluster",
                    "EndpointName": "默认终端",
                    "PriaveDomain": "mysqldb6d920e****.rds-boe.ivolces.com",
                    "PrivateIpv4Address": "192.***.***.19:3306",
                    "PrivateIpv6Address": "",
                    "PublicDomain": "mysql-db6d920e****-public.rds-boe.volces.com",
                    "PublicIpAddress": "192.***.***.19:3306",
                    "VpcId": "vpc-3jh82ag7t5g5c3pncmemv****",
                    "VpcName": "测试私有网络"
                },
                "InstanceId": "mysql-db6d920e****",
                "PublicAddressInfo": {
                    "EipId": "eip-3jh0q9ouwi9kw3pncmfw5****",
                    "EipName": "测试公网",
                    "PublicIpAddress": "192.***.***.5"
                }
            }
        ],
        "DiagnosticsTaskStatus": "Success",
        "LastDiagnosticsTime": "2024-10-31T04:06:01.000Z",
        "Total": 2
    }
}

错误码

更多详情,请参见错误码