Queries all the authorized users to whom one of your custom image is shared. The responded information can be displayed on several pages. By default, 10 entries of record are displayed on each page.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: DescribeImageSharePermission.
RegionId String Yes ID of the region to where the custom image belongs. You can call DescribeRegions to obtain the latest region list.
ImageId String Yes ID of your custom image.
PageNumber Integer No The page number of the responded information. Initial value: 1.

Default value: 1.

PageSize Integer No The number of entries on each page for the responded information. Maximum value: 50.

Default value: 10.

Response parameters

Name Type Description
ImageId String ID of the custom image.
RegionId String Region ID of the custom image.
ShareGroups ShareGroupType Type of the shared group.
Accounts AccountType Type of the Alibaba Cloud user account.
TotalCount Integer Total number of entries.
PageNumber Integer Page number.
PageSize Integer Maximum number of entries on each page.

Examples

Request example
https://ecs.aliyuncs.com/?Action=DescribeImageSharePermission
&RegionId=cn-qingdao
&ImageId=m-282dzntc7
&<Common Request Parameters>
Response example

XML format

<DescribeImageSharePermissionResponse>
    <ImageId>m-282dzntc7</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>1886508529898586</AliyunId>
        </Account>
    </Accounts>
</DescribeImageSharePermissionResponse>
JSON format
{
    "ShareGroups": {
        "ShareGroup": [
            {
                "Group": "all"
            }
        ]
    },
    "Accounts": {
        "Account": [
            {
                "AliyunId": "1886508529898586"
            }
        ]
    },
    "ImageId": "m-282dzntc7",
    "PageNumber": 1,
    "PageSize": 10,
    "RegionId": "cn-qingdao",
    "TotalCount": 1,
    "RequestId": "9AD96F49-0BE5-4868-A66A-224352549CEC"
}

Error codes

Error codes specific to this interface are as follows. For more information, see API Error Center.

Error code Error message  HTTP status code  Meaning
MissingParameter The input parameter “RegionId “ that is mandatory for processing this request is not supplied. 400 You must specify the RegionId
MissingParameter The input parameter “ImageId “ that is mandatory for processing this request is not supplied. 400 You must specify the ImageId.
InvalidRegionId.NotFound The specified region does not exist. 404 The specified RegionId does not exist.
InvalidImageId.NotFound The specified ImageId does not exist. 404 The specified ImageId does not exist.