Management Plane API > Networking > Logical Switching > Logical Switch Ports

Update a Logical Port

Modifies an existing logical switch port. Parameters that can be modified
include attachment_type (LOGICALROUTER, VIF), admin_state (UP or DOWN),
attachment id and switching_profile_ids. You cannot modify the logical_switch_id.
In other words, you cannot move an existing port from one switch to another switch.

Request:

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

Example Request:

PUT https://<nsx-mgr>/api/v1/logical-ports/95a93e66-4fb1-4f7d-9484-1c8fd521e741 { "logical_switch_id":"849e339e-64b7-47cb-9480-33068f70dc5a", "address_bindings": [{"ip_address":"192.168.1.110", "mac_address":"aa:bb:cc:dd:ee:ff"}], "attachment": {"attachment_type":"VIF","id":"vif1"}, "admin_state": "UP", "_revision": 0 }

Successful Response:

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

Example Response:

{ "id": "95a93e66-4fb1-4f7d-9484-1c8fd521e741", "display_name": "95a93e66-4fb1-4f7d-9484-1c8fd521e741", "resource_type": "LogicalPort", "address_bindings": [ { "mac_address": "aa:bb:cc:dd:ee:ff", "ip_address": "192.168.1.110", "vlan": 0 } ], "logical_switch_id": "849e339e-64b7-47cb-9480-33068f70dc5a", "admin_state": "UP", "attachment": { "id": "vif1", "attachment_type": "VIF" }, "switching_profile_ids": [ { "value": "49781ebb-6f76-464a-9a7e-c365ba26128b", "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": 1435284879143, "_create_time": 1435284566908, "_create_user": "admin", "_revision": 1 }

Required Permissions:

crud

Feature:

switching_ports

Additional Errors: