> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/compute/zec/instance/describevminventorycapacity.md).

# DescribeVmInventoryCapacity

## 1. API Description

This API (DescribeVmInventoryCapacity) is used to query vm inventory capacity level information for each region.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type            | Description                                                                                                |
| -------------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
| regionIds      | No       | Array of String | <p>List of region IDs in the format of asia-north-1.</p><p>If not specified, all regions are returned.</p> |

## 3. Output Parameters

| Parameter Name | Type                                                                                              | Description                                                                                                           |
| -------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                            | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| remark         | String                                                                                            | Description of inventory capacity tiers, indicating the available vCPU core range for each tier.                      |
| dataSet        | Array of [VmRegionCapacityItem](/api-reference/compute/zec/datastructure.md#vmregioncapacityitem) | Inventory capacity list for each region.                                                                              |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query the VM inventory capacity of all regions.**

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

Request：
{}

Response:
{
  "requestId": "A1B2C3D4-0000-0000-0000-000000000001",
  "response": {
    "remark": "LIMITED: < 1000; NORMAL: 1000-2000; SUFFICIENT: 2000-5000; ABUNDANT: >= 5000.",
    "dataSet": [
      {
        "regionId": "sa-north-1",
        "capacity": "LIMITED",
        "instanceTypes": [
          {"instanceType": "z2a", "capacity": "LIMITED"}
        ]
      },
      {
        "regionId": "asia-southeast-1",
        "capacity": "LIMITED",
        "instanceTypes": [
          {"instanceType": "z2a", "capacity": "NORMAL"},
          {"instanceType": "z2a", "gpuSpec": "z4a.g.C49", "capacity": "LIMITED"}
        ]
      },
      {
        "regionId": "na-west-1",
        "capacity": "NORMAL",
        "instanceTypes": [
          {"instanceType": "z2a", "capacity": "SUFFICIENT"},
          {"instanceType": "z2i", "capacity": "NORMAL"}
        ]
      }
    ]
  }
}
```

**2. Query the VM inventory capacity of specified regions.**

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

Request：
{
  "regionIds": ["asia-southeast-1"]
}

Response:
{
  "requestId": "A1B2C3D4-0000-0000-0000-000000000002",
  "response": {
     "remark": "LIMITED: < 1000; NORMAL: 1000-2000; SUFFICIENT: 2000-5000; ABUNDANT: >= 5000.",
    "dataSet": [
      {
        "regionId": "asia-southeast-1",
        "capacity": "LIMITED",
        "instanceTypes": [
          {"instanceType": "z2a", "capacity": "NORMAL"},
          {"instanceType": "z2a", "gpuSpec": "z4a.g.C49", "capacity": "LIMITED"}
        ]
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，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](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
