功能介紹
更新某一個(gè)保護(hù)實(shí)例的名稱。
接口約束
無
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
PUT /v1/{project_id}/protected-instances/{protected_instance_id}
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
項(xiàng)目ID。 |
|
protected_instance_id |
是 |
String |
保護(hù)實(shí)例的ID。 |
請(qǐng)求參數(shù)
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用戶Token。通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲取(響應(yīng)消息頭中X-Subject-Token的值) |
|
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
|---|---|---|---|
|
protected_instance |
是 |
保護(hù)實(shí)例的信息。 |
響應(yīng)參數(shù)
狀態(tài)碼: 200
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
protected_instance |
保護(hù)實(shí)例的詳細(xì)信息。 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
id |
String |
保護(hù)實(shí)例的ID。 |
|
name |
String |
保護(hù)實(shí)例的名稱。 |
|
description |
String |
保護(hù)實(shí)例的描述。 |
|
status |
String |
保護(hù)實(shí)例的狀態(tài)。 |
|
source_server |
String |
生產(chǎn)站點(diǎn) 云服務(wù)器 ID。 |
|
target_server |
String |
容災(zāi)站點(diǎn)云服務(wù)器ID。 |
|
server_group_id |
String |
保護(hù)組的ID。 |
|
created_at |
String |
創(chuàng)建時(shí)間。默認(rèn)格式為:"yyyy-MM-dd HH:mm:ss.SSS",例:"2019-04-01 12:00:00.000"。 |
|
updated_at |
String |
更新時(shí)間。默認(rèn)格式為:"yyyy-MM-dd HH:mm:ss.SSS",例:"2019-04-01 12:00:00.000"。 |
|
metadata |
保護(hù)實(shí)例元數(shù)據(jù)信息。 |
|
|
attachment |
掛載的復(fù)制對(duì)列表。 |
|
|
tags |
標(biāo)簽列表。 |
|
|
progress |
Integer |
保護(hù)實(shí)例的同步進(jìn)度。單位:百分比(%)。 |
|
priority_station |
String |
標(biāo)識(shí)保護(hù)實(shí)例所在保護(hù)組的當(dāng)前生產(chǎn)站點(diǎn)可用區(qū)。source:表示當(dāng)前生產(chǎn)站點(diǎn)可用區(qū)為保護(hù)組source_availability_zone的值。target:表示當(dāng)前生產(chǎn)站點(diǎn)可用區(qū)為保護(hù)組的target_availability_zone的值。 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
__system__frozen |
String |
保護(hù)實(shí)例元數(shù)據(jù)中資源凍結(jié)的字段。 true:表示資源被凍結(jié)。 空:表示資源沒有被凍結(jié)。 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
replication |
String |
復(fù)制對(duì)ID。 |
|
device |
String |
掛載點(diǎn)。 |
|
參數(shù) |
參數(shù)類型 |
描述 |
|---|---|---|
|
key |
String |
鍵。同一資源的key值不能重復(fù)。最大長(zhǎng)度為36個(gè)UNICODE字符。key不能為空,不允許為空字符串。不能包含以下字符:非打印字符ASCII(0-31)特殊字符“*”,“<”,“>”,“\”,“=”,“,”,“|”,“/”鍵。不能為空。對(duì)于同一資源鍵值唯一。 |
|
value |
String |
值。最大長(zhǎng)度為43個(gè)UNICODE字符。value不能為空,可以為空字符串。不能包含以下字符:非打印字符ASCII(0-31)特殊字符“*”,“<”,“>”,“\”,“=”,“,”,“|”,“/”。長(zhǎng)度不超過43個(gè)字符。 |
狀態(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
請(qǐng)求示例
PUT https://{Endpoint}/v1/{project_id}/protected-instances/00000000632302f501632305f63c000e
{
"protected_instance" : {
"name" : "test_protected_instance_name"
}
}
響應(yīng)示例
狀態(tài)碼: 200
OK
{
"protected_instance" : {
"id" : "00000000632302f501632305f63c000e",
"name" : "test_protected_instance_name",
"description" : "_sdrs_protected_instance",
"server_group_id" : "00000000632302f501632305ac75000a",
"status" : "available",
"progress" : 0,
"source_server" : "5597a320-7a36-4462-9f85-a0d01edfb416",
"target_server" : "e37ed7de-bd76-4189-8445-be747205322d",
"created_at" : "2018-05-02 22:43:03.0",
"updated_at" : "2018-05-02 22:47:27.0",
"priority_station" : "target",
"attachment" : [ {
"replication" : "6568f7c4-0510-4f39-929d-8ffccbd4fd47",
"device" : "/dev/vda"
} ],
"tags" : [ {
"key" : "aaaaaaa",
"value" : "01234567889"
}, {
"key" : "ffffff",
"value" : "dddd"
} ],
"metadata" : { }
}
}
狀態(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 |
錯(cuò)誤碼
請(qǐng)參見錯(cuò)誤碼。
