Search + K

Command Palette

Search for a command to run...

Sign In

Create Pool

POST /accounts/{account_id}/load_balancers/pools
Copy endpoint
https://api.cloudflare.com/client/v4

Create a new pool.

Parameters

path Path Parameters

Name Type
account_id required
type LoadBalancingComponentsSchemasIdentifier = string

Request Body

application/json required
{
description?: LoadBalancingSchemasDescription

A human-readable description of the pool.

type LoadBalancingSchemasDescription = string
;
enabled?: LoadBalancingEnabled

Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).

type LoadBalancingEnabled = boolean
;
latitude?: LoadBalancingLatitude

The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.

type LoadBalancingLatitude = number
;
load_shedding?: LoadBalancingLoadShedding

Configures load shedding policies and percentages for the pool.

interface LoadBalancingLoadShedding {
default_percent?: number;
default_policy?: "random" | "hash";
session_percent?: number;
session_policy?: "hash";
}
;
longitude?: LoadBalancingLongitude

The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.

type LoadBalancingLongitude = number
;
minimum_origins?: LoadBalancingMinimumOrigins

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.

type LoadBalancingMinimumOrigins = number
;
monitor?: LoadBalancingMonitorId

The ID of the Monitor to use for checking the health of origins within this pool.

type LoadBalancingMonitorId = string
;
name: LoadBalancingName

A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.

type LoadBalancingName = string
;
notification_email?: LoadBalancingNotificationEmail

This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

type LoadBalancingNotificationEmail = string
;
notification_filter?: LoadBalancingNotificationFilter

Filter pool and origin health notifications by resource type or health status. Use null to reset.

type LoadBalancingNotificationFilter = { origin?: LoadBalancingFilterOptions;pool?: LoadBalancingFilterOptions; } | null
;
origin_steering?: LoadBalancingOriginSteering

Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity.

interface LoadBalancingOriginSteering {
policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections";
}
;
origins: LoadBalancingOrigins

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.

type LoadBalancingOrigins = LoadBalancingOrigin[]
;
}

Responses

200 application/json

Create Pool response.

type LoadBalancingSchemasSingleResponse = type LoadBalancingApiResponseSingle = never & { result?: LoadBalancingPool
interface LoadBalancingPool {
check_regions?: LoadBalancingCheckRegions;
created_on?: LoadBalancingTimestamp;
description?: LoadBalancingSchemasDescription;
disabled_at?: LoadBalancingSchemasDisabledAt;
enabled?: LoadBalancingEnabled;
id?: LoadBalancingSchemasIdentifier;
latitude?: LoadBalancingLatitude;
load_shedding?: LoadBalancingLoadShedding;
longitude?: LoadBalancingLongitude;
minimum_origins?: LoadBalancingMinimumOrigins;
modified_on?: LoadBalancingTimestamp;
monitor?: LoadBalancingMonitorId;
name?: LoadBalancingName;
networks?: LoadBalancingNetworks;
notification_email?: LoadBalancingNotificationEmail;
notification_filter?: LoadBalancingNotificationFilter;
origin_steering?: LoadBalancingOriginSteering;
origins?: LoadBalancingOrigins;
}
; }

Client Errors

4XX application/json

Create Pool response failure.

type LoadBalancingSchemasSingleResponse = type LoadBalancingApiResponseSingle = never & { result?: LoadBalancingPool
interface LoadBalancingPool {
check_regions?: LoadBalancingCheckRegions;
created_on?: LoadBalancingTimestamp;
description?: LoadBalancingSchemasDescription;
disabled_at?: LoadBalancingSchemasDisabledAt;
enabled?: LoadBalancingEnabled;
id?: LoadBalancingSchemasIdentifier;
latitude?: LoadBalancingLatitude;
load_shedding?: LoadBalancingLoadShedding;
longitude?: LoadBalancingLongitude;
minimum_origins?: LoadBalancingMinimumOrigins;
modified_on?: LoadBalancingTimestamp;
monitor?: LoadBalancingMonitorId;
name?: LoadBalancingName;
networks?: LoadBalancingNetworks;
notification_email?: LoadBalancingNotificationEmail;
notification_filter?: LoadBalancingNotificationFilter;
origin_steering?: LoadBalancingOriginSteering;
origins?: LoadBalancingOrigins;
}
; }
& interface LoadBalancingApiResponseCommonFailure {
errors: LoadBalancingMessages
type LoadBalancingMessages = { code: number;message: string; }[]
;
messages: LoadBalancingMessages
type LoadBalancingMessages = { code: number;message: string; }[]
;
result: null;
success: false;
}