You need to enable JavaScript to run this app.
导航

ModifyImageSharePermission

最近更新时间2023.11.20 19:39:22

首次发布时间2022.07.01 09:24:00

调用 ModifyImageSharePermission 接口管理镜像共享权限。

注意

  • 仅状态为“可用”的自定义镜像支持共享镜像。
  • 不能将已获取到的共享镜像共享给其他火山引擎账户。
  • 不支持跨地域共享镜像。
  • 共享给其他火山引擎账户的镜像无法直接删除,需先取消该镜像的全部共享关系后方可删除。
  • 获取到共享镜像的火山引擎账户,只可以使用共享镜像创建或重装实例,不能删除或修改共享镜像。
  • 共享镜像为用户私有镜像,火山引擎无法确保其安全性和完整性,请谨慎确认并使用来自于可信任的共享账户的共享镜像。

调试

请求参数

名称类型是否必填示例值描述
ActionStringModifyImageSharePermission要执行的操作,取值:ModifyImageSharePermission。
VersionString2020-04-01接口的版本,取值:2020-04-01。
ImageIdStringimage-ebgy1og99tfct0gw****镜像ID。您可以调用DescribeImages接口并传入Visibility=private参数,查询获取自定义镜像ID。

AddAccounts.N

String

AddAccounts.1=210005****

添加共享的账户。最多支持50个账户。

  • 参数 - N:表示账户的序号
  • 多个账户之间用&分隔

RemoveAccounts.N

String

RemoveAccounts.1=210000****

删除共享的账户。

  • 参数 - N:表示账户的序号
  • 多个账户之间用&分隔

返回数据

操作接口仅返回公共参数及错误码。

请求示例

GET /?Action=ModifyImageSharePermission&Version=2020-04-01&ImageId=image-ebgy1og99tfct0gw****&AddAccounts.1=210005**** HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
Service: ecs

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202106111445100102252431000052****",
        "Action": "ModifyImageSharePermission",
        "Version": "2020-04-01",
        "Service": "ecs",
        "Region": "cn-beijing"
    },
    "Result": {}
}

错误码

HttpCode
错误码
错误信息
描述

400

MissingParameter.ImageId

The required parameter ImageId is not supplied.

镜像ID不能为空。

400InvalidImageStatusThe specified image is not in the correct status for the request.当前镜像状态不支持此操作。
400MissingParameter.AddAccountsAndRemoveAccountsThe required parameter AddAccountsAndRemoveAccounts is not supplied.指定的参数AddAccountsRemoveAccounts同时不存在。

400

LimitExceeded.MaximumShareImageAccount

You've reached the limit on the number of account that you can share.

指定的单个镜像共享账户超过限制。

400InvalidArgumentThe specified argument is invalid.指定的参数不合法。
400InvalidAccount.MalformedThe specified Account is malformed.指定的账户不合法。
404InvalidImage.NotFoundThe specified image does not exist.指定的镜像不存在。
500InternalErrorAn internal error has occurred.内部错误,请重试。如果多次尝试失败,请提交工单。