# ModifyCloudRouterEdgePoint

## 1. API Description

This API is used to modify configurations of access points in a cloud router, including BGP and static routing configurations.

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

* <mark style="color:blue;">Only operations on cloud routers in state of RUNNING 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 operation has been completed. The status of the cloud router will be</mark> <mark style="color:blue;">`UPDATING`</mark> <mark style="color:blue;">during the operation. You can use</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 status of the cloud router. If</mark> <mark style="color:blue;">`cloudRouterStatus`</mark> <mark style="color:blue;">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 cloud router 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>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="187">Parameter Name</th><th width="119.15625">Required</th><th width="164">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>bgpConnection</td><td>No</td><td><a href="#bgpconnection">BGPConnection</a></td><td>BGP routing.<br>One of BGP and Static routing must be specified.</td></tr><tr><td>staticRoutes</td><td>No</td><td>Array of <a href="https://github.com/zenlayer/zenlayercloud-api-doc-en/blob/main/luo-jin-shu/eip/releaseeipaddresses.md">IpRoute</a></td><td>Static routing.<br>One of BGP and Static routing must be specified.</td></tr><tr><td>bandwidthMbps</td><td>No</td><td>Integer</td><td><p>Access bandwidth of the access point, ranging from 1 to 500.</p><p>Unit: Mbps.</p></td></tr><tr><td>ipAddress</td><td>No</td><td>String</td><td>IP address.</td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="190.33333333333331">Parameter Name</th><th width="101">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 access bandwidth of access points to 100 Mbps and modify BGP routing.**

```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,
    "bpgConnection": {
        "peerIpAddress":"10.10.0.1/16",
        "peerAsn":1000,
        "password":"md5"
      }    
    }
}

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="207">HTTP Status Code</th><th width="215">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>
