虚拟私有云 VPC-更新路由表:请求示例

时间:2024-10-12 09:48:13

请求示例

  • 更新id为3d42a0d4-a980-4613-ae76-a2cddecff054的路由表,新增一条ecs类型的路由,修改一条ecs类型的路由,删除一条目的网段为20.20.10.0/24的路由。
    PUT https://{Endpoint}/v1/6fbe9263116a4b68818cf1edce16bc4f/routetables/3d42a0d4-a980-4613-ae76-a2cddecff054
    
    {
        "routetable": {
            "name": "routertable-789",
            "description": "abc",
            "routes": {
                "add": [
                    {
                        "type": "ecs",
                        "destination": "10.10.10.0/24",
                        "nexthop": "7c50463d-d36c-4417-aa85-cc11fa10f341",
                        "description": "abc"
                    }
                ],
                "mod": [
                    {
                        "type": "ecs",
                        "destination": "20.10.10.0/24",
                        "nexthop": "7c50463d-d36c-4417-aa85-cc11fa10f341",
                        "description": "abc"
                    }
                ],
                "del": [
                    {
                        "destination": "20.20.10.0/24"
                    }
                ]
            }
        }
    }

support.huaweicloud.com/api-vpc/vpc_apiroutetab_0004.html