Create session persistence for a load balancer

From Hostway API Documentation
Jump to: navigation, search

Contents

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

This operation will add or modify the session persistence of an existing load balancer

Request

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

Request Parameters

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

Request Body

{ 
    "persistenceType": "{type}",
}

Parameters

type - string
type of session persistence
Allowed value is HTTP_COOKIE (currently, only HTTP_COOKIE is supported)

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 add persistence to a load balancer (whether or not persistence was already enabled)

Request

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

{
    "persistenceType":"HTTP_COOKIE"
}

Response

HTTP/1.1 204 No Content
Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox