Query the list of image sharing accounts

Last Updated: Jun 28, 2017

Description

This operation allows you to list users where a custom image is shared. It also supports querying by page. By default, ten results are displayed per page.

Request parameters

Name Type Required Description
Action String Yes Value: DescribeImageSharePermission.
RegionId String Yes Indicates the RegionID of the image.
ImageId String No Indicates the ID of an image.
PageNumber Integer No Refers to the page number of the list. The start value is 1; the default value is 1.
PageSize Integer No Sets the number of lines per page for queries per page. The maximum value is 50; the default value is 10.

Return parameters

Name Type Description
ImageId String Indicates the ID of the image.
RegionId String Indicates the region ID of the image.
ShareGroups ShareGroupType Indicates the type of the shared group.
Accounts AccountType Indicates the type of the Aliyun account.
TotalCount Integer Refers to the total number of records.
PageNumber Integer Refers to the page number.
PageSize Integer Indicates the maximum number of lines per page. The default value is 10; the maximum value is 50.

Error code

Error code Description Http status code Meaning
InvalidRegionId.NotFound The source region not found. 404 The specified regionId does not exist.
InvalidImageId.NotFound The specified ImageId does not exist. 404 The specified ImageId does not exist.
IncorrectImageStatus The image has completed copy. 400 The specified image has been replicated. The cancellation failed.
IncorrectImageStatus The image is not from copied. 400 The specified image is not created by means of replication. The cancellation failed.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=DescribeImageSharePermission
  2. &RegionId=cn-qingdao
  3. &ImageId=m-282dzntc7
  4. &<Public Request Parameters>

Return example

XML format

  1. <DescribeImageSharePermissionResponse>
  2. <ImageId>m-282dzntc7</ImageId>
  3. <PageNumber>1</PageNumber>
  4. <PageSize>10</PageSize>
  5. <RegionId>cn-qingdao</RegionId>
  6. <TotalCount>1</TotalCount>
  7. <RequestId>441CF898-42FF-47CF-9348-3C3BFF557278</RequestId>
  8. <ShareGroups>
  9. <ShareGroup>
  10. <Group>all</Group>
  11. </ShareGroup>
  12. </ShareGroups>
  13. <Accounts>
  14. <Account>
  15. <AliyunId>1886508529898586</AliyunId>
  16. </Account>
  17. </Accounts>
  18. </DescribeImageSharePermissionResponse>

JSON format

  1. {
  2. "ShareGroups": {
  3. "ShareGroup": [
  4. {
  5. "Group": "all"
  6. }
  7. ]
  8. },
  9. "Accounts": {
  10. "Account": [
  11. {
  12. "AliyunId": "1886508529898586"
  13. }
  14. ]
  15. },
  16. "ImageId": "m-282dzntc7",
  17. "PageNumber": 1,
  18. "PageSize": 10,
  19. "RegionId": "cn-qingdao",
  20. "TotalCount": 1,
  21. "RequestId": "9AD96F49-0BE5-4868-A66A-224352549CEC"
  22. }
Thank you! We've received your feedback.