Load Balancers

load_balancers

Methods

Create Load Balancer -> Envelope<>
post/zones/{zone_id}/load_balancers

Create a new load balancer.

Delete Load Balancer -> Envelope<{ id }>
delete/zones/{zone_id}/load_balancers/{load_balancer_id}

Delete a configured load balancer.

Patch Load Balancer -> Envelope<>
patch/zones/{zone_id}/load_balancers/{load_balancer_id}

Apply changes to an existing load balancer, overwriting the supplied properties.

Load Balancer Details -> Envelope<>
get/zones/{zone_id}/load_balancers/{load_balancer_id}

Fetch a single configured load balancer.

List Load Balancers -> SinglePage<>
get/zones/{zone_id}/load_balancers

List configured load balancers.

Update Load Balancer -> Envelope<>
put/zones/{zone_id}/load_balancers/{load_balancer_id}

Update a configured load balancer.

Domain types

AdaptiveRouting = { failover_across_pools }
CheckRegion = "WNAM" | "ENAM" | "WEU" | 11 more...
DefaultPools = string
FilterOptions = { disable, healthy }
Header = { Host }
Host = string
LoadBalancer = { id, adaptive_routing, country_pools, 19 more... }
LoadShedding = { default_percent, default_policy, session_percent, 1 more... }
LocationStrategy = { mode, prefer_ecs }
NotificationFilter = { origin, pool }
Origin = { address, disabled_at, enabled, 4 more... }
OriginSteering = { policy }
RandomSteering = { default_weight, pool_weights }
Rules = { condition, disabled, fixed_response, 4 more... }
SessionAffinity = "none" | "cookie" | "ip_cookie" | 1 more...
SessionAffinityAttributes = { drain_duration, headers, require_all_headers, 3 more... }
SteeringPolicy = "off" | "geo" | "random" | 5 more...

load_balancers.monitors

Methods

Create Monitor -> Envelope<>
post/accounts/{account_id}/load_balancers/monitors

Create a configured monitor.

Delete Monitor -> Envelope<{ id }>
delete/accounts/{account_id}/load_balancers/monitors/{monitor_id}

Delete a configured monitor.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Load Balancing: Monitors and Pools Write

Parameters
account_id: string

Identifier

monitor_id: string
Response fields
errors: Array<>
messages: Array<>
result: { id }
success: true

Whether the API call was successful

Request example
200Example
Patch Monitor -> Envelope<>
patch/accounts/{account_id}/load_balancers/monitors/{monitor_id}

Apply changes to an existing monitor, overwriting the supplied properties.

Monitor Details -> Envelope<>
get/accounts/{account_id}/load_balancers/monitors/{monitor_id}

List a single configured monitor for an account.

List Monitors -> SinglePage<>
get/accounts/{account_id}/load_balancers/monitors

List configured monitors for an account.

Update Monitor -> Envelope<>
put/accounts/{account_id}/load_balancers/monitors/{monitor_id}

Modify a configured monitor.

Domain types

Monitor = { id, allow_insecure, consecutive_down, 16 more... }

load_balancers.monitors.previews

Methods

Preview Monitor -> Envelope<{ pools, preview_id }>
post/accounts/{account_id}/load_balancers/monitors/{monitor_id}/preview

Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.

load_balancers.monitors.references

Methods

List Monitor References -> Envelope<Array<{ reference_type, resource_id, resource_name, 1 more... }>>
get/accounts/{account_id}/load_balancers/monitors/{monitor_id}/references

Get the list of resources that reference the provided monitor.

load_balancers.pools

Methods

Patch Pools -> Envelope<Array<>>
patch/accounts/{account_id}/load_balancers/pools

Apply changes to a number of existing pools, overwriting the supplied properties. Pools are ordered by ascending name. Returns the list of affected pools. Supports the standard pagination query parameters, either limit/offset or per_page/page.

Create Pool -> Envelope<>
post/accounts/{account_id}/load_balancers/pools

Create a new pool.

Delete Pool -> Envelope<{ id }>
delete/accounts/{account_id}/load_balancers/pools/{pool_id}

Delete a configured pool.

Patch Pool -> Envelope<>
patch/accounts/{account_id}/load_balancers/pools/{pool_id}

Apply changes to an existing pool, overwriting the supplied properties.

Pool Details -> Envelope<>
get/accounts/{account_id}/load_balancers/pools/{pool_id}

Fetch a single configured pool.

List Pools -> SinglePage<>
get/accounts/{account_id}/load_balancers/pools

List configured pools.

Update Pool -> Envelope<>
put/accounts/{account_id}/load_balancers/pools/{pool_id}

Modify a configured pool.

Domain types

Pool = { id, check_regions, created_on, 15 more... }

load_balancers.pools.health

Methods

Preview Pool -> Envelope<{ pools, preview_id }>
post/accounts/{account_id}/load_balancers/pools/{pool_id}/preview

Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.

Pool Health Details -> Envelope<{ pool_id, pop_health }>
get/accounts/{account_id}/load_balancers/pools/{pool_id}/health

Fetch the latest pool health status for a single pool.

load_balancers.pools.references

Methods

List Pool References -> Envelope<Array<{ reference_type, resource_id, resource_name, 1 more... }>>
get/accounts/{account_id}/load_balancers/pools/{pool_id}/references

Get the list of resources that reference the provided pool.

load_balancers.previews

Methods

Preview Result -> Envelope<Record<string, { healthy, origins }>>
get/accounts/{account_id}/load_balancers/preview/{preview_id}

Get the result of a previous preview operation using the provided preview_id.

load_balancers.regions

Methods

Get Region -> Envelope<unknown>
get/accounts/{account_id}/load_balancers/regions/{region_id}

Get a single region mapping.

List Regions -> Envelope<unknown>
get/accounts/{account_id}/load_balancers/regions

List all region mappings.

load_balancers.searches

Methods

Search Resources -> Envelope<{ resources }>
get/accounts/{account_id}/load_balancers/search

Search for Load Balancing resources.