Add or update load balancer's health monitor

From Hostway API Documentation
Jump to: navigation, search

Contents

PUT /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/healthMonitor

This operation adds or modify a load balancer's health monitor

Request

PUT /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/healthMonitor

Request Parameters

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

Request Body

partial update is not supported, need all data to add or update

{ 
    "protocol": "{protocol}",
    "interval": {interval},
    "port": {port},
    "attemptsBeforeActivation": {count},
    "attemptsBeforeDeactivation": {count},
    "uri": "{uri}"
}

Parameters

protocol - string
The protocol to be used by health monitor
Allowed values are TCP or HTTP
interval - integer
The number of seconds between subsequent health monitor check messages
port - integer
The port for health monitor to monitor
attemptsBeforeActivation - integer
The number of successful health monitor checks allowed before this load balancer is activated
attemptsBeforeDeactivation - integer
The number of failed health monitor checks allowed before this load balancer is deactivated
uri - string
Optional, http path for monitor, needed only if the protocol is HTTP

Response

Response Codes

204 No Content
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.

Examples

Successfully update contents of specified load balancer health monitor

Request

PUT /accounts/{accountId}/loadbalancers/0001/nodePools/123/healthMonitor
Content-Type:application/json
Charset=UTF-8
Authorization: Basic {Base64-encoded username & password string}

{
    "protocol": "TCP",
    "interval": 20,
    "port": 80,
    "attemptsBeforeActivation": 3,
    "attemptsBeforeDeactivation": 3
}

Response

HTTP/1.1 204 No Content

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox