POST /user/load_balancers/pools

Create a new pool.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
check_regions[] Array No

A list of regions from which to run health checks. Null means every Cloudflare data center.

load_shedding Object No

Configures load shedding policies and percentages for the pool.

load_shedding.session_policy String No

Only the hash policy is supported for existing sessions (to avoid exponential decay).

Possible values:

  • "hash"

Default value: "hash"

load_shedding.default_percent Number No

The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.

Default value: 0

load_shedding.default_policy String No

The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.

Possible values:

  • "random"
  • "hash"

Default value: "random"

load_shedding.session_percent Number No

The percent of existing sessions to shed from the pool, according to the session policy.

Default value: 0

description String No

A human-readable description of the pool.

notification_filter Object No

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

notification_filter.pool Object No

Filter options for a particular resource type (pool or origin). Use null to reset.

notification_filter.pool.disable Boolean No

If set true, disable notifications for this type of resource (pool or origin).

Default value: false

notification_filter.pool.healthy Boolean No

If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).

notification_filter.origin Object No

Filter options for a particular resource type (pool or origin). Use null to reset.

notification_filter.origin.disable Boolean No

If set true, disable notifications for this type of resource (pool or origin).

Default value: false

notification_filter.origin.healthy Boolean No

If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).

origin_steering Object No

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

origin_steering.policy String No

The type of origin steering policy to use.

  • "random": Select an origin randomly.
  • "hash": Select an origin by computing a hash over the CF-Connecting-IP address.
  • "least_outstanding_requests": Select an origin by taking into consideration origin weights, as well as each origin's number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.
  • "least_connections": Select an origin by taking into consideration origin weights, as well as each origin's number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.

Possible values:

  • "least_connections"
  • "least_outstanding_requests"
  • "random"
  • "hash"

Default value: "random"

latitude Number No

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.

name String Yes

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

networks[] Array No

List of networks where Load Balancer or Pool is enabled.

longitude Number No

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.

minimum_origins Integer No

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.

Default value: 1

notification_email String No

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.

origins[] Array Yes

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.

origins[].port Integer No

The port for upstream connections. A value of 0 means the default port for the protocol will be used.

Default value: 0

origins[].name String No

A human-identifiable name for the origin.

origins[].header Object No

The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'.

origins[].header.Host[] Array No

The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin.

origins[].enabled Boolean No

Whether to enable (the default) this origin within the pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

Default value: true

origins[].virtual_network_id String No

The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account.

origins[].disabled_at String No

This field shows up only if the origin is disabled. This field is set with the time the origin was disabled.

origins[].weight Number No

The weight of this origin relative to other origins in the pool. Based on the configured weight the total traffic is distributed among origins within the pool.

  • origin_steering.policy="least_outstanding_requests": Use weight to scale the origin's outstanding requests.
  • origin_steering.policy="least_connections": Use weight to scale the origin's open connections.

Default value: 1

origins[].address String No

The IP address (IPv4 or IPv6) of the origin, or its publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare. To set an internal/reserved address, virtual_network_id must also be set.

enabled Boolean No

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).

Default value: true

monitor String No

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.