# ModifyCloudRouterEdgePointBandwidth

## 1. API Description

This API is used to modify access bandwidth of access point in a Layer 3 cloud router.

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

* <mark style="color:blue;">Only operations on cloud routers in state of</mark> <mark style="color:blue;">`RUNNING`</mark> <mark style="color:blue;">are supported.</mark>
* <mark style="color:blue;">This API is an async API. A request ID is returned after the request is sent. However, it does not mean the modifying has been completed. The status of the cloud router will be</mark> <mark style="color:blue;">`UPDATING`</mark> <mark style="color:blue;">during the modifying. You can call</mark> [<mark style="color:purple;">`DescribeCloudRouters`</mark>](https://docs.console.zenlayer.com/api-reference/networking/sdn/router/describe-cloud-routers) <mark style="color:blue;">to query the state of the cloud router. If the state changes from</mark> <mark style="color:blue;">`UPDATING`</mark> <mark style="color:blue;">to</mark> <mark style="color:blue;">`RUNNING`</mark><mark style="color:blue;">, it means that the access bandwidth has been modified successfully.</mark>
* <mark style="color:blue;">Any operations on the</mark> <mark style="color:blue;">cloud routers</mark> <mark style="color:blue;">are not allowed while modifying.</mark>
* <mark style="color:blue;">If a Layer 3 Cloud Router contains a public cloud access point and the Cloud Connect access bandwidth has not been configured separately, this operation automatically adjusts it to the nearest cap higher than the new backbone bandwidth. You can configure Cloud Connect access bandwidth separately by calling the</mark> [<mark style="color:purple;">`ModifyCloudBandwidth`</mark>](https://docs.console.zenlayer.com/api-reference/networking/sdn/cloud/modifycloudbandwidth) <mark style="color:blue;">API.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="191">Parameter Name</th><th width="118.15625">Required</th><th width="99">Type</th><th>Description</th></tr></thead><tbody><tr><td>edgePointId</td><td>Yes</td><td>String</td><td>Access point ID.</td></tr><tr><td>cloudRouterId</td><td>Yes</td><td>String</td><td>Cloud router ID.</td></tr><tr><td>bandwidthMbps</td><td>Yes</td><td>Integer</td><td><p>Access bandwidth of the access point, ranging from 1 to 500.</p><p>Unit: Mbps.</p></td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="193.33333333333331">Parameter Name</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Modify the access bandwidth of access points in a cloud router to 100 Mbps.**

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

Request：
{
    "cloudRouterId": "your-cloud-router-id",
    "edgePointId": "one-of-egdgePoint-id",
    "bandwidthMbps": 100
}

Response：
{   
  "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E",
  "response": {
     "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E"，
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-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/api-reference/api-introduction/instruction/commonerrorcode).​

<table><thead><tr><th width="199">HTTP Status Code</th><th width="185">Error Code</th><th>Description</th></tr></thead><tbody><tr><td>400</td><td>INVALID_BANDWIDTH_EXCEED_LIMIT</td><td>Access bandwidth exceeds the limit.</td></tr><tr><td>409</td><td>INVALID_CLOUD_ROUTER_STATUS</td><td>Only operations on cloud routers in state of <code>RUNNING</code> are supported.</td></tr></tbody></table>
