# DescribeImageQuota

## 1. API Description

This API is used to query the quota of images in the zone.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">Up to 5 images can be created in each zone. If you need more, please contact Zenlayer Support.</mark>
{% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type            | Description                                                                                                                                 |
| -------------- | -------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| zoneIds        | No       | Array of String | <p>Zone ID.<br>Call <a href="../common-info/describezones"><code>DescribeZones</code></a> and find <code>zoneId</code> in the response.</p> |

## 3. Output Parameters

| Parameter Name | Type                                                                                                                 | Description                                                                                              |
| -------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                                               | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
| images         | Array of [ImageQuotaInfo](https://docs.console.zenlayer.com/test/ci-develop-en/compute/datastructure#imagequotainfo) | Information on image quota.                                                                              |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the quotas of images in different zones.**

```json
POST /api/v2/vm HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeImageQuota
<Common Request Params>

Request:
{
  "zoneIds": [
    "FRA-A",
    "HKG-A"
  ]
}

Response:
{
  "requestId": "T56C2FE84-40CC-4A84-A68B-D5EB12A03768",
  "response": {
    "requestId": "T56C2FE84-40CC-4A84-A68B-D5EB12A03768",
    "images": [
      {
        "count": 2,
        "zoneId": "FRA-A",
        "maxCount": 5
      },
      {
        "count": 3,
        "zoneId": "HKG-A",
        "maxCount": 5
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/test/ci-develop-en/api-introduction/software-toolkit/sdk) to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/test/ci-develop-en/api-introduction/instruction/commonerrorcode).​

| HTTP Status Code | Error Code                  | Description     |
| ---------------- | --------------------------- | --------------- |
| **404**          | INVALID\_REGION\_NOT\_FOUND | Zone not found. |
