Management Plane API > Networking > Services > Loadbalancer

Create a load balancer virtual server

Create a load balancer virtual server.

Request:

Method:
POST
URI Path(s):
/api/v1/loadbalancer/virtual-servers
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
LbVirtualServer+

Example Request:

POST https://<nsx-mgr>/api/v1/loadbalancer/virtual-servers { "ip_protocol":"TCP", "enabled":"true", "pool_id":"356ab0ad-3fdc-48ef-b9df-8c05cedc0fc3", "default_pool_member_port" : "80", "application_profile_id":"cb2d0721-cc15-5b8e-8633-14be114eac5e", "ip_address":"123.123.123.123", "port":"80", "display_name":"LB_HTTP_VirtualServer", "description":"LB_HTTP_VirtualServer created through automation" }

Successful Response:

Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
LbVirtualServer+

Example Response:

{ "resource_type" : "LbVirtualServer", "description" : "LB_HTTP_VirtualServer", "id" : "801ebbb3-90bf-403b-b061-9ec6294813b2", "display_name" : "LB_HTTP_VirtualServer", "ip_address" : "123.123.123.123", "pool_id" : "356ab0ad-3fdc-48ef-b9df-8c05cedc0fc3", "enabled" : true, "ip_protocol" : "TCP", "default_pool_member_port" : "80", "port" : "80", "application_profile_id" : "5563bc87-799d-4340-9715-27e43cb1e60c", "_create_user" : "admin", "_create_time" : 1506659379394, "_last_modified_user" : "admin", "_last_modified_time" : 1506659379394, "_system_owned" : false, "_protection" : "NOT_PROTECTED", "_revision" : 0 }

Required Permissions:

crud

Feature:

lb_virtual_servers

Additional Errors: