技術員聯盟提供win764位系統(tǒng)下載,win10,win7,xp,裝機純凈版,64位旗艦版,綠色軟件,免費軟件下載基地!

當前位置:主頁 > 教程 > 服務器類 >

阿里云停止實例的接口參數有哪些

來源:技術員聯盟┆發(fā)布時間:2017-12-09 18:36┆點擊:

  停止一個指定的實例。

  只有狀態(tài)為 Running 的實例才可以進行此操作。

  接口調用成功后實例進入 Stopping 狀態(tài)。系統(tǒng)后臺會在實例實際 Stop 成功后進入 Stopped 狀態(tài)。

  實例支持強制停止,強制停止等同于斷電處理,可能丟失實例操作系統(tǒng)中未寫入磁盤的數據。

  被安全控制在實例的 OperationLocks 中標記了 "LockReason" : "security" 的鎖定狀態(tài)時,不能停止實例。

  請求參數

名稱 類型 是否必須 描述
Action   String     系統(tǒng)規(guī)定參數,取值:StopInstance  
InstanceId   String     指定的實例 ID  
ForceStop   String     重啟機器時的是否強制關機策略。取值:

true

false

默認值為 false。
若為 false 則走正常關機流程;若為 true 則強制關機。
 

  返回參數

  全是公共返回參數,詳見公共返回參數

  錯誤碼

錯誤代碼 描述 Http 狀態(tài)碼 語義
InvalidInstanceId.NotFound   The InstanceId provided does not exist in our records.   404   指定的 InstanceId 不存在  
MissingParameter   The input parameter "InstanceId" that is mandatory for processing this request is not supplied.   400   缺少 InstanceId 值  
InvalidParameter   The specified parameter "ForceStop" is not valid.   400   指定的 ForceStop 不合法,(不在枚舉范圍內)  
IncorrectInstanceStatus   The current status of the resource does not support this operation.   403   該資源目前的狀態(tài)不支持此操作  
InstanceLockedForSecurity   The specified operation is denied as your instance is locked for security reasons.   403   該資源目前被安全鎖定被拒絕操作  

  示例

  請求示例

  https://ecs.aliyuncs.com/?Action=StopInstance

  &InstanceId=i-instance1

  &<公共請求參數>

  返回示例

  XML格式

  

  1C488B66-B819-4D14-8711-C4EAAA13AC01

  

  JSON格式

  {

  "RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01"