AddVRouterRouteEntry
AddVRouterRouteEntry
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
routeTableUuidStringRequiredThe vRouter route table UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
descriptionStringOptional. The detailed description of the resource.
typeStringOptional. The type. You can add two types of routes: static route and black hole route. The system will automatically determine the type by judging whether to enter the next hop.
destinationStringRequiredThe destination network address, in CIDR format. If you enter a non-standard CIDR, note that the system will automatically transform it to the standard CIDR format.
targetStringOptional. The next hop address. The IP address that can be accessed directly by vRouter VM instances. If the IP address cannot be accessed directly, the route recursion will be triggered.
distanceIntegerOptional. The route priority. In the minimum match mode, if multiple route rules are available, the rule with the lowest integer has the highest priority to be matched.
resourceUuidStringOptional. The resource UUID.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vrouter-route-tables/{routeTableUuid}/route-entries
/zstack/v1/vrouter-route-tables/{routeTableUuid}/route-entries
Request Example
curl -X POST 'http://{host}/zstack/v1/vrouter-route-tables/{routeTableUuid}/route-entries' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"description":"<description>","type":"<type>","destination":"<destination>","target":"<target>","distance":1,"resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "description": "Test route", "type": "UserStatic", "routeTableUuid": "5dad5ac78c3642088dc3ed6bc4d8c853", "destination": "192.168.2.0/24", "target": "172.20.1.1", "distance": 128.0 } }Change History
This API has no change history records yet.
