You can call this operation to query users who share a custom image. The response can be displayed by page. By default, ten entries are displayed on each page.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeImageSharePermission

The operation that you want to perform. Set the value to DescribeImageSharePermission.

ImageId String Yes m-282dz****

The ID of the custom image.

RegionId String Yes cn-hangzhou

The ID of the region to which the custom image belongs. You can call the DescribeRegions operation to query the most recent region list.

PageNumber Integer No 1

The page number of the page to return. Pages start from page 1.

Default value: 1

PageSize Integer No 10

The number of entries to return on each page. Valid values: 1 to 100

Default value: 10

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

RegionId String cn-hangzhou

The ID of the region to which the image belongs.

TotalCount Integer 1

The total number of entries returned.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

ImageId String m-282dz****

The ID of the custom image.

ShareGroups Array

The shared groups.

Group String all

The name of the shared group.

Accounts Array

The Alibaba Cloud accounts.

AliyunId String 1234567890

The ID of the Alibaba Cloud account.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeImageSharePermission
&ImageId=m-282dz****
&RegionId=cn-hangzhou &PageNumber=1 &PageSize=10 &<Common request parameters>

Sample success responses

XML format

<DescribeImageSharePermissionResponse>
      <ImageId>m-282dz****</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 format

{    "ShareGroups": {
        "ShareGroup": [
            {
                "Group": "all"
            }
        ]
    },
    "Accounts": {
        "Account": [
            {
                "AliyunId": "1234567890"
            }
        ]
    },
    "ImageId": "m-282dz****",
    "PageNumber": 1,
    "PageSize": 10,
    "RegionId": "cn-qingdao",
    "TotalCount": 1,
    "RequestId": "9AD96F49-0BE5-4868-A66A-224352549CEC"
}

Error codes

HTTP status code Error code Error message Description
400 MissingParameter The input parameter "RegionId" that is mandatory for processing this request is not supplied. The error message returned because the RegionId parameter is not specified.
400 MissingParameter The input parameter "ImageId" that is mandatory for processing this request is not supplied. The error message returned because the ImageId parameter is not specified.
404 InvalidImageId.NotFound The specified ImageId does not exist. The error message returned because the specified image does not exist under this account. Check whether the image ID is correct.

For a list of error codes, visit the API Error Center.