This API is used to create a load balancer.
POST /v1.0/{project_id}/elbaas/loadbalancers
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
|
description |
No |
String |
|
vpc_id |
Yes |
String |
Specifies the VPC ID. |
bandwidth |
No |
Integer |
|
type |
Yes |
String |
|
admin_state_up |
Yes |
Integer/Boolean |
|
vip_subnet_id |
No |
String |
Specifies the subnet ID of backend ECSs. This parameter is mandatory when type is set to Internal. Only IPv4 subnets can be specified. |
az |
No |
String |
Specifies the AZ of the load balancer. This parameter is invalid when type is set to External and is optional when type is set to Internal. If type is set to Internal and an AZ is specified, the specified AZ must support private network load balancers. Otherwise, an error message is returned. For more details, see Regions and Endpoints. |
charge_mode |
No |
String |
|
eip_type |
No |
String |
|
security_group_id |
No |
String |
|
vip_address |
No |
String |
|
tenantId |
No |
String |
|
{ "name": "loadbalancer1", "description": "simple lb", "vpc_id": "f54a3ffd-7a55-4568-9e3d-f0ff2d46a107", "bandwidth": 200, "type": "External", "admin_state_up": true }
{ "name": "loadbalancer1", "description": "simple lb", "vpc_id": "f54a3ffd-7a55-4568-9e3d-f0ff2d46a107", "vip_address": "192.144.164.74", "type": "External", "admin_state_up": true }
Parameter |
Type |
Description |
---|---|---|
uri |
String |
Specifies the URI returned by Combined API after the job for creating a load balancer is delivered. |
job_id |
String |
Specifies the unique ID assigned to the job for creating a load balancer in Combined API. |
{ "uri": "/v1/73cd9140bec7427ab9952b4ed75924e0/jobs/4010b39b4fbb4645014fcfc8f2d178d1", "job_id": "4010b39b4fbb4645014fcfc8f2d178d1" }
Status Code |
Message |
Description |
---|---|---|
400 |
badRequest |
Request error. |
401 |
unauthorized |
Authentication failed. |
403 |
userDisabled |
You do not have the permission to perform the operation. |
404 |
Not Found |
The requested page does not exist. |
500 |
authFault |
System error. |
503 |
serviceUnavailable |
The service is unavailable. |