Patch Pools
load_balancers.pools.bulk_edit(PoolBulkEditParams**kwargs) -> SyncSinglePage[Pool]
PATCH/accounts/{account_id}/load_balancers/pools
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.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Patch Pools
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
page = client.load_balancers.pools.bulk_edit(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
page = page.result[0]
print(page.id){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": [
{
"id": "17b5962d775c646f3f9725cbc7a53df4",
"check_regions": [
"WEU",
"ENAM"
],
"created_on": "2014-01-01T05:20:00.12345Z",
"description": "Primary data center - Provider XYZ",
"disabled_at": "2019-12-27T18:11:19.117Z",
"enabled": false,
"latitude": 0,
"load_shedding": {
"default_percent": 0,
"default_policy": "random",
"session_percent": 0,
"session_policy": "hash"
},
"longitude": 0,
"minimum_origins": 0,
"modified_on": "2014-01-01T05:20:00.12345Z",
"monitor": "monitor",
"monitor_group": "monitor_group",
"name": "primary-dc-1",
"networks": [
"string"
],
"notification_email": "someone@example.com,sometwo@example.com",
"notification_filter": {
"origin": {
"disable": true,
"healthy": true
},
"pool": {
"disable": true,
"healthy": false
}
},
"origin_steering": {
"policy": "random"
},
"origins": [
{
"address": "0.0.0.0",
"disabled_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"header": {
"Host": [
"example.com"
]
},
"name": "app-server-1",
"port": 0,
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
"weight": 0.6
}
]
}
],
"success": true,
"result_info": {
"count": 20,
"page": 1,
"per_page": 20,
"total_count": 2000,
"total_pages": 100
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": [
{
"id": "17b5962d775c646f3f9725cbc7a53df4",
"check_regions": [
"WEU",
"ENAM"
],
"created_on": "2014-01-01T05:20:00.12345Z",
"description": "Primary data center - Provider XYZ",
"disabled_at": "2019-12-27T18:11:19.117Z",
"enabled": false,
"latitude": 0,
"load_shedding": {
"default_percent": 0,
"default_policy": "random",
"session_percent": 0,
"session_policy": "hash"
},
"longitude": 0,
"minimum_origins": 0,
"modified_on": "2014-01-01T05:20:00.12345Z",
"monitor": "monitor",
"monitor_group": "monitor_group",
"name": "primary-dc-1",
"networks": [
"string"
],
"notification_email": "someone@example.com,sometwo@example.com",
"notification_filter": {
"origin": {
"disable": true,
"healthy": true
},
"pool": {
"disable": true,
"healthy": false
}
},
"origin_steering": {
"policy": "random"
},
"origins": [
{
"address": "0.0.0.0",
"disabled_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"header": {
"Host": [
"example.com"
]
},
"name": "app-server-1",
"port": 0,
"virtual_network_id": "a5624d4e-044a-4ff0-b3e1-e2465353d4b4",
"weight": 0.6
}
]
}
],
"success": true,
"result_info": {
"count": 20,
"page": 1,
"per_page": 20,
"total_count": 2000,
"total_pages": 100
}
}