> 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/zec/vpc-network/cross-region-bandwidth/modifycrossregionbandwidth.md).

# ModifyCrossRegionBandwidth

## 1. API Description

This API (ModifyCrossRegionBandwidth) is used to adjust a VPC cross-region bandwidth.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name         | Required | Type    | Description                                                                                                                                                                                                                                                                                                               |
| ---------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| crossRegionBandwidthId | Yes      | String  | <p>ID of the VPC cross-region bandwidth to be adjusted.</p><p>It can be obtained by calling <a href="/api-reference/zec/vpc-network/cross-region-bandwidth/describecrossregionbandwidth.md">DescribeCrossRegionBandwidth</a>.</p>                                                                                         |
| bandwidth              | Yes      | Integer | <p>Bandwidth cap.</p><p>Unit: Mbps.</p><p>When the billing type is <code>ByBandwidth</code>, it must be different from the original bandwidth. When the billing type is <code>ByInstanceBandwidth95</code>, at least one of this parameter and <code>bandwidthCap</code> must be modified.</p><p>Value range: \[1, +)</p> |
| bandwidthCap           | No       | Integer | <p>Burstable bandwidth.</p><p>Unit: Mbps.</p><p>It is valid only when the billing type is <code>ByInstanceBandwidth95</code>, and remains unchanged when it is not specified.</p><p>Value range: \[1, +)</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" %}
**1. Adjust a VPC cross-region bandwidth whose network mode is `ByBandwidth` and change the bandwidth to 500 Mbps.**

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

Request：
{
  "crossRegionBandwidthId": "<your cross id>",
  "bandwidth": 500
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
  }
}
```

**2. Adjust a VPC cross-region bandwidth whose network mode is `ByInstanceBandwidth95`, changing the committed bandwidth to 500 Mbps and the burstable bandwidth to 1000 Mbps.**

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

Request：
{
  "crossRegionBandwidthId": "<your cross id>",
  "bandwidth": 500,
  "bandwidthCap": 1000
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
  }
}
```

**3. Adjust a VPC cross-region bandwidth whose network mode is `ByInstanceBandwidth95`, changing the committed bandwidth to 500 Mbps while keeping the burstable bandwidth unchanged.**

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

Request：
{
  "crossRegionBandwidthId": "<your cross id>",
  "bandwidth": 500
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
  }
}
```

**4. Adjust a VPC cross-region bandwidth whose network mode is `ByInstanceBandwidth95`, keeping the committed bandwidth unchanged and changing the burstable bandwidth to 1000 Mbps.**

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

Request：
{
  "crossRegionBandwidthId": "<your cross id>",
  "bandwidthCap": 1000
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
  }
}
```

{% 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                                                                         |
| ---------------- | ----------------------------------------- | ----------------------------------------------------------------------------------- |
| 404              | INVALID\_VPC\_BANDWIDTH\_NOT\_FOUND       | The VPC cross-region bandwidth does not exist.                                      |
| 400              | OPERATION\_DENIED\_VPC\_BANDWIDTH\_STATUS | Operations on the VPC cross-region bandwidth with current status are not supported. |
