使用說明
modifyInstanceAttribute主要是用於雲伺服器做原機升降級或供裝雲伺服器監控之功能。
參數中若包含instanceType,則monitoringEnabled 的參數將被忽略
Request參數
參數 | 說明 | 備註 |
---|---|---|
instanceId |
主機服務識別碼 類型 : String 預設值 : 無 是否為複數型態 : 否 |
|
instanceType (非必要參數) |
運算規格 類型 : String 預設值 : 無 是否為複數型態 : 否 |
|
monitoringEnabled (非必要參數) |
是否要供裝監控 類型 : Boolean 預設值 : 無 是否為複數型態 : 否 |
Response參數
參數 | 說明 | 備註 |
---|---|---|
requestId
(非必要參數) |
請求識別碼 類型 : JSON value : string 是否為複數型態 : 否 |
系統自動產生 |
statusMap |
主機服務識別碼-狀態列表 類型 : JSON value : object 是否為複數型態 : 是(Map) |
object為{string,string} 狀態值為 |
Request範例
範例1:(原機升降級) https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=modifyInstanceAttribute &instanceType=HC1.M.WIN &instanceId=BV550100010004 &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature} 範例2:(供裝雲伺服器監控) https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=modifyInstanceAttribute &monitoringEnabled=true &instanceId=BV550100010004 &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature}
Response範例
{ "requestId":"xxxEXAMPLE", "statusMap": { "BV550100010004": "success" } }