Updating a Load Balancer
Function
This API is used to update the name or description of a load balancer.
URI
PUT /v2/{project_id}/elb/loadbalancers/{loadbalancer_id}
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Specifies the project ID. |
loadbalancer_id | Yes | String | Specifies the load balancer ID. |
Request
Parameter | Mandatory | Type | Description |
---|---|---|---|
loadbalancer | Yes | Loadbalancer object | Specifies the load balancer. For details, see Table 3. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | No | String | Specifies the load balancer name. The value contains a maximum of 255 characters. |
description | No | String | Provides supplementary information about the load balancer. The value contains a maximum of 255 characters. |
admin_state_up | No | Boolean | Specifies the administrative status of the load balancer. The load balancer stops receiving traffic after it is disabled. The value can be one of the following: true: Enable the load balancer. false: Disable the load balancer. |
protection_status | No | String | Specifies whether modification protection is enabled. The value can be one of the following:
|
protection_reason | No | String | Specifies the reason to enable modification protection. This parameter is valid only when protection_status is set to consoleProtection. |
Response
Parameter | Type | Description |
---|---|---|
loadbalancer | Loadbalancer object | Specifies the load balancer. For details, see Table 5. |
Parameter | Type | Description |
---|---|---|
id | String | Specifies the load balancer ID. |
tenant_id | String | Specifies the tenant ID. |
name | String | Specifies the load balancer name. The value contains a maximum of 255 characters. |
description | String | Provides supplementary information about the load balancer. The value contains a maximum of 255 characters. |
vip_subnet_id | String | Specifies the ID of the IPv4 subnet where the load balancer works. |
vip_port_id | String | Specifies the ID of the port bound to the private IP address of the load balancer. |
provider | String | Specifies the provider of the load balancer. |
vip_address | String | Specifies the private IP address of the load balancer. The value contains a maximum of 64 characters. |
listeners | Array of Listeners objects | Lists the IDs of listeners added to the load balancer. For details, see Table 6. |
pools | Array of Pools objects | Lists the IDs of backend server groups associated with the load balancer. For details, see Table 7. |
operating_status | String | Specifies the operating status of the load balancer. The value can be ONLINE or FROZEN. |
provisioning_status | String | This parameter is reserved, and its value can only be ACTIVE. It specifies the provisioning status of the load balancer. |
admin_state_up | Boolean | Specifies the administrative status of the load balancer. The load balancer stops receiving traffic after it is disabled. Value options: true: Enable a load balancer. false: Disable the load balancer. |
tags | Array | Lists load balancer tags. |
created_at | String | Specifies the time when the load balancer was created. The UTC time is in YYYY-MM-DDTHH:MM:SS format. The value contains a maximum of 19 characters. |
updated_at | String | Specifies the time when the load balancer was updated. The UTC time is in YYYY-MM-DDTHH:MM:SS format. The value contains a maximum of 19 characters. |
enterprise_project_id | String | Specifies the enterprise project ID. When creating a load balancer, you can assign an enterprise project to the load balancer. The value is character string 0 or a UUID with hyphens (-). Value 0 indicates the default enterprise project. |
charge_mode | String | Specifies how the load balancer will be billed. The value can be one of the following:
|
billing_info | String | Specifies whether the billing information is left blank. |
protection_status | String | Specifies whether modification protection for resources is enabled. The value can be one of the following:
|
protection_reason | String | Specifies the reason to enable modification protection. This parameter is valid only when protection_status is set to consoleProtection. |
publicips | Array of PublicIpInfo objects | Specifies the EIP bound to the load balancer. Only one EIP can be bound to a load balancer. |
Parameter | Type | Description |
---|---|---|
id | String | Specifies the ID of the associated listener. |
Parameter | Type | Description |
---|---|---|
id | String | Specifies the ID of the associated backend server group. |
Example Request
- Example requestPUT https://{Endpoint}/v2/145483a5107745e9b3d80f956713e6a3/elb/loadbalancers/1e11b74e-30b7-4b78-b09b-84aec4a04487{"loadbalancer": {"name": "lb_update_test","description": "lb update test"}}
Example Response
- Example response{"loadbalancer": {"description": "simple lb2","admin_state_up": true,"tenant_id": "145483a5107745e9b3d80f956713e6a3","provisioning_status": "ACTIVE","vip_subnet_id": "823d5866-6e30-45c2-9b1a-a1ebc3757fdb","listeners": [{"id": "37ffe679-08ef-436e-b6bd-cf66fb4c3de2"}],"vip_address": "192.172.1.68","vip_port_id": "f42e3019-67f7-4d2a-8d1c-af49e7c22fa6","provider": "vlb","tags": [],"pools": [{"id": "75c4f2d4-a213-4408-9fa8-d64708e8d1df"}],"id": "c32a9f9a-0cc6-4f38-bb9c-cde79a533c19","operating_status": "ONLINE","name": "loadbalancer-test2","created_at": "2018-07-25T01:54:13","updated_at": "2018-07-25T01:54:14","enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2"}}
Status Code
For details, see Status Codes.
- Function
- URI
- Request
- Response
- Example Request
- Example Response
- Status Code