account or zone Load Balancer Details·续2

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20condition">Link to this property</a>

disabled: optional boolean

Disable this specific rule. It will no longer be evaluated by this load balancer.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20disabled">Link to this property</a>

<details>

<summary>

fixed_response: optional object {content_type, location, message_body, status_code }

A collection of fields used to directly respond to the client instead of routing to a pool. When supplied on a rule, that rule stops further rule evaluation.

</summary>

content_type: optional string

The http ‘Content-Type’ header to include in the response.

maxLength32

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20content_type">Link to this property</a>

location: optional string

The http ‘Location’ header to include in the response.

maxLength2048

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20location">Link to this property</a>

message_body: optional string

Text to include as the http body.

maxLength1024

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20message_body">Link to this property</a>

status_code: optional number

The http status code to respond with.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20status_code">Link to this property</a>

</details>

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20fixed_response">Link to this property</a>

name: optional string

Name of this rule. Only used for human readability.

maxLength200

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

overrides: optional object {adaptive_routing, country_pools, default_pools, 13 more }

A collection of overrides to apply when this rule’s condition (or a pool set’s <code>match</code>) is true. All fields are optional.

</summary>

<details>

<summary>

adaptive_routing: optional <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20adaptive_routing%20%3E%20(schema)">AdaptiveRouting</a> { failover_across_pools }

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.

</summary>

failover_across_pools: optional boolean

Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See <code>session_affinity_attributes</code> for control over when sessions are broken or reassigned.

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20adaptive_routing%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20adaptive_routing%20%3E%20(schema)%20%3E%20(property)%20failover_across_pools">Link to this property</a>

</details>

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20adaptive_routing">Link to this property</a>

country_pools: optional map[array of string]

A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region_pool mapping if it exists else to default_pools.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20country_pools">Link to this property</a>

default_pools: optional array of <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20default_pools%20%3E%20(schema)">DefaultPools</a>

A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20default_pools">Link to this property</a>

fallback_pool: optional string

The pool ID to use when all other pools are detected as unhealthy.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20fallback_pool">Link to this property</a>

<details>

<summary>

location_strategy: optional <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)">LocationStrategy</a> { mode, prefer_ecs }

Controls location-based steering for non-proxied requests. See <code>steering_policy</code> to learn how steering is affected.

</summary>

<details>

<summary>

mode: optional "pop"or "resolver_ip"

Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.

  • <code>"pop"</code>: Use the Cloudflare PoP location.
  • <code>"resolver_ip"</code>: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.

</summary>

One of the following:

"pop"

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20mode%20%3E%20(member)%200">Link to this property</a>

"resolver_ip"

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20mode">Link to this property</a>

<details>

<summary>

prefer_ecs: optional "always"or "never"or "proximity"or "geo"

Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.

  • <code>"always"</code>: Always prefer ECS.
  • <code>"never"</code>: Never prefer ECS.
  • <code>"proximity"</code>: Prefer ECS only when <code>steering_policy="proximity"</code>.
  • <code>"geo"</code>: Prefer ECS only when <code>steering_policy="geo"</code>.

</summary>

One of the following:

"always"

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%200">Link to this property</a>

"never"

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%201">Link to this property</a>

"proximity"

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%202">Link to this property</a>

"geo"

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs">Link to this property</a>

</details>

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20location_strategy">Link to this property</a>

pool_default_weight: optional number

The default weight for pools not listed in <code>pool_weights</code>. The declarative alternative to <code>random_steering.default_weight</code>; mutually exclusive with <code>random_steering</code>.

maximum1

minimum0

multipleOf0.1

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20pool_default_weight">Link to this property</a>

pool_weights: optional map[number]

A mapping of pool IDs to custom weights, relative to the other pools. The declarative alternative to <code>random_steering.pool_weights</code>; mutually exclusive with <code>random_steering</code>.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20pool_weights">Link to this property</a>

pools: optional array of string

A flat, ordered list of pool IDs to route the matched audience to. Replaces the resolved topology with exactly these pools. Mutually exclusive with <code>fixed_response</code>.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20pools">Link to this property</a>

pop_pools: optional map[array of string]

Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country_pool, then region_pool mapping if it exists else to default_pools.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20pop_pools">Link to this property</a>

<details>

<summary>

random_steering: optional <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20random_steering%20%3E%20(schema)">RandomSteering</a> { default_weight, pool_weights }

Configures pool weights.

  • <code>steering_policy="random"</code>: A random pool is selected with probability proportional to pool weights.
  • <code>steering_policy="least_outstanding_requests"</code>: Use pool weights to scale each pool’s outstanding requests.
  • <code>steering_policy="least_connections"</code>: Use pool weights to scale each pool’s open connections.

</summary>

default_weight: optional number

The default weight for pools in the load balancer that are not specified in the pool_weights map.

maximum1

minimum0

multipleOf0.1

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20random_steering%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20random_steering%20%3E%20(schema)%20%3E%20(property)%20default_weight">Link to this property</a>

pool_weights: optional map[number]

A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.

<a href="#(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20random_steering%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20random_steering%20%3E%20(schema)%20%3E%20(property)%20pool_weights">Link to this property</a>

</details>

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20random_steering">Link to this property</a>

region_pools: optional map[array of string]

A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools.

<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20rules%20%3E%20(schema)%20%3E%20(property)%20overrides%20%3E%20(property)%20region_pools">Link to this property</a>

<details>

<summary>

session_affinity: optional <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20session_affinity%20%3E%20(schema)">SessionAffinity</a>

Specifies the type of session affinity the load balancer should use unless specified as <code>"none"</code>. The supported types are: - <code>"cookie"</code>: 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. - <code>"ip_cookie"</code>: Behaves the same as <code>"cookie"</code> except the initial origin selection is stable and based on the client’s ip address. - <code>"header"</code>: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see <code>session_affinity_attributes.headers</code>) 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 of <code>session_affinity_ttl</code> seconds or the origin server is unhealthy, then a new origin server is calculated and used. See <code>headers</code> in <code>session_affinity_attributes</code> for additional required configuration.