更新路由器
功能介绍
更新路由器。
调试
您可以在API Explorer中调试该接口。
URI
PUT /v2.0/routers/{router_id}
请求参数
| 参数名称 | 是否必选 | 类型 | 说明 | 
|---|---|---|---|
| name | 否 | String | 路由器的名称。 【使用说明】 1-64个字符,仅支持数字、字母、_(下划线)、-(中划线)、.(点)。 | 
| admin_state_up | 否 | Boolean | 管理状态。 【取值范围】 只支持true。 | 
| external_gateway_info | 否 | external_gateway_info object | 扩展属性:外部网关信息,参见external_gateway_info对象 | 
| routes | 否 | Array of route objects | 扩展属性:路由信息列表,参见routes对象 | 
请求示例
更新id为f5dbdfe0-86f9-4b0a-9a32-6be143f0a076的路由器,名称更新为router-220。
PUT https://{Endpoint}/v2.0/routers/f5dbdfe0-86f9-4b0a-9a32-6be143f0a076
{
    "router": {
           "name": "router-220"
    }
}
  响应参数
| 参数名称 | 类型 | 说明 | 
|---|---|---|
| id | String | 路由器的id 【使用说明】在查询路由器列表时非必选 | 
| name | String | 路由器的名称。 仅支持数字、字母、_(下划线)、-(中划线)、.(点)。 | 
| admin_state_up | Boolean | 管理状态。 只支持true。 | 
| status | String | 状态,可以为ACTIVE, DOWN,ERROR。 | 
| tenant_id | String | 项目ID | 
| external_gateway_info | external_gateway_info object | 扩展属性:外部网关信息,参见external_gateway_info对象 | 
| routes | Array of route objects | 扩展属性:路由信息列表,参见routes对象 | 
| project_id | String | 项目ID,请参见获取项目ID。 | 
| created_at | String | 资源创建时间,UTC时间 格式:yyyy-MM-ddTHH:mm:ss | 
| updated_at | String | 资源更新时间,UTC时间 格式:yyyy-MM-ddTHH:mm:ss | 
响应示例
{
    "router": {
        "id": "f5dbdfe0-86f9-4b0a-9a32-6be143f0a076",
        "name": "router-220",
        "status": "ACTIVE",
        "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "admin_state_up": true,
        "external_gateway_info": {
            "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
            "enable_snat": false
        },
        "routes": [],
        "created_at": "2018-09-20T02:06:07",
        "updated_at": "2018-09-20T02:06:09"
    }
}
  状态码
请参见状态码。
错误码
请参见错误码。
 
  