Create node pool
From Hostway API Documentation
Revision as of 12:13, 24 July 2015 by Mike.robski (Talk | contribs)
Contents |
POST /accounts/{accountId}/loadbalancers/{lbId}/nodePools
This operation creates a new node pool
Request
POST /accounts/{accountId}/loadbalancers/{lbId}/nodePools
Request Parameters
- accountId - string
- The selected account Id.
- lbId - string
- The selected load balancer Id.
Request Body
{ "displayName": "{name}", "port": {port}, "protocol": "{protocol}", "algorithm": "{ROUND_ROBIN or SOURCE_IP}", "timeout": {timeout}, }
Parameters
- displayName - string
- The display name of the node pool.
- port - integer
- The tcp port the load balancer will act on
- Allowed range is 1 ~ 65535
- protocol - string
- The protocol to be balanced by this load balancer
- Allowed values are TCP or HTTP. (Note: HTTPS is not supported)
- algorithm - string
- Load balancing algorithm to be used
- Allowed values are ROUND_ROBIN or SOURCE_IP
- timeout - integer
- Load balancer timeout (ex, check, connect timeouts)
Response
Response Codes
- 201 Created
- 400 Bad Request
- The request has wrong data
- 401 Unauthorized
- This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
- 409 Conflict
- The resource already exists.
Response Headers
- Location
- Returned with successful 201 response. Contains the new LB URI. The client must use this URI for all subsequent operations with the LB.
Examples
Request
POST /accounts/{accountId}/loadbalancers/{loadbalancerId}/nodePools Content-Type: application/json; Charset=UTF-8 Authorization: Basic {Base64-encoded username & password string} { "displayName" : "Test Load Balancer", "port": 80, "protocol": "HTTP", "algorithm": "ROUND_ROBIN", "timeout": 30, }
Response
201 Created Content-Type: application/json; charset=UTF-8 Location : http://{api-server}/account/{accountId}/loadbalancer/{lbId}/nodePools/{newNodePoolId}