You need to enable JavaScript to run this app.
文档中心
云服务器

云服务器

复制全文
下载 pdf
镜像
ModifyImageSharePermission - 修改镜像共享信息
复制全文
下载 pdf
ModifyImageSharePermission - 修改镜像共享信息
调用 ModifyImageSharePermission 接口,管理镜像共享权限。​
注意事项​
使用本功能的前提条件及注意事项,可查看注意事项。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ModifyImageSharePermission​
要执行的操作,取值:ModifyImageSharePermission。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
AddAccounts.N string[] 可选 示例值:AddAccounts.1=210005****&AddAccounts.2=210007****​
添加共享的账户。最多支持50个账户。​
  • 参数 - N:表示账户的序号。​
  • 多个账户之间用&分隔。​
​
ImageId string 必选 示例值:image-ebgy1og99tfct0gw****​
镜像ID。您可以调用DescribeImages接口并传入Visibility=private参数,查询获取自定义镜像ID。​
​
RemoveAccounts.N string[] 可选 示例值:RemoveAccounts.1=210000****&RemoveAccounts.2=210000****​
删除共享的账户。​
  • 参数 - N:表示账户的序号。​
  • 多个账户之间用&分隔。​
​
​
​
返回参数​
本接口无特有的返回参数。更多信息请见返回结构。​
请求示例​
​
GET /?Action=ModifyImageSharePermission&Version=2020-04-01&ImageId=image-ebgy1og99tfct0gw****&AddAccounts.1=210005**** HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
Service: ecs​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202106111445100102252431000052****",​
"Action": "ModifyImageSharePermission",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidAccount.Malformed​
The specified Account is malformed.​
指定的账户不合法。​
400​
InvalidArgument​
The specified argument is invalid.​
指定的参数不合法。​
400​
InvalidImageSharePermissionForRemove.UnSupported​
The specified image share permission cannot be used for remove.​
指定的镜像共享关系不支持删除,请至资源共享平台移除。​
400​
InvalidImageStatus​
The specified image is not in the correct status for the request.​
当前镜像的状态不支持此操作。​
400​
LimitExceeded.MaximumShareImageAccount​
You've reached the limit on the number of account that you can share.​
指定的单个镜像共享账户超过限制。​
400​
MissingParameter.AddAccountsAndRemoveAccounts​
The required parameter AddAccountsAndRemoveAccounts is not supplied.​
指定的参数AddAccounts和RemoveAccounts同时不存在。​
400​
MissingParameter.ImageId​
The required parameter ImageId is not supplied.​
镜像ID不能为空。​
404​
InvalidImage.NotFound​
The specified image does not exist.​
指定的镜像不存在。​
500​
InternalError​
An internal error has occurred.​
内部错误,请重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2025.12.09 10:40:43
这个页面对您有帮助吗?
有用
有用
无用
无用