> 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/vm/disk/resizedisk.md).

# ResizeDisk

## 1. API Description

This API (ResizeDisk) is used to resize a disk to a specified size.

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

* <mark style="color:blue;">Only disk expansion is supported currently.</mark>
* <mark style="color:blue;">This API is an async API. You can use</mark> [<mark style="color:purple;">`DescribeDisks`</mark>](/api-reference/compute/vm/disk/describedisks.md) <mark style="color:blue;">to query the status of the disk. If disk has been queried with the</mark> <mark style="color:blue;">`CHANGING`</mark> <mark style="color:blue;">status,</mark> <mark style="color:blue;">it means that the disk</mark> <mark style="color:blue;">is being expanding.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type    | Description                                                                                                                            |
| -------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| diskId         | Yes      | String  | Disk ID.                                                                                                                               |
| diskSize       | Yes      | Integer | <p>Disk size after expansion.</p><p>Unit: GB.</p><p>The value must be larger than the current one, and the upper limit is 2000 GB.</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> |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Resize the disk to `100` GB.**

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

Request:
{
  "diskId": "your-disk-id",
  "diskSize": 100
}

Response:
{
  "requestId": "TE742A21A-C449-41AF-8853-1B62A93AA4E5",
  "response": {
    "requestId": "TE742A21A-C449-41AF-8853-1B62A93AA4E5"
  }
}
```

{% 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 |
| ---------------- | ---------- | ----------- |
