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

DescribeImageSharePermission

最近更新时间2023.11.20 19:38:34

首次发布时间2022.07.01 09:23:41

调用 DescribeImageSharePermission 接口查询自定义镜像已经共享的所有用户。

调试

请求参数

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

NextToken

String

-

分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的NextToken参数值。

MaxResults

Integer

10

分页查询时设置的每页行数:

  • 默认值:15
  • 最大值:100

返回数据

名称类型示例值描述
ImageIdStringimage-ebgy1og99tfct0gw****镜像ID。
AccountsArray of struct-镜像共享的账户,具体请参见下表“ Accounts 结构 ”。

NextToken

String

bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******

本次调用返回的查询凭证值,返回为空表示该页为末页。

Accounts 结构

名称类型示例值描述
AccountIdString210005****账户ID。

请求示例

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

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202106111445100102252431000052****",
        "Action": "DescribeImageSharePermission",
        "Version": "2020-04-01",
        "Service": "ecs",
        "Region": "cn-beijing"
    },
    "Result": {
        "NextToken":"bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******",
        "ImageId": "image-ebgy1og99tfct0gw****",
        "Accounts": [
            {
                "AccountId": "210005****"
            }
        ]
    }
}

错误码

HttpCode错误码错误信息描述
400InvalidArgumentThe specified argument is invalid.指定的参数不合法。

400

MissingParameter.ImageId

The required parameter ImageId is not supplied.

镜像ID不能为空。

404InvalidImage.NotFoundThe specified image does not exist.指定的镜像不存在。
500InternalErrorAn internal error has occurred.内部错误,请重试。如果多次尝试失败,请提交工单。