Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: zhoumeng <zhoumeng35@huawei.com> Co-committed-by: zhoumeng <zhoumeng35@huawei.com>
34 KiB
Updating a Backend Server Group
Function
This API is used to update a backend server group.
Constraints
The backend server group can be updated only when the provisioning status of the associated load balancer is ACTIVE.
URI
PUT /v3/{project_id}/elb/pools/{pool_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
pool_id |
Yes |
String |
Specifies the backend server group ID. |
project_id |
Yes |
String |
Specifies the project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
pool |
Yes |
UpdatePoolOption object |
Specifies the backend server group. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
admin_state_up |
No |
Boolean |
Specifies the administrative status of the backend server group. The value can only be updated to true. This parameter is unsupported. Please do not use it. |
description |
No |
String |
Provides supplementary information about the backend server group. Minimum: 0 Maximum: 255 |
lb_algorithm |
No |
String |
Specifies the load balancing algorithm used by the load balancer to route requests to backend servers. The value can be one of the following:
When the value is SOURCE_IP, the weights of backend servers are invalid. |
name |
No |
String |
Specifies the backend server group name. Minimum: 0 Maximum: 255 |
session_persistence |
No |
Specifies whether to enable sticky sessions. |
|
slow_start |
No |
UpdatePoolSlowStartOption object |
Specifies whether to enable slow start. After you enable slow start, new backend servers added to the backend server group are warmed up, and the number of requests they can receive increases linearly during the configured slow start duration. This parameter can be used when the protocol of the backend server group is HTTP or HTTPS. An error will be returned if the protocol is not HTTP or HTTPS. This parameter is unsupported. Please do not use it. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cookie_name |
No |
String |
Specifies the cookie name. This parameter will take effect only when type is set to APP_COOKIE. Otherwise, an error will be returned. The value can contain only letters, digits, hyphens (-), underscores (_), and periods (.). Minimum: 0 Maximum: 1024 |
type |
Yes |
String |
Specifies the sticky session type. The value can be SOURCE_IP, HTTP_COOKIE, or APP_COOKIE.
|
persistence_timeout |
No |
Integer |
Specifies the stickiness duration, in minutes.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
Yes |
Boolean |
Specifies whether slow start is enabled. true indicates that slow start is enabled, and false indicates slow start is disabled. Default: false |
duration |
Yes |
Integer |
Specifies the slow start duration, in seconds. The value ranges from 30 to 1200, and the default value is 30. Minimum: 30 Maximum: 1200 Default: 30 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID. The value is automatically generated. |
pool |
Pool object |
Specifies the backend server group. |
Parameter |
Type |
Description |
---|---|---|
admin_state_up |
Boolean |
Specifies the administrative status of the backend server group. The value can only be updated to true. This parameter is unsupported. Please do not use it. Default: true |
description |
String |
Provides supplementary information about the backend server group. |
healthmonitor_id |
String |
Specifies the ID of the health check configured for the backend server group. |
id |
String |
Specifies the backend server group ID. |
lb_algorithm |
String |
Specifies the load balancing algorithm used by the load balancer to route requests to backend servers in the backend server group. The value can be ROUND_ROBIN (weighted round robin), LEAST_CONNECTIONS (weighted least connections), or SOURCE_IP (source IP hash). When the value is SOURCE_IP, the weight parameter is invalid. |
listeners |
Array of ListenerRef objects |
Lists the listeners associated with the backend server group. |
loadbalancers |
Array of LoadBalancerRef objects |
Lists the IDs of load balancers associated with the backend server group. If only listener_id is specified during the creation of the backend server group, the ID of the loadbalancers parameter in the response is the ID of the load balancer to which the listener is added. |
members |
Array of MemberRef objects |
Lists the backend servers in the backend server group. |
name |
String |
Specifies the backend server group name. |
project_id |
String |
Specifies the project ID. |
protocol |
String |
Specifies the protocol used by the backend server group to receive requests. The protocol can be TCP, UDP, or HTTP.
|
session_persistence |
SessionPersistence object |
Specifies the sticky session. |
ip_version |
String |
Specifies the IP version supported by the backend server group.
Default: dualstack |
slow_start |
SlowStart object |
Specifies whether to enable slow start. After you enable slow start, new backend servers added to the backend server group are warmed up, and the number of requests they can receive increases linearly during the configured slow start duration. This parameter can be used when the protocol of the backend server group is HTTP or HTTPS. An error will be returned if the protocol is not HTTP or HTTPS. This parameter is unsupported. Please do not use it. |
Parameter |
Type |
Description |
---|---|---|
cookie_name |
String |
Specifies the cookie name. This parameter will take effect only when type is set to APP_COOKIE. Otherwise, an error will be returned. The value can contain only letters, digits, hyphens (-), underscores (_), and periods (.). Minimum: 0 Maximum: 1024 |
type |
String |
Specifies the sticky session type. The value can be SOURCE_IP, HTTP_COOKIE, or APP_COOKIE.
|
persistence_timeout |
Integer |
Specifies the stickiness duration, in minutes.
|
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Specifies whether to enable slow start. true indicates that this function is enabled, and false indicates this function is disabled. Default: false |
duration |
Integer |
Specifies the slow start duration, in seconds. The value ranges from 30 to 1200, and the default value is 30. Minimum: 30 Maximum: 1200 Default: 30 |
Example Requests
PUT https://{elb_endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/pools/36ce7086-a496-4666-9064-5ba0e6840c75 { "pool" : { "name" : "My pool.", "description" : "My pool update", "lb_algorithm" : "LEAST_CONNECTIONS" } }
Example Responses
Status code: 200
Successful request.
{ "pool" : { "lb_algorithm" : "LEAST_CONNECTIONS", "protocol" : "TCP", "description" : "My pool update", "admin_state_up" : true, "loadbalancers" : [ { "id" : "098b2f68-af1c-41a9-8efd-69958722af62" } ], "project_id" : "99a3fff0d03c428eac3678da6a7d0f24", "session_persistence" : null, "healthmonitor_id" : null, "listeners" : [ { "id" : "0b11747a-b139-492f-9692-2df0b1c87193" }, { "id" : "61942790-2367-482a-8b0e-93840ea2a1c6" }, { "id" : "fd8f954c-f0f8-4d39-bb1d-41637cd6b1be" } ], "members" : [ ], "id" : "36ce7086-a496-4666-9064-5ba0e6840c75", "name" : "My pool.", "ip_version" : "dualstack" }, "request_id" : "8f40128b-c72b-4b64-986a-f7e2c633d75f" }
Status Codes
Status Code |
Description |
---|---|
200 |
Successful request. |
Error Codes
See Error Codes.