查询待迁移源端的所有错误
功能介绍
主机迁移过程中可能发生错误,使用该接口可以批量查询迁移过程中出现错误的源端服务器信息,以及它们的错误信息。
调用方法
请参见如何调用API。
URI
GET /v3/errors
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
limit |
否 |
Integer |
每一页记录的错误数量 最小值:0 最大值:100 缺省值:50 |
offset |
是 |
Integer |
偏移量 最小值:0 最大值:65535 缺省值:0 |
migproject |
否 |
String |
需要查询的迁移项目ID,添加此字段将只查询对应ID下的迁移任务报错信息 最小长度:0 最大长度:255 |
enterprise_project_id |
否 |
String |
需要查询的企业项目ID 最小长度:0 最大长度:255 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:16384 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
count |
Integer |
迁移过程中发生错误的源端数量 最小值:0 最大值:2147483647 |
migration_errors |
Array of MigrationErrors objects |
迁移过程中发生的错误详情 数组长度:0 - 65535 |
参数 |
参数类型 |
描述 |
---|---|---|
error_json |
String |
保存错误信息的json字符串 最小长度:0 最大长度:255 |
host_name |
String |
主机名称(从用户系统获取,可能为空) 最小长度:0 最大长度:255 |
name |
String |
源端在主机迁移服务中的名称 最小长度:0 最大长度:255 |
source_id |
String |
源端服务器ID 最小长度:0 最大长度:255 |
source_ip |
String |
源端服务器的ip 最小长度:0 最大长度:255 |
target_ip |
String |
目的端服务器的ip 最小长度:0 最大长度:255 |
状态码:403
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误代码 最小长度:0 最大长度:255 |
error_msg |
String |
错误信息 最小长度:0 最大长度:255 |
encoded_authorization_message |
String |
加密授权信息 最小长度:0 最大长度:65535 |
error_param |
Array of strings |
错误参数 最小长度:0 最大长度:65535 数组长度:1 - 20 |
details |
Array of details objects |
详细错误信息 数组长度:1 - 20 |
请求示例
批量查询迁移过程中出现错误的源端服务器信息,每页10个源端,查看第0页。
GET https://{endpoint}/v3/errors?limit=10&offset=0
响应示例
状态码:200
查询待迁移源端的所有错误成功
{ "count" : 4, "migration_errors" : [ { "source_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "source_ip" : "192.168.0.235", "target_ip" : null, "name" : "sms-ubuntu", "host_name" : null, "error_json" : "{\"error_code\":\"SMS.1302\",\"error_param\":\"[\\\"/\\\", \\\"/mnt/vdb1\\\"]\"}" }, { "source_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "source_ip" : "192.168.0.163", "target_ip" : null, "name" : "sms-win08", "host_name" : "sms-win08", "error_json" : "{\"error_param\":\"[\\\"192.168.0.1\\\"]\",\"error_code\":\"SMS.2802\"}" }, { "source_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "source_ip" : "192.168.0.154", "target_ip" : null, "name" : "sms-win16", "host_name" : "sms-win16", "error_json" : "{\"error_code\":\"SMS.1114\",\"error_param\":\"[]\"}" }, { "source_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "source_ip" : "192.168.77.77", "target_ip" : null, "name" : "sms-centos", "host_name" : null, "error_json" : "{\"error_code\":\"SMS.3805\",\"error_param\":\"[]\"}" } ] }
状态码:403
鉴权失败
{ "error_code" : "SMS.9004", "error_msg" : "The current account does not have the permission to execute policy You do not have permission to perform action XXX on resource XXX.", "encoded_authorization_message" : "XXXXXX", "error_param" : [ "You do not have permission to perform action XXX on resource XXX." ], "details" : [ { "error_code" : "SMS.9004", "error_msg" : "You do not have permission to perform action XXX on resource XXX." } ] }
状态码
状态码 |
描述 |
---|---|
200 |
查询待迁移源端的所有错误成功 |
403 |
鉴权失败 |
错误码
请参见错误码。