Edit a load balancer

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 109)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
='''PUT''' /accounts/''{accountId}''/loadbalancers/''{lbId}''=
 
='''PUT''' /accounts/''{accountId}''/loadbalancers/''{lbId}''=
This operation will update name and/or algorithm of the specified load balancer.
+
This operation updates the specified load balancer attributes.
  
 
== Request ==
 
== Request ==
=== URI Parameters ===
+
<code>PUT /accounts/''{accountId}''/loadbalancers/''{lbId}''</code>
 +
 
 +
=== Request Parameters ===
 
; accountId - ''string''
 
; accountId - ''string''
: The selected account Id.
+
: The selected account id.
  
 
; lbId - ''string''
 
; lbId - ''string''
: The unique identifier of the firewall group.
+
: The selected load balancer id.
  
 
=== Request Body ===
 
=== Request Body ===
 
  <nowiki>
 
  <nowiki>
 
{  
 
{  
      "displayName" : "{lbDisplayName}",
+
    "displayName": "{lbDisplayName}"
      "algorithm" : "{lbAlgorithm}",
+
}</nowiki>
      "timeout": {lbTimeout},
+
      "protocol": "{lbProtocol}"
+
    }
+
}</nowiki>
+
  
 
==== Parameters ====
 
==== Parameters ====
 
; displayName - ''string''
 
; displayName - ''string''
: optional, new name for this load balancer (must be unique)
+
: new name for this load balancer
 
+
; algorithm - ''string''
+
: optional, the new load balancing algorithm to use. ROUND_ROBIN or SOURCE_IP
+
 
+
; timeout - ''integer''
+
: optional, timeout seconds
+
 
+
; protocol - ''string''
+
: optional, HTTP or TCP
+
  
 
== Response ==
 
== Response ==
Line 37: Line 26:
 
=== Response Codes ===
 
=== Response Codes ===
 
; 204 No Content
 
; 204 No Content
 +
 +
; 400 Bad Request
 +
: The request has wrong data
  
 
; 401 Unauthorized
 
; 401 Unauthorized
Line 53: Line 45:
 
Content-Type:application/json
 
Content-Type:application/json
 
Charset=UTF-8
 
Charset=UTF-8
Authorization:Base64-encoded username & password string
+
Authorization: Basic {Base64-encoded username & password string}
  
 
{
 
{
     "displayName": "New display name",
+
     "displayName": "New display name"
    "algorithm": "SOURCE_IP"
+
 
}</pre>
 
}</pre>
  
Line 63: Line 54:
 
<pre>
 
<pre>
 
HTTP/1.1 204 OK
 
HTTP/1.1 204 OK
</pre>
 
 
=== Failure while trying to edit a load balancer that does not exist ===
 
 
'''Request'''
 
<pre>
 
PUT /accounts/{accountId}/loadbalancers/{fake_loadBalancerId}
 
Content-Type:application/json
 
Charset=UTF-8
 
Authorization:Base64-encoded username & password string
 
</pre>
 
 
'''Response'''
 
<pre>
 
HTTP/1.1 404 Not Found
 
 
</pre>
 
</pre>
  

Latest revision as of 12:13, 24 July 2015

Contents

[edit] PUT /accounts/{accountId}/loadbalancers/{lbId}

This operation updates the specified load balancer attributes.

[edit] Request

PUT /accounts/{accountId}/loadbalancers/{lbId}

[edit] Request Parameters

accountId - string
The selected account id.
lbId - string
The selected load balancer id.

[edit] Request Body

{ 
    "displayName": "{lbDisplayName}"
}

[edit] Parameters

displayName - string
new name for this load balancer

[edit] Response

[edit] 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.

[edit] Examples

[edit] Successfully edit details for specified load balancer

Request

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

{
    "displayName": "New display name"
}

Response

HTTP/1.1 204 OK


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox