最近更新时间:2023.07.07 10:54:52
首次发布时间:2022.07.01 09:24:00
调用 ModifyImageSharePermission 接口管理镜像共享权限。
注意
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ModifyImageSharePermission | 要执行的操作,取值:ModifyImageSharePermission。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
ImageId | String | 是 | image-ebgy1og99tfct0gw**** | 镜像ID。您可以调用DescribeImages接口并传入Visibility=private 参数,查询获取自定义镜像ID。 |
AddAccounts.N | String | 否 | AddAccounts.1=210005**** | 添加共享的账户。最多支持50个账户。
|
RemoveAccounts.N | String | 否 | RemoveAccounts.1=210000**** | 删除共享的账户。
|
操作接口仅返回公共参数及错误码。
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不能为空。 |
400 | InvalidImageStatus | The specified image is not in the correct status for the request. | 当前镜像状态不支持此操作。 |
400 | MissingParameter.AddAccountsAndRemoveAccounts | The required parameter AddAccountsAndRemoveAccounts is not supplied. | 指定的参数AddAccounts 和RemoveAccounts 同时不存在。 |
400 | LimitExceeded.MaximumShareImageAccount | You've reached the limit on the number of account that you can share. | 指定的单个镜像共享账户超过限制。 |
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
400 | InvalidAccount.Malformed | The specified Account is malformed. | 指定的账户不合法。 |
404 | InvalidImage.NotFound | The specified image does not exist. | 指定的镜像不存在。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |