Create load balancer
curl --request POST \
--url https://api.example.com/api/v2/loadbalancers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "web-lb",
"description": "Public TCP load balancer",
"tags": [
{
"name": "service",
"value": "ingress"
}
]
},
"spec": {
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"publicIP": true,
"vipAddress": "192.168.10.20",
"listeners": [
{
"name": "http",
"protocol": "tcp",
"port": 80,
"allowedCidrs": [
"0.0.0.0/0"
],
"idleTimeoutSeconds": 30,
"pool": {
"proxyProtocolV2": false,
"members": [
{
"address": "10.0.0.10",
"port": 8080
}
],
"healthCheck": {
"intervalSeconds": 10,
"timeoutSeconds": 5,
"healthyThreshold": 2,
"unhealthyThreshold": 2
}
}
}
]
}
}
'{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "web-lb",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2024-05-31T14:11:00Z",
"createdBy": "john.doe@acme.com",
"provisioningStatus": "pending",
"healthStatus": "healthy"
},
"spec": {
"publicIP": true,
"listeners": [
{
"name": "http",
"protocol": "tcp",
"port": 80,
"allowedCidrs": [
"0.0.0.0/0"
],
"idleTimeoutSeconds": 30,
"pool": {
"proxyProtocolV2": false,
"members": [
{
"address": "10.0.0.10",
"port": 8080
}
],
"healthCheck": {
"intervalSeconds": 10,
"timeoutSeconds": 5,
"healthyThreshold": 2,
"unhealthyThreshold": 2
}
}
}
]
},
"status": {
"regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"vipAddress": "192.168.10.20",
"publicIP": "203.0.113.10"
}
}Load balancers
Create load balancer
Create a new load balancer.
POST
/
api
/
v2
/
loadbalancers
Create load balancer
curl --request POST \
--url https://api.example.com/api/v2/loadbalancers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "web-lb",
"description": "Public TCP load balancer",
"tags": [
{
"name": "service",
"value": "ingress"
}
]
},
"spec": {
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"publicIP": true,
"vipAddress": "192.168.10.20",
"listeners": [
{
"name": "http",
"protocol": "tcp",
"port": 80,
"allowedCidrs": [
"0.0.0.0/0"
],
"idleTimeoutSeconds": 30,
"pool": {
"proxyProtocolV2": false,
"members": [
{
"address": "10.0.0.10",
"port": 8080
}
],
"healthCheck": {
"intervalSeconds": 10,
"timeoutSeconds": 5,
"healthyThreshold": 2,
"unhealthyThreshold": 2
}
}
}
]
}
}
'{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "web-lb",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2024-05-31T14:11:00Z",
"createdBy": "john.doe@acme.com",
"provisioningStatus": "pending",
"healthStatus": "healthy"
},
"spec": {
"publicIP": true,
"listeners": [
{
"name": "http",
"protocol": "tcp",
"port": 80,
"allowedCidrs": [
"0.0.0.0/0"
],
"idleTimeoutSeconds": 30,
"pool": {
"proxyProtocolV2": false,
"members": [
{
"address": "10.0.0.10",
"port": 8080
}
],
"healthCheck": {
"intervalSeconds": 10,
"timeoutSeconds": 5,
"healthyThreshold": 2,
"unhealthyThreshold": 2
}
}
}
]
},
"status": {
"regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"vipAddress": "192.168.10.20",
"publicIP": "203.0.113.10"
}
}Authorizations
Operation requires OAuth 2.0 bearer token authentication.
Body
application/json
A request for a load balancer.
Response
A load balancer.
Was this page helpful?
⌘I