# ModifyCloudRouterEdgePoint

## 1. 接口描述

调用本接口用于修改三层网络中边缘连接点的配置信息，包括BPG连接配置，静态路由等。

{% hint style="info" %}
**注意事项**

* 仅当三层网络专线状态为**RUNNING**时，才能进行配置的变更操作。
* 本接口为异步接口，此时带宽修改操作并未立即完成。在此期间实例的状态将会处于**UPDATING**，结果可以通过调用[DescribeCloudRouters](https://docs.console.zenlayer.com/api-reference/cn/networking/sdn/router/describe-cloud-routers)接口查询，如果状态(cloudRouterStatus)由 **UPDATING**(修改中)变为**RUNNING**(可用)，则代表配置更新成功。
* 在变更带宽期间，不得对该三层网络专线进行其他任何操作。
  {% endhint %}

## 2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

<table><thead><tr><th width="186">参数名称</th><th width="96.15625">必选</th><th width="162">类型</th><th>描述</th></tr></thead><tbody><tr><td>edgePointId</td><td>是</td><td>String</td><td>三层网络连接点的ID。</td></tr><tr><td>cloudRouterId</td><td>是</td><td>String</td><td>连接点关联的三层网络ID。</td></tr><tr><td>bgpConnection</td><td>否</td><td><a href="#bgpconnection">BGPConnection</a></td><td>BGP连接配置信息。<br>BGP和静态路由配置二者二选其一。</td></tr><tr><td>staticRoutes</td><td>否</td><td>Array of <a href="https://github.com/zenlayer/zenlayercloud-api-doc-cn/blob/main/luo-jin-shu/eip/releaseeipaddresses.md">IpRoute</a></td><td>静态路由配置信息。<br>BGP和静态路由配置二者二选其一。</td></tr><tr><td>bandwidthMbps</td><td>否</td><td>Integer</td><td><p>需要修改的带宽限速。<br>大小在1-500。</p><p>单位：Mbps。</p></td></tr><tr><td>ipAddress</td><td>否</td><td>String</td><td>IP地址信息。</td></tr></tbody></table>

## 3. 响应结果

<table><thead><tr><th width="136.33333333333331">参数名称</th><th width="248">类型</th><th>描述</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td><p>唯一请求 ID。</p><p>每次请求都会返回。定位问题时需要提供该次请求的 RequestId。</p></td></tr></tbody></table>

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}
**1. 修改三层网络连接点的带宽为100Mbps并设置BGP 配置.**

```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. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的[开发工具集（SDK）](https://docs.console.zenlayer.com/api-reference/cn/api-introduction/toolkit)，未来会陆续支持更多开发语言，方便快速接入和使用Zenlayer的产品和服务。

## 6. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](https://docs.console.zenlayer.com/api-reference/cn/api-introduction/instruction/commonerrorcode)

<table><thead><tr><th width="163">HTTP状态码</th><th width="325">错误码</th><th>说明</th></tr></thead><tbody><tr><td>400</td><td>INVALID_BANDWIDTH_EXCEED_LIMIT</td><td>带宽大小超限制。</td></tr><tr><td>409</td><td>INVALID_CLOUD_ROUTER_STATUS</td><td>状态不可用，无法进行操作。</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/cn/networking/sdn/router/modify-cloudrouter-edgepoint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
