@@ -389,7 +389,7 @@ export interface LoadBalancer {
389
389
* `headers` in `session_affinity_attributes` for additional required
390
390
* configuration.
391
391
*/
392
- session_affinity ?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
392
+ session_affinity ?: SessionAffinity ;
393
393
394
394
/**
395
395
* Configures attributes for session affinity.
@@ -434,15 +434,7 @@ export interface LoadBalancer {
434
434
* - `""`: Will map to `"geo"` if you use
435
435
* `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
436
436
*/
437
- steering_policy ?:
438
- | 'off'
439
- | 'geo'
440
- | 'random'
441
- | 'dynamic_latency'
442
- | 'proximity'
443
- | 'least_outstanding_requests'
444
- | 'least_connections'
445
- | '""' ;
437
+ steering_policy ?: SteeringPolicy ;
446
438
447
439
/**
448
440
* Time to live (TTL) of the DNS entry for the IP address returned by this load
@@ -967,7 +959,7 @@ export namespace Rules {
967
959
* `headers` in `session_affinity_attributes` for additional required
968
960
* configuration.
969
961
*/
970
- session_affinity ?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
962
+ session_affinity ?: LoadBalancersAPI . SessionAffinity ;
971
963
972
964
/**
973
965
* Configures attributes for session affinity.
@@ -1012,15 +1004,7 @@ export namespace Rules {
1012
1004
* - `""`: Will map to `"geo"` if you use
1013
1005
* `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1014
1006
*/
1015
- steering_policy ?:
1016
- | 'off'
1017
- | 'geo'
1018
- | 'random'
1019
- | 'dynamic_latency'
1020
- | 'proximity'
1021
- | 'least_outstanding_requests'
1022
- | 'least_connections'
1023
- | '""' ;
1007
+ steering_policy ?: LoadBalancersAPI . SteeringPolicy ;
1024
1008
1025
1009
/**
1026
1010
* Time to live (TTL) of the DNS entry for the IP address returned by this load
@@ -1202,7 +1186,7 @@ export namespace RulesParam {
1202
1186
* `headers` in `session_affinity_attributes` for additional required
1203
1187
* configuration.
1204
1188
*/
1205
- session_affinity ?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
1189
+ session_affinity ?: LoadBalancersAPI . SessionAffinityParam ;
1206
1190
1207
1191
/**
1208
1192
* Configures attributes for session affinity.
@@ -1247,15 +1231,7 @@ export namespace RulesParam {
1247
1231
* - `""`: Will map to `"geo"` if you use
1248
1232
* `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1249
1233
*/
1250
- steering_policy ?:
1251
- | 'off'
1252
- | 'geo'
1253
- | 'random'
1254
- | 'dynamic_latency'
1255
- | 'proximity'
1256
- | 'least_outstanding_requests'
1257
- | 'least_connections'
1258
- | '""' ;
1234
+ steering_policy ?: LoadBalancersAPI . SteeringPolicyParam ;
1259
1235
1260
1236
/**
1261
1237
* Time to live (TTL) of the DNS entry for the IP address returned by this load
@@ -1265,6 +1241,60 @@ export namespace RulesParam {
1265
1241
}
1266
1242
}
1267
1243
1244
+ /**
1245
+ * Specifies the type of session affinity the load balancer should use unless
1246
+ * specified as `"none"` or "" (default). The supported types are:
1247
+ *
1248
+ * - `"cookie"`: On the first request to a proxied load balancer, a cookie is
1249
+ * generated, encoding information of which origin the request will be forwarded
1250
+ * to. Subsequent requests, by the same client to the same load balancer, will be
1251
+ * sent to the origin server the cookie encodes, for the duration of the cookie
1252
+ * and as long as the origin server remains healthy. If the cookie has expired or
1253
+ * the origin server is unhealthy, then a new origin server is calculated and
1254
+ * used.
1255
+ * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin
1256
+ * selection is stable and based on the client's ip address.
1257
+ * - `"header"`: On the first request to a proxied load balancer, a session key
1258
+ * based on the configured HTTP headers (see
1259
+ * `session_affinity_attributes.headers`) is generated, encoding the request
1260
+ * headers used for storing in the load balancer session state which origin the
1261
+ * request will be forwarded to. Subsequent requests to the load balancer with
1262
+ * the same headers will be sent to the same origin server, for the duration of
1263
+ * the session and as long as the origin server remains healthy. If the session
1264
+ * has been idle for the duration of `session_affinity_ttl` seconds or the origin
1265
+ * server is unhealthy, then a new origin server is calculated and used. See
1266
+ * `headers` in `session_affinity_attributes` for additional required
1267
+ * configuration.
1268
+ */
1269
+ export type SessionAffinity = 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
1270
+
1271
+ /**
1272
+ * Specifies the type of session affinity the load balancer should use unless
1273
+ * specified as `"none"` or "" (default). The supported types are:
1274
+ *
1275
+ * - `"cookie"`: On the first request to a proxied load balancer, a cookie is
1276
+ * generated, encoding information of which origin the request will be forwarded
1277
+ * to. Subsequent requests, by the same client to the same load balancer, will be
1278
+ * sent to the origin server the cookie encodes, for the duration of the cookie
1279
+ * and as long as the origin server remains healthy. If the cookie has expired or
1280
+ * the origin server is unhealthy, then a new origin server is calculated and
1281
+ * used.
1282
+ * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin
1283
+ * selection is stable and based on the client's ip address.
1284
+ * - `"header"`: On the first request to a proxied load balancer, a session key
1285
+ * based on the configured HTTP headers (see
1286
+ * `session_affinity_attributes.headers`) is generated, encoding the request
1287
+ * headers used for storing in the load balancer session state which origin the
1288
+ * request will be forwarded to. Subsequent requests to the load balancer with
1289
+ * the same headers will be sent to the same origin server, for the duration of
1290
+ * the session and as long as the origin server remains healthy. If the session
1291
+ * has been idle for the duration of `session_affinity_ttl` seconds or the origin
1292
+ * server is unhealthy, then a new origin server is calculated and used. See
1293
+ * `headers` in `session_affinity_attributes` for additional required
1294
+ * configuration.
1295
+ */
1296
+ export type SessionAffinityParam = 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
1297
+
1268
1298
/**
1269
1299
* Configures attributes for session affinity.
1270
1300
*/
@@ -1399,6 +1429,74 @@ export interface SessionAffinityAttributesParam {
1399
1429
zero_downtime_failover ?: 'none' | 'temporary' | 'sticky' ;
1400
1430
}
1401
1431
1432
+ /**
1433
+ * Steering Policy for this load balancer.
1434
+ *
1435
+ * - `"off"`: Use `default_pools`.
1436
+ * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied
1437
+ * requests, the country for `country_pools` is determined by
1438
+ * `location_strategy`.
1439
+ * - `"random"`: Select a pool randomly.
1440
+ * - `"dynamic_latency"`: Use round trip time to select the closest pool in
1441
+ * default_pools (requires pool health checks).
1442
+ * - `"proximity"`: Use the pools' latitude and longitude to select the closest
1443
+ * pool using the Cloudflare PoP location for proxied requests or the location
1444
+ * determined by `location_strategy` for non-proxied requests.
1445
+ * - `"least_outstanding_requests"`: Select a pool by taking into consideration
1446
+ * `random_steering` weights, as well as each pool's number of outstanding
1447
+ * requests. Pools with more pending requests are weighted proportionately less
1448
+ * relative to others.
1449
+ * - `"least_connections"`: Select a pool by taking into consideration
1450
+ * `random_steering` weights, as well as each pool's number of open connections.
1451
+ * Pools with more open connections are weighted proportionately less relative to
1452
+ * others. Supported for HTTP/1 and HTTP/2 connections.
1453
+ * - `""`: Will map to `"geo"` if you use
1454
+ * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1455
+ */
1456
+ export type SteeringPolicy =
1457
+ | 'off'
1458
+ | 'geo'
1459
+ | 'random'
1460
+ | 'dynamic_latency'
1461
+ | 'proximity'
1462
+ | 'least_outstanding_requests'
1463
+ | 'least_connections'
1464
+ | '""' ;
1465
+
1466
+ /**
1467
+ * Steering Policy for this load balancer.
1468
+ *
1469
+ * - `"off"`: Use `default_pools`.
1470
+ * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied
1471
+ * requests, the country for `country_pools` is determined by
1472
+ * `location_strategy`.
1473
+ * - `"random"`: Select a pool randomly.
1474
+ * - `"dynamic_latency"`: Use round trip time to select the closest pool in
1475
+ * default_pools (requires pool health checks).
1476
+ * - `"proximity"`: Use the pools' latitude and longitude to select the closest
1477
+ * pool using the Cloudflare PoP location for proxied requests or the location
1478
+ * determined by `location_strategy` for non-proxied requests.
1479
+ * - `"least_outstanding_requests"`: Select a pool by taking into consideration
1480
+ * `random_steering` weights, as well as each pool's number of outstanding
1481
+ * requests. Pools with more pending requests are weighted proportionately less
1482
+ * relative to others.
1483
+ * - `"least_connections"`: Select a pool by taking into consideration
1484
+ * `random_steering` weights, as well as each pool's number of open connections.
1485
+ * Pools with more open connections are weighted proportionately less relative to
1486
+ * others. Supported for HTTP/1 and HTTP/2 connections.
1487
+ * - `""`: Will map to `"geo"` if you use
1488
+ * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1489
+ */
1490
+ export type SteeringPolicyParam =
1491
+ | 'off'
1492
+ | 'geo'
1493
+ | 'random'
1494
+ | 'dynamic_latency'
1495
+ | 'proximity'
1496
+ | 'least_outstanding_requests'
1497
+ | 'least_connections'
1498
+ | '""' ;
1499
+
1402
1500
export interface LoadBalancerDeleteResponse {
1403
1501
id ?: string ;
1404
1502
}
@@ -1521,7 +1619,7 @@ export interface LoadBalancerCreateParams {
1521
1619
* `headers` in `session_affinity_attributes` for additional required
1522
1620
* configuration.
1523
1621
*/
1524
- session_affinity ?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
1622
+ session_affinity ?: SessionAffinityParam ;
1525
1623
1526
1624
/**
1527
1625
* Body param: Configures attributes for session affinity.
@@ -1567,15 +1665,7 @@ export interface LoadBalancerCreateParams {
1567
1665
* - `""`: Will map to `"geo"` if you use
1568
1666
* `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1569
1667
*/
1570
- steering_policy ?:
1571
- | 'off'
1572
- | 'geo'
1573
- | 'random'
1574
- | 'dynamic_latency'
1575
- | 'proximity'
1576
- | 'least_outstanding_requests'
1577
- | 'least_connections'
1578
- | '""' ;
1668
+ steering_policy ?: SteeringPolicyParam ;
1579
1669
1580
1670
/**
1581
1671
* Body param: Time to live (TTL) of the DNS entry for the IP address returned by
@@ -1708,7 +1798,7 @@ export interface LoadBalancerUpdateParams {
1708
1798
* `headers` in `session_affinity_attributes` for additional required
1709
1799
* configuration.
1710
1800
*/
1711
- session_affinity ?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
1801
+ session_affinity ?: SessionAffinityParam ;
1712
1802
1713
1803
/**
1714
1804
* Body param: Configures attributes for session affinity.
@@ -1754,15 +1844,7 @@ export interface LoadBalancerUpdateParams {
1754
1844
* - `""`: Will map to `"geo"` if you use
1755
1845
* `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1756
1846
*/
1757
- steering_policy ?:
1758
- | 'off'
1759
- | 'geo'
1760
- | 'random'
1761
- | 'dynamic_latency'
1762
- | 'proximity'
1763
- | 'least_outstanding_requests'
1764
- | 'least_connections'
1765
- | '""' ;
1847
+ steering_policy ?: SteeringPolicyParam ;
1766
1848
1767
1849
/**
1768
1850
* Body param: Time to live (TTL) of the DNS entry for the IP address returned by
@@ -1903,7 +1985,7 @@ export interface LoadBalancerEditParams {
1903
1985
* `headers` in `session_affinity_attributes` for additional required
1904
1986
* configuration.
1905
1987
*/
1906
- session_affinity ?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""' ;
1988
+ session_affinity ?: SessionAffinityParam ;
1907
1989
1908
1990
/**
1909
1991
* Body param: Configures attributes for session affinity.
@@ -1949,15 +2031,7 @@ export interface LoadBalancerEditParams {
1949
2031
* - `""`: Will map to `"geo"` if you use
1950
2032
* `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
1951
2033
*/
1952
- steering_policy ?:
1953
- | 'off'
1954
- | 'geo'
1955
- | 'random'
1956
- | 'dynamic_latency'
1957
- | 'proximity'
1958
- | 'least_outstanding_requests'
1959
- | 'least_connections'
1960
- | '""' ;
2034
+ steering_policy ?: SteeringPolicyParam ;
1961
2035
1962
2036
/**
1963
2037
* Body param: Time to live (TTL) of the DNS entry for the IP address returned by
0 commit comments