Load Balancers
load_balancers
Methods
Create a new load balancer.
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Load Balancers Write
Whether the API call was successful
Delete a configured load balancer.
Apply changes to an existing load balancer, overwriting the supplied properties.
Fetch a single configured load balancer.
List configured load balancers.
Update a configured load balancer.
Domain types
Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests. For example, zero-downtime failover occurs immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 response codes. If there is another healthy origin in the same pool, the request is retried once against this alternate origin.
WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers only).
A pool ID.
Filter options for a particular resource type (pool or origin). Use null to reset.
The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'.
Configures load shedding policies and percentages for the pool.
Controls location-based steering for non-proxied requests. See steering_policy
to learn how steering is affected.
Filter pool and origin health notifications by resource type or health status. Use null to reset.
Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity.
Configures pool weights.
steering_policy="random"
: A random pool is selected with probability proportional to pool weights.steering_policy="least_outstanding_requests"
: Use pool weights to scale each pool's outstanding requests.steering_policy="least_connections"
: Use pool weights to scale each pool's open connections.
A rule object containing conditions and overrides for this load balancer to evaluate.
Specifies the type of session affinity the load balancer should use unless specified as "none"
. The supported types are:
"cookie"
: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used."ip_cookie"
: Behaves the same as"cookie"
except the initial origin selection is stable and based on the client's ip address."header"
: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (seesession_affinity_attributes.headers
) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration ofsession_affinity_ttl
seconds or the origin server is unhealthy, then a new origin server is calculated and used. Seeheaders
insession_affinity_attributes
for additional required configuration.
Configures attributes for session affinity.
Steering Policy for this load balancer.
"off"
: Usedefault_pools
."geo"
: Useregion_pools
/country_pools
/pop_pools
. For non-proxied requests, the country forcountry_pools
is determined bylocation_strategy
."random"
: Select a pool randomly."dynamic_latency"
: Use round trip time to select the closest pool in default_pools (requires pool health checks)."proximity"
: Use the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests."least_outstanding_requests"
: Select a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others."least_connections"
: Select a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.""
: Will map to"geo"
if you useregion_pools
/country_pools
/pop_pools
otherwise"off"
.
Monitors
load_balancers.monitors
Methods
Create a configured monitor.
Delete a configured monitor.
Apply changes to an existing monitor, overwriting the supplied properties.
List a single configured monitor for an account.
List configured monitors for an account.
Modify a configured monitor.
Domain types
load_balancers.monitors.previews
Methods
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
Get the list of resources that reference the provided monitor.
Pools
load_balancers.pools
Methods
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 a new pool.
Delete a configured pool.
Apply changes to an existing pool, overwriting the supplied properties.
Fetch a single configured pool.
List configured pools.
Modify a configured pool.
Domain types
load_balancers.pools.health
Methods
Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.
Fetch the latest pool health status for a single pool.
load_balancers.pools.references
Methods
Get the list of resources that reference the provided pool.
Previews
load_balancers.previews
Methods
Get the result of a previous preview operation using the provided preview_id.
Regions
load_balancers.regions
Methods
Get a single region mapping.
List all region mappings.
Searches
load_balancers.searches
Methods
Search for Load Balancing resources.