create_static_route
Create a static route on a Tier-0 or Tier-1 gateway for destinations not covered by connected routes. Provide network CIDR and next-hop address to add the route.
Instructions
[WRITE] Create a static route on a Tier-0 or Tier-1 gateway via the Policy API.
Use this for destinations not covered by connected or advertised routes, e.g. a VPN or external subnet. Run list_static_routes first to avoid an id clash — the same route_id overwrites (PUT). For the Tier-0 to advertise a Tier-1's static route upstream, the gateway needs TIER1_STATIC_ROUTES advertisement, set via update_tier1_gateway. Returns the created route dict, else {"error", "hint"}. Then confirm with list_static_routes; delete_static_route is the inverse.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | NSX Manager target from config (default if omitted). | |
| network | Yes | Destination network in CIDR notation, e.g. "10.0.0.0/8". | |
| next_hop | Yes | Next-hop IPv4 address, e.g. "192.168.1.254". | |
| route_id | Yes | Unique id (alphanumerics, hyphens, underscores only). | |
| tier1_id | Yes | Gateway ID (Tier-0 or Tier-1, per gateway_type), from list_tier0_gateways / list_tier1_gateways. | |
| gateway_type | No | Either "tier0" or "tier1" (default "tier1"). | tier1 |