Add one node to a node pool

From Hostway API Documentation
Jump to: navigation, search

Contents

POST /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes

This operation adds a node to an existing load balancer.

Request

POST /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes

Request Parameters

accountId - string
The selected account id.
lbId - string
The selected loadbalancer id.
nodePoolId - string
The selected node pool id.

Request Body

{
    "server": "{serverUrl}",
    "port:": {port},
    "status": "{lbNodeStatus}"
}

Parameters

server - list
Hypermedia to a resource of the server node hosted by Hostway
it could be flexcloud servers virtual machine URL (http://{api-server}/account/{accountId}/flexcloud/servers/{serverId})
port - integer
The tcp port the load balancer will act on
Allowed range is 1 ~ 65535
status -- string
Optional, The status of a node
Allowed values are ENABLED or DISABLED

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.
404 Not Found
The resource does not exist.
502 Bad Gateway
LB backend server returned error

Examples

Request

POST /accounts/{accountId}/loadbalancers/{loadbalancerId}/nodePools/{nodePoolId}/nodes
Content-Type:application/json
Authorization: Basic {Base64-encoded username & password string}

{
    "server" : [{"href": "http://{api-server}/account/{accountId}/flexcloud/servers/{serverId}", "rel": "related"}],
    "port":"80",
    "status":"ENABLED"
 }

Response

201 Created
Content-Type: application/json; charset=UTF-8
Location : http://{api-server}/account/{accountId}/loadbalancer/{lbId}/nodePools/{nodePoolId}/nodes/{nodeId}


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox