閱讀975 返回首頁    go 微信


管理鏡像共享__鏡像相關接口_API 參考_雲服務器 ECS-阿裏雲

描述

管理鏡像共享可以把用戶的自定義鏡像共享給其他阿裏雲賬號,該賬號可以使用共享的自定義鏡像進行創建實例和更換係統盤操作。

  • 用戶隻能把自己擁有的自定義鏡像共享給阿裏雲其他賬號。
  • 每個鏡像單次最多共享給 10 個賬號。單次最多可以刪除 10 個共享賬號。超過 10 係統會忽略該參數。
  • 每個用戶最多可以獲得 30 個共享鏡像。白名單可配置。
  • 每個鏡像最多可以共享給 50 個用戶。可以申請白名單,該賬號下的自定義鏡像可以共享給更多的用戶。
  • 如果鏡像的擁有者刪除共享給您的鏡像或者共享關係,您的已經使用的該共享鏡像的實例重置係統盤會失敗。

請求參數

名稱 類型 是否必須 描述
Action String 係統規定參數,取值:ModifyImageSharePermission
RegionId String 自定義鏡像所屬的 regionId
ImageId String 自定義鏡像的 Id
AddAccount.n String 添加鏡像共享的阿裏雲賬號 Id,n 的取值範圍 [1 - 10],超過 10 係統會忽略該參數
RemoveAccount.n String 刪除鏡像共享的阿裏雲賬號 Id,n 的取值範圍 [1 - 10],超過 10 係統會忽略該參數

返回參數

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

錯誤碼

錯誤代碼 描述 Http 狀態碼 語義
MissingParameter An input parameter "RegionId" that is mandatory for processing the request is not supplied. 400 缺少 RegionId 值
MissingParameter An input parameter "ImageId" that is mandatory for processing the request is not supplied. 400 缺少 ImageId 的值
InvalidRegionId.NotFound The specified region does not exist. 400 指定的 RegionId 不存在
InvalidImageId.NotFound The specified Image does not exist or not you onwer. 403 指定的鏡像 Id 不存在
IncorrectImageStatus The image is not available. 400 指定的鏡像狀態不正確
InvalidAccount.NotFound The specified parameter "AddAccount.n" or "RemoveAccount.n" does not exist. 404 指定的賬號不存在
QuotaExceed.ShareImage The share Image Quota exceeds. 403 已經超過自定義鏡像共享配額限製
QuotaExceed.ShareImageUser The shared image user quota exceeds. 403 已經超過單個鏡像共享給用戶數量的配額限製
InvalidAccount.Forbbiden The specified account does not yourself. 404 不能把鏡像共享給自己

示例

請求示例

https://ecs.aliyuncs.com/?Action=ModifyImageSharePermission
&RegionId=cn-hangzhou
&ImageId=m-281234567
&AddAccount.1=23412345234
&<公共請求參數>

返回示例

XML格式

<ModifyImageSharePermissionResponse>
    <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
</ModifyImageSharePermissionResponse>

JSON格式

{
    "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9"
}

最後更新:2016-11-23 16:03:50

  上一篇:go 取消複製鏡像__鏡像相關接口_API 參考_雲服務器 ECS-阿裏雲
  下一篇:go 查詢鏡像共享__鏡像相關接口_API 參考_雲服務器 ECS-阿裏雲