Skip to navigation

Create a load balancer

Creates a load balancer from a full specification. Answers 202 with an operation to read with getLoadBalancerOperation. Targets are private addresses in the VPC. Billed per node-hour. Requires scope: load-balancer.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
curl -X POST "https://api.ibee.ai/v1/networking/load-balancers?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name": "<name>", "region_id": "4f2a9c1e-7b3d-4e8a-9f10-2c5d6e7f8a9b", "traffic_type": "http", "listeners": [{"name": "<name>", "protocol": "HTTP", "port": 1, "target_group": "<target_group>"}], "target_groups": [{"name": "<name>", "protocol": "HTTP"}]}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Headers

Idempotency-KeystringRequiredformat: "^[!-~]+$"8-128 characters
A unique key for this change. Retry with the same key and body to get the same operation back.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
namestringRequired1-80 characters
region_idstringRequiredformat: "uuid"
traffic_typeenumRequired
Allowed values:
listenerslist of objectsRequired
target_groupslist of objectsRequired
vpc_idstring or nullOptional1-128 characters
scopeenumOptionalDefaults to regional
Allowed values:
capacity_modeenumOptionalDefaults to fixed
Allowed values:
visibilityenumOptionalDefaults to external
Allowed values:
node_countintegerOptional1-5Defaults to 1
loggingobjectOptional

Response

Accepted.
idstringformat: "uuid"
lb_idstringformat: "uuid"
kindstring
statusstring
requested_generationinteger
attemptsinteger
reasonstring or null
created_atdatetime
completed_atdatetime or null

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
409
Conflict Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error