功能介紹
查詢job的執(zhí)行狀態(tài)。 對于創(chuàng)建保護(hù)組、刪除保護(hù)組、創(chuàng)建保護(hù)實(shí)例、刪除保護(hù)實(shí)例、創(chuàng)建復(fù)制對、刪除復(fù)制對等異步API,命令下發(fā)后,會返回job_id,通過job_id可以查詢?nèi)蝿?wù)的執(zhí)行狀態(tài)。
接口約束
無
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
GET /v1/{project_id}/jobs/{job_id}
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
job_id |
是 |
String |
job ID |
|
project_id |
是 |
String |
項(xiàng)目ID |
請求參數(shù)
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用戶Token。通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲?。憫?yīng)消息頭中X-Subject-Token的值) |
響應(yīng)參數(shù)
狀態(tài)碼: 200
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
status |
String |
Job的狀態(tài)。 SUC CES S:成功。 RUNNING:運(yùn)行中。 FAIL:失敗。 INIT:正在初始化。 枚舉值:
|
|
entities |
Job操作的對象。 |
|
|
job_id |
String |
Job ID。 |
|
job_type |
String |
Job的類型。createProtectionGroupNoCG:創(chuàng)建保護(hù)組。deleteProtectionGroupNoCG:刪除保護(hù)組。startProtectionGroupNoCG :保護(hù)組開始保護(hù)。reprotectProtectionGroupNoCG :保護(hù)組重保護(hù)。stopProtectionGroupNoCG :保護(hù)組停止保護(hù)。failoverProtectionGroupNoCG :保護(hù)組故障切換。reverseProtectionGroupNoCG:保護(hù)組切換。createProtectedInstanceNoCG:創(chuàng)建保護(hù)實(shí)例。deleteProtectedInstanceNoCG:刪除保護(hù)實(shí)例。attachReplicationPairNew:保護(hù)實(shí)例掛載復(fù)制對。detachReplicationPairNew:保護(hù)實(shí)例卸載復(fù)制對。addNicNew:保護(hù)實(shí)例添加網(wǎng)卡。deleteNicNew:保護(hù)實(shí)例刪除網(wǎng)卡。resizeProtectedInstanceNew:保護(hù)實(shí)例變更規(guī)格。createReplicationPairNoCG:創(chuàng)建復(fù)制對。deleteReplicationPairNoCG:刪除復(fù)制對。expandReplicationPairNew:復(fù)制對擴(kuò)容。createDisasterRecoveryDrill:創(chuàng)建容災(zāi)演練。deleteDisasterRecoveryDrill:刪除容災(zāi)演練。 |
|
begin_time |
String |
開始時間。默認(rèn)格式為:"yyyy-MM-dd'T'HH:mm:ss.SSSZ",例:"2019-04-01T12:00:00.000Z"。 |
|
end_time |
String |
結(jié)束時間。默認(rèn)格式為:"yyyy-MM-dd'T'HH:mm:ss.SSSZ",例:"2019-04-01T12:00:00.000Z"。 |
|
error_code |
String |
Job執(zhí)行失敗時的錯誤碼。 |
|
fail_reason |
String |
Job執(zhí)行失敗時的錯誤原因。 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
replication_pair_id |
String |
復(fù)制對ID |
|
volume_ids |
String |
組成復(fù)制對的 云硬盤 ID |
|
server_group_id |
String |
保護(hù)組ID |
|
protected_instance_id |
String |
保護(hù)實(shí)例ID |
|
native_server_id |
String |
容災(zāi)站點(diǎn)服務(wù)器ID |
|
nic_id |
String |
網(wǎng)卡ID |
|
sub_jobs |
子Job信息 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
status |
String |
Job的狀態(tài)。 SUCCESS:成功。 RUNNING:運(yùn)行中。 FAIL:失敗。 INIT:正在初始化。 枚舉值:
|
|
entities |
Job操作的對象。 |
|
|
job_id |
String |
Job ID。 |
|
job_type |
String |
Job的類型。createProtectionGroupNoCG:創(chuàng)建保護(hù)組。deleteProtectionGroupNoCG:刪除保護(hù)組。startProtectionGroupNoCG :保護(hù)組開始保護(hù)。reprotectProtectionGroupNoCG :保護(hù)組重保護(hù)。stopProtectionGroupNoCG :保護(hù)組停止保護(hù)。failoverProtectionGroupNoCG :保護(hù)組故障切換。reverseProtectionGroupNoCG:保護(hù)組切換。createProtectedInstanceNoCG:創(chuàng)建保護(hù)實(shí)例。deleteProtectedInstanceNoCG:刪除保護(hù)實(shí)例。attachReplicationPairNew:保護(hù)實(shí)例掛載復(fù)制對。detachReplicationPairNew:保護(hù)實(shí)例卸載復(fù)制對。addNicNew:保護(hù)實(shí)例添加網(wǎng)卡。deleteNicNew:保護(hù)實(shí)例刪除網(wǎng)卡。resizeProtectedInstanceNew:保護(hù)實(shí)例變更規(guī)格。createReplicationPairNoCG:創(chuàng)建復(fù)制對。deleteReplicationPairNoCG:刪除復(fù)制對。expandReplicationPairNew:復(fù)制對擴(kuò)容。createDisasterRecoveryDrill:創(chuàng)建容災(zāi)演練。deleteDisasterRecoveryDrill:刪除容災(zāi)演練。 |
|
begin_time |
String |
開始時間。默認(rèn)格式為:"yyyy-MM-dd'T'HH:mm:ss.SSSZ",例:"2019-04-01T12:00:00.000Z"。 |
|
end_time |
String |
結(jié)束時間。默認(rèn)格式為:"yyyy-MM-dd'T'HH:mm:ss.SSSZ",例:"2019-04-01T12:00:00.000Z"。 |
|
error_code |
String |
Job執(zhí)行失敗時的錯誤碼。 |
|
fail_reason |
String |
Job執(zhí)行失敗時的錯誤原因。 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
replication_pair_id |
String |
復(fù)制對ID |
|
volume_ids |
String |
組成復(fù)制對的云硬盤ID |
|
server_group_id |
String |
保護(hù)組ID |
|
protected_instance_id |
String |
保護(hù)實(shí)例ID |
|
native_server_id |
String |
容災(zāi)站點(diǎn)服務(wù)器ID |
|
nic_id |
String |
網(wǎng)卡ID |
狀態(tài)碼: 400
狀態(tài)碼: 401
狀態(tài)碼: 403
狀態(tài)碼: 405
狀態(tài)碼: 406
狀態(tài)碼: 407
狀態(tài)碼: 408
狀態(tài)碼: 409
狀態(tài)碼: 500
狀態(tài)碼: 501
狀態(tài)碼: 502
狀態(tài)碼: 503
狀態(tài)碼: 504
請求示例
GET https://{endpoint}/v1/{project_id}/jobs/0000000062db92d70162db9d200f000a
響應(yīng)示例
狀態(tài)碼: 200
OK
{
"status" : "SUCCESS",
"entities" : {
"server_group_id" : "a59d008e-4bad-4bf3-9b17-6cc25e7da483"
},
"job_id" : "0000000062db92d70162db9d200f000a",
"job_type" : "createProtectionGroupNoCG",
"begin_time" : "2018-04-19T01:55:30.443Z",
"end_time" : "2018-04-19T01:55:45.493Z",
"error_code" : null,
"fail_reason" : null
}
狀態(tài)碼
|
狀態(tài)碼 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
405 |
Method Not Allowed |
|
406 |
Not Acceptable |
|
407 |
Proxy Authentication Required |
|
408 |
Request Timeout |
|
409 |
Conflict |
|
500 |
Internal Server Error |
|
501 |
Not Implemented |
|
502 |
Bad Gateway |
|
503 |
Service Unavailable |
|
504 |
Gateway Timeout |
錯誤碼
請參見錯誤碼。
