Load Balancers
Create load balancer
post/cloud/v1/loadbalancers/{project_id}/{region_id}
Path parameters
project_idinteger required
Project ID
Example:1
Project ID
region_idinteger required
Region ID
Example:7
Region ID
Request body
Example request
{
"flavor": "lb1-1-2",
"floating_ip": {
"source": "new"
},
"listeners": [
{
"allowed_cidrs": [
"10.0.0.0/8"
],
"connection_limit": 100000,
"name": "my_listener",
"pools": [
{
"healthmonitor": {
"admin_state_up": true,
"delay": 10,
"domain_name": "example.com",
"expected_codes": "200,301,302",
"http_version": "1.1",
"max_retries": 2,
"max_retries_down": 2,
"timeout": 5,
"url_path": "/"
},
"members": [
{
"address": "192.168.1.101",
"instance_id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9",
"protocol_port": 8000,
"weight": 2
},
{
"address": "192.168.1.102",
"instance_id": "169942e0-9b53-42df-95ef-1a8b6525c2bd",
"protocol_port": 8000,
"weight": 4
}
],
"name": "pool_name",
"session_persistence": {
"cookie_name": "cookie_name"
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000
}
],
"protocol_port": 80,
"sni_secret_id": [
"f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
"eb121225-7ded-4ff3-ae1f-599e145dd7cb"
],
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"user_list": [
{
"encrypted_password": "$5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5",
"username": "admin"
}
]
}
],
"logging": {
"destination_region_id": 1,
"enabled": true,
"retention_policy": {
"period": 45
},
"topic_name": "my-log-name"
},
"name": "new_load_balancer",
"vip_network_id": "ac307687-31a4-4a11-a949-6bea1b2878f5",
"vip_port_id": "ff83e13a-b256-4be2-ba5d-028d3f0ab450",
"vip_subnet_id": "4e7802d3-5023-44b8-b298-7726558fddf4"
}Response
OK
Example response
{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}