Skip to content

Load balancers

Load balancers, listeners, pools, members and health checks.

Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.

Request and response examples are generated from the schema; the tables under Schemas are the reference.

Create a load balancer

POST /v1/orgs/{org_id}/projects/{project_id}/load-balancers

Creates a load balancer on a network in one location, with optional listeners, pools and members. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No

Request body

{
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z",
    "listeners": [
        {
            "certificate_id": "string",
            "pool": {
                "algorithm": "string",
                "health_monitor": {
                    "delay": 0,
                    "max_retries": 0,
                    "timeout": 0,
                    "type": "string"
                },
                "members": [
                    {
                        "address": "string",
                        "port": 0,
                        "server_id": "string",
                        "subnet_id": "string",
                        "weight": 0
                    }
                ]
            },
            "port": 0,
            "protocol": "string",
            "sni_certificate_ids": [
                "string"
            ]
        }
    ],
    "location": "string",
    "offering": "string",
    "subnet_id": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete a load balancer

DELETE /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}

Deletes the load balancer with its listeners, pools and health checks; the instances behind it are not touched. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Rename a load balancer

PATCH /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}

Changes the load balancer's name. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Add a listener

POST /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/listeners

Adds a listener (protocol and port) to the load balancer. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "certificate_id": "string",
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z",
    "pool_id": "string",
    "port": 0,
    "protocol": "string",
    "sni_certificate_ids": [
        "string"
    ]
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete a listener

DELETE /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/listeners/{child_id}

Removes a listener from the load balancer. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
child_id path string Yes
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "expected": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Change a listener

PATCH /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/listeners/{child_id}

Changes a listener's name or the pool it sends to. Send the version you read in expected. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
child_id path string Yes
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "certificate_id": "string",
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z",
    "expected": "string",
    "pool_id": "string",
    "sni_certificate_ids": [
        "string"
    ]
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Add a pool

POST /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/pools

Adds a pool of backend members to the load balancer. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "algorithm": "string",
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z",
    "protocol": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete a pool

DELETE /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/pools/{child_id}

Removes a pool from the load balancer. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
child_id path string Yes
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "expected": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Change a pool

PATCH /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/pools/{child_id}

Changes a pool's name or balancing method. Send the version you read in expected. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
child_id path string Yes
idempotency-key header string Yes
lb_id path string No
org_id path string No
project_id path string No

Request body

{
    "algorithm": "string",
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z",
    "expected": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Remove a pool's health check

DELETE /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/pools/{pool_id}/health-monitor

Removes the pool's health check. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
pool_id path string No
project_id path string No

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Set a pool's health check

POST /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/pools/{pool_id}/health-monitor

Creates or replaces the pool's health check. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
pool_id path string No
project_id path string No

Request body

{
    "delay": 0,
    "execute_before": "2022-04-13T15:42:05.901Z",
    "max_retries": 0,
    "timeout": 0,
    "type": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Replace a pool's members

POST /v1/orgs/{org_id}/projects/{project_id}/load-balancers/{lb_id}/pools/{pool_id}/members:replace

Replaces the pool's whole member list. Send the list's version you read in expected; a list that changed since is refused. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
lb_id path string No
org_id path string No
pool_id path string No
project_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "expected": "string",
    "members": [
        {
            "address": "string",
            "port": 0,
            "server_id": "string",
            "subnet_id": "string",
            "weight": 0
        }
    ]
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Schemas

Accepted

Name Type Description
operation OperationLink

HTTPValidationError

Name Type Description
detail Array<ValidationError>

LbChildVersionBody

Name Type Description
execute_before string(date-time) | null
expected string

LbListenerBody

Name Type Description
certificate_id string | null The certificate a TERMINATED_HTTPS listener serves (crt_…), one of this project's in the load balancer's location; no other protocol takes one.
pool LbPoolBody
port integer
protocol string
sni_certificate_ids Array<string> More certificates a TERMINATED_HTTPS listener serves (crt_…, at most 10), each chosen by the host name the client asks for (SNI); a client whose host name none of them covers gets certificate_id, the default. Each one this project's in the load balancer's location, listed once, never the default.

LbListenerCreateBody

Name Type Description
certificate_id string | null The certificate a TERMINATED_HTTPS listener serves (crt_…), one of this project's in the load balancer's location; no other protocol takes one.
display_name string
execute_before string(date-time) | null
pool_id string | null
port integer
protocol string
sni_certificate_ids Array<string> More certificates a TERMINATED_HTTPS listener serves (crt_…, at most 10), each chosen by the host name the client asks for (SNI); a client whose host name none of them covers gets certificate_id, the default. Each one this project's in the load balancer's location, listed once, never the default.

LbListenerUpdateBody

Name Type Description
certificate_id string | null Switch a TERMINATED_HTTPS listener to another certificate (crt_…) of this project and location; how a certificate is rotated.
display_name string | null
execute_before string(date-time) | null
expected string
pool_id string | null
sni_certificate_ids Array<string> Replace the certificates a TERMINATED_HTTPS listener serves by host name (SNI) with these (crt_…, at most 10; [] removes them all). Each one this project's in the load balancer's location, listed once, never the default.

LbMemberBody

Name Type Description
address string | null
port integer
server_id string | null
subnet_id string | null The range the address is on, where two ranges share it.
weight integer

LbMembersBody

Name Type Description
execute_before string(date-time) | null
expected string | null
members Array<LbMemberBody>

LbMonitorBody

Name Type Description
delay integer
max_retries integer
timeout integer
type string

LbMonitorSetBody

Name Type Description
delay integer
execute_before string(date-time) | null
max_retries integer
timeout integer
type string

LbPoolBody

Name Type Description
algorithm string
health_monitor LbMonitorBody
members Array<LbMemberBody>

LbPoolCreateBody

Name Type Description
algorithm string
display_name string
execute_before string(date-time) | null
protocol string

LbPoolUpdateBody

Name Type Description
algorithm string | null
display_name string | null
execute_before string(date-time) | null
expected string

LbRenameBody

Name Type Description
display_name string
execute_before string(date-time) | null

LoadBalancerCreateBody

Name Type Description
display_name string
execute_before string(date-time) | null
listeners Array<LbListenerBody>
location string
offering string
subnet_id string
Name Type Description
href string Where to read the operation; also the Location header.
id string The operation's ID (op_…).
state string | null Its state when accepted, normally queued.

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string