Management Plane API > Networking > Logical Switching > Logical Switches

Update a Logical Switch

Modifies attributes of an existing logical switch. Modifiable
attributes include admin_state, replication_mode, switching_profile_ids
and VLAN spec. You cannot modify the original transport_zone_id.

Request:

Method:
PUT
URI Path(s):
/api/v1/logical-switches/<lswitch-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
LogicalSwitch+

Example Request:

PUT https://<nsx-mgr>/api/v1/logical-switches/92225022-a786-4c7d-91d1-1f9afa6deebe { "transport_zone_id":"cfaec4c7-45c2-439b-b7c6-2c3aeabd9976", "replication_mode": "MTEP", "admin_state": "UP", "hybrid": false, "_revision": 0 }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
LogicalSwitch+

Example Response:

{ "id": "92225022-a786-4c7d-91d1-1f9afa6deebe", "display_name": "92225022-a786-4c7d-91d1-1f9afa6deebe", "resource_type": "LogicalSwitch", "transport_zone_id": "cfaec4c7-45c2-439b-b7c6-2c3aeabd9976", "replication_mode": "MTEP", "admin_state": "UP", "vni": 56200, "hybrid": false, "switching_profile_ids": [ { "value": "64814784-7896-3901-9741-badeff705639", "key": "IpDiscoverySwitchingProfile" }, { "value": "fad98876-d7ff-11e4-b9d6-1681e6b88ec1", "key": "SpoofGuardSwitchingProfile" }, { "value": "93b4b7e8-f116-415d-a50c-3364611b5d09", "key": "PortMirroringSwitchingProfile" }, { "value": "fbc4fb17-83d9-4b53-a286-ccdf04301888", "key": "SwitchSecuritySwitchingProfile" }, { "value": "f313290b-eba8-4262-bd93-fab5026e9495", "key": "QosSwitchingProfile" } ], "_last_modified_user": "admin", "_last_modified_time": 1435285886962, "_create_time": 1435285527986, "_create_user": "admin", "_revision": 1, "_schema": "/v1/schema/LogicalSwitch" }

Required Permissions:

crud

Feature:

switching_switches

Additional Errors: