create_segment
Create an overlay or VLAN-backed NSX network segment. Specify transport zone path, subnet for overlay or VLAN IDs for VLAN-backed zones.
Instructions
[WRITE] Create an overlay or VLAN-backed NSX network segment.
Run list_transport_zones first for transport_zone_path; it decides whether subnet or vlan_ids applies — the wrong one is rejected. The same segment_id overwrites (PUT). Returns the created segment dict, else {"error", "hint"}. A segment with no gateway is isolated: link it with create_tier1_gateway, then verify with get_segment.
Args: segment_id: Unique id (alphanumerics, hyphens, underscores only); becomes /infra/segments/. display_name: UI display name. transport_zone_path: Full path, e.g. "/infra/sites/default/enforcement-points/default/transport-zones/". vlan_ids: VLAN ID(s) for a VLAN-backed zone, e.g. "100,200". subnet: Gateway IP in CIDR for an overlay zone, e.g. "192.168.1.1/24" — the gateway address, not the network address. target: NSX Manager target from config (default if omitted).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subnet | No | ||
| target | No | ||
| vlan_ids | No | ||
| segment_id | Yes | ||
| display_name | Yes | ||
| transport_zone_path | Yes |