
# 查询镜像配额 - ShowImageQuota
#### 功能介绍
该接口为扩展接口，主要用于查询租户在当前Region的私有镜像的配额数量。
#### URI
GET /v1/{project_id}/cloudimages/quota
参数说明如下：
| 参数         | 是否必选 | 参数类型   | 描述   |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID |
   
#### 请求消息
请求参数
无
#### 请求示例
查询镜像配额。
```
GET https://{Endpoint}/v1/fd73a4a14a4a4dfb9771a8475e5198ea/cloudimages/quota
```
#### 响应消息
- 响应参数
  
  | 参数     | 参数类型   | 描述                                                                                 |
  |:---|:---|:---|
  | quotas | Object | 查询的配额信息。 详情请参见[表1]。 |
     
   表1quotas参数说明 
  | 参数        | 参数类型             | 描述                                                                                |
  |:---|:---|:---|
  | resources | Array of objects | 查询的配额信息。 详情请参见[表2]。 |
     
   表2quotas.resources参数说明 
  | 参数    | 参数类型    | 描述          |
  |:---|:---|:---|
  | type  | String  | 查询的资源类型。    |
  | used  | Integer | 已使用的资源配额。   |
  | quota | Integer | 查询出的资源的总配额。 |
  | min   | Integer | 资源的最小配额。    |
  | max   | Integer | 资源的最大配额。    |
     
  
- 响应样例
  ```
  STATUS CODE 200
  ```
  ```
  {
    "quotas": {
      "resources": [
        {
          "type": "image",
          "used": 0,
          "quota": 20,
          "min": 1,
          "max": 1000
        }
      ]
    }
  }
  ```
  
 
#### 返回值
- 正常 200
  
- 异常
  
  | 返回值                       | 说明                                                                              |
  |:---|:---|
  | 400 Bad Request           | 请求错误，具体返回错误码请参考[错误码](https://support.huaweicloud.com/api-ims/ims_03_0908.html)。 |
  | 401 Unauthorized          | 鉴权失败。                                                                           |
  | 403 Forbidden             | 没有操作权限。                                                                         |
  | 404 Not Found             | 找不到资源。                                                                          |
  | 500 Internal Server Error | 服务内部错误。                                                                         |
  | 503 Service Unavailable   | 服务不可用。                                                                          |
     
  
 
