tencent cloud

Feedback

DescribeImage

Last updated: 2023-08-18 15:47:45

1. API Description

Domain name for API request: ecm.tencentcloudapi.com.

This API is used to display the list of images.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeImage.
Version Yes String Common Params. The value used for this API: 2019-07-19.
Region No String Common Params. This parameter is not required for this API.
Filters.N No Array of Filter Filter. Each request can contain up to 10 Filters. The detailed filters are as follows:
image-id - String - Required: no - (Filter) Filter by image ID.
image-type - String - Required: no - (Filter) Filter by image type. Valid values:
PRIVATE_IMAGE: private image created by the current account
PUBLIC_IMAGE: public image created by Tencent Cloud
instance-type -String - Required: no - (Filter) Filter supported images by model.
image-name - String - Required: no - (Filter) Fuzzy match by image name. You can provide only one value.
image-os - String - Required: no - (Filter) Fuzzy match by image system name. You can provide only one value.
Offset No Integer Offset. Default value: 0. For more information on Offset, see the relevant section of the API overview.
Limit No Integer Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit, see the relevant section of the API overview.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of images
ImageSet Array of Image Image array
Note: this field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Displaying image list

This example shows you how to display the list of images.

Input Example

https://ecm.tencentcloudapi.com/?Action=DescribeImage
&Offset=0
&Limit=10
&Filters.0.Name=image-type
&Filters.0.Values.0=PRIVATE_IMAGE
&<Common request parameters>

Output Example

{
    "Response": {
        "RequestId": "51e18e32-9bb8-4b1d-a7ac-92040fab2949",
        "ImageSet": [
            {
                "ImageId": "img-060ov1xz",
                "ImageName": "CentOS 6.9 32-bit",
                "ImageState": "NORMAL",
                "ImageType": "PRIVATE_IMAGE",
                "ImageOwner": 251006057,
                "ImageOsName": "CentOS 6.9 32-bit",
                "ImageDescription": "CentOS 6.9 32-bit",
                "Architecture": "i386",
                "OsType": "CentOS",
                "Platform": "",
                "OsVersion": "CentOS 6.9 32-bit",
                "ImageCreateTime": "2019-07-22 20:48:14",
                "ImageSize": 50,
                "ImageSource": "xx",
                "SrcImage": {
                    "ImageDescription": "xx",
                    "InstanceId": "xx",
                    "Region": "xx",
                    "RegionID": 0,
                    "ImageId": "xx",
                    "ImageName": "xx",
                    "RegionName": "xx",
                    "InstanceName": "xx",
                    "ImageType": "xx",
                    "ImageOsName": "xx"
                }
            },
            {
                "ImageId": "img-1tyt4apn",
                "ImageName": "CentOS 7.4 Bare Metal 64-bit",
                "ImageState": "NORMAL",
                "ImageType": "PRIVATE_IMAGE",
                "ImageOwner": 251006057,
                "ImageOsName": "CentOS 7.4 Bare Metal 64-bit",
                "ImageDescription": "CentOS 7.4 Bare Metal 64-bit",
                "Architecture": "x86_64",
                "OsType": "CentOS",
                "Platform": "",
                "OsVersion": "CentOS 7.4 Bare Metal 64-bit",
                "ImageCreateTime": "2019-07-22 20:48:14",
                "ImageSize": 50,
                "ImageSource": "xx",
                "SrcImage": {
                    "ImageDescription": "xx",
                    "InstanceId": "xx",
                    "Region": "xx",
                    "RegionID": 0,
                    "ImageId": "xx",
                    "ImageName": "xx",
                    "RegionName": "xx",
                    "InstanceName": "xx",
                    "ImageType": "xx",
                    "ImageOsName": "xx"
                }
            }
        ],
        "TotalCount": 20
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.ImageInUse The image is in use.
FailedOperation.InternalOperationFailure Internal error.
InvalidParameter.InvalidDataFormat The data format is incorrect.
InvalidParameterValue.InvaildPageParam The pagination parameter is invalid.
InvalidParameterValue.InvalidFilter The filter is invalid.
InvalidParameterValue.InvalidImageID The image ID is invalid.
InvalidParameterValue.ParameterValueTooLarge The parameter value exceeds the limit.
MissingParameter.MissingImageParameter The image operation parameters are incomplete.
UnauthorizedOperation.ForbiddenOperation You don't have the permission to perform this operation.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support