create_static_route
Create a static route on a Tier-0 or Tier-1 gateway for destinations not covered by connected or advertised routes, such as a VPN or external subnet.
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.
Args: tier1_id: Gateway ID (Tier-0 or Tier-1, per gateway_type), from list_tier0_gateways / list_tier1_gateways. route_id: Unique id (alphanumerics, hyphens, underscores only). network: Destination network in CIDR notation, e.g. "10.0.0.0/8". next_hop: Next-hop IPv4 address, e.g. "192.168.1.254". gateway_type: Either "tier0" or "tier1" (default "tier1"). target: NSX Manager target from config (default if omitted).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| network | Yes | ||
| next_hop | Yes | ||
| route_id | Yes | ||
| tier1_id | Yes | ||
| gateway_type | No | tier1 |