调用DescribeImageSharePermission查询一份自定义镜像已经共享的所有用户。返回结果支持分页显示,每页的信息条目默认为10条。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | DescribeImageSharePermission | 系统规定参数。取值:DescribeImageSharePermission |
| ImageId | String | 是 | m-bp1caf3yicx5jlfl**** | 自定义镜像ID。 |
| RegionId | String | 是 | cn-hangzhou | 自定义镜像所属的地域ID。您可以调用DescribeRegions查看最新的阿里云地域列表。 |
| PageNumber | Integer | 否 | 1 | 查询结果显示的页码。起始值:1 默认值:1 |
| PageSize | Integer | 否 | 10 | 查询结果显示的每页的信息条目数。最大值:100 默认值:10 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Accounts | Array of Account | 阿里云注册用户。 |
|
| Account | |||
| AliyunId | String | 1234567890 | 阿里云账号ID。 |
| ImageId | String | m-bp1caf3yicx5jlfl**** | 自定义镜像ID。 |
| PageNumber | Integer | 1 | 查询结果显示的页码。 |
| PageSize | Integer | 10 | 每页的信息条目数。 |
| RegionId | String | cn-hangzhou | 镜像所属地域ID。 |
| RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E | 请求ID。 |
| ShareGroups | Array of ShareGroup | 共享组。 |
|
| ShareGroup | |||
| Group | String | all | 共享分组。 |
| TotalCount | Integer | 1 | 记录总数。 |
示例
请求示例
https://ecs.aliyuncs.com/?Action=DescribeImageSharePermission &ImageId=m-bp1caf3yicx5jlfl**** &RegionId=cn-hangzhou &PageNumber=1 &PageSize=10 &<公共请求参数>
正常返回示例
XML 格式
<DescribeImageSharePermissionResponse>
<ImageId>m-bp1caf3yicx5jlfl****</ImageId>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<RegionId>cn-qingdao</RegionId>
<TotalCount>1</TotalCount>
<RequestId>441CF898-42FF-47CF-9348-3C3BFF557278</RequestId>
<ShareGroups>
<ShareGroup>
<Group>all</Group>
</ShareGroup>
</ShareGroups>
<Accounts>
<Account>
<AliyunId>1234567890</AliyunId>
</Account>
</Accounts>
</DescribeImageSharePermissionResponse>
JSON 格式
{
"ShareGroups": {
"ShareGroup": [
{
"Group": "all"
}
]
},
"Accounts": {
"Account": [
{
"AliyunId": "1234567890"
}
]
},
"ImageId": "m-bp1caf3yicx5jlfl****",
"PageNumber": 1,
"PageSize": 10,
"RegionId": "cn-qingdao",
"TotalCount": 1,
"RequestId": "9AD96F49-0BE5-4868-A66A-224352549CEC"
}
错误码
| HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | MissingParameter | The input parameter "RegionId "that is mandatory for processing this request is not supplied. | 参数RegionId不能为空。 |
| 400 | MissingParameter | The input parameter "ImageId "that is mandatory for processing this request is not supplied. | 参数ImageId不能为空。 |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | 指定的镜像在该用户账号下不存在,请您检查镜像ID是否正确。 |
访问错误中心查看更多错误码。