久久96国产精品久久久-久久发布国产伦子伦精品-久久精品国产精品青草-久久天天躁夜夜躁狠狠85麻豆

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

當(dāng)前位置:主頁 > 教程 > 服務(wù)器類 >

阿里云如何使用掛載磁盤接口

來源:技術(shù)員聯(lián)盟┆發(fā)布時間:2017-05-23 15:52┆點擊:

  實例的狀態(tài)必須為 running 或者 stopped,且實例的 OperationLocks 中沒有標(biāo)記 "LockReason" : "security" 的鎖定狀態(tài),且不欠費。

  在該接口中設(shè)置的 DeleteWithInstance 屬性,在實例的 OperationLocks 中標(biāo)記為"LockReason" : "security" 的鎖定狀態(tài)時,釋放實例時會忽略磁盤的 DeleteWithInstance 屬性而被同時釋放。

  請求參數(shù)

名稱 類型 是否必須 描述
Action   String     操作接口名,系統(tǒng)規(guī)定參數(shù),取值:AttachDisk  
InstanceId   String     目標(biāo)云服務(wù)器 ID  
DiskId   String     磁盤 ID,磁盤和 Instance 必須在同一個 Zone  
Device   String     空表示由系統(tǒng)默認(rèn)分配,/dev/xvdb 開始到 /dev/xvdz
默認(rèn)值:空
 
DeleteWithInstance   String     磁盤是否隨實例釋放:

true 表示 Instance 釋放時,這塊磁盤隨 Instance 一起釋放;

false 表示 Instance 釋放時,這塊磁盤保留不釋放。

默認(rèn)值:無,表示保留當(dāng)前值不做修改。
 

  返回參數(shù)

  全是公共返回參數(shù),詳見公共返回參數(shù)

  錯誤碼

錯誤代碼 描述 Http 狀態(tài)碼 語義
MissingParameter   The input parameter "InstanceId" that is mandatory for processing this request is not supplied.   400   InstanceId 未指定  
MissingParameter   The input parameter "DiskId" that is mandatory for processing this request is not supplied.   400   DiskId 未指定  
InvalidInstanceId.NotFound   The specified instance does not exist.   404   指定的實例不存在  
InvalidDiskId.NotFound   The specified disk does not exist.   404   指定的磁盤不存在  
InvalidDevice.Malformed   The specified device is not valid.   400   指定的磁盤不存在  
InvalidParameter   The specified parameter "DeleteWithInstance" is not valid.   400   指定的 DeleteWithInstance 參數(shù)不合法  
InstanceDiskLimitExceeded   The amount of the disk on instance in question reach its limits.   403   指定實例已經(jīng)達(dá)到可掛載磁盤的最大值  
InvalidDevice.InUse   The specified device has been occupied.   403   指定的設(shè)備已經(jīng)掛載了磁盤  
IncorrectDiskStatus   The operation is not supported in this status.   403   磁盤狀態(tài)不正確  
DiskNotPortable   It is not a portable disk.   403   指定磁盤不是可卸載的磁盤  
InstanceLockedForSecurity   The instance is locked due to security.   403   指定的實例被安全鎖定  
ResourcesNotInSameZone   The specified instance and disk are not in the same zone.   403   指定磁盤和實例不在同一個可用區(qū)  
InstanceExpiredOrInArrears   The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).   403   指定的實例已欠費  
DiskInArrears   The specified operation is denied as your disk owing fee.   403   指定的磁盤已欠費  
IncorrectInstanceStatus   The current status of the resource does not support this operation.   400   指定的實例狀態(tài)不正確  
DiskError   IncorrectDiskStatus   403   不正常的磁盤狀態(tài)  

  示例

  請求示例

  https://ecs.aliyuncs.com/?action=AttachDisk

  &InstanceId=i-23jggx34b

  &DiskId=d-23jbf2v5m

  &<公共請求參數(shù)>

  返回示例

  XML格式:

  

  473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

  

  JSON格式:

  {

  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"