Pool Details
client.LoadBalancers.Pools.Get(ctx, poolID, query) (*Pool, error)
GET/accounts/{account_id}/load_balancers/pools/{pool_id}
Fetch a single configured pool.
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)
Pool Details
package main
import (
"context"
"fmt"
"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/load_balancers"
"github.com/cloudflare/cloudflare-go/option"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
pool, err := client.LoadBalancers.Pools.Get(
context.TODO(),
"17b5962d775c646f3f9725cbc7a53df4",
load_balancers.PoolGetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", pool.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
}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
}