# Pools ## List Pools `client.loadBalancers.pools.list(PoolListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/load_balancers/pools` List configured pools. ### Parameters - `params: PoolListParams` - `account_id: string` Path param: Identifier. - `monitor?: string` Query param: The ID of the Monitor to use for checking the health of origins within this pool. ### Returns - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const pool of client.loadBalancers.pools.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(pool.id); } ``` #### Response ```json { "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 } } ``` ## Pool Details `client.loadBalancers.pools.get(stringpoolId, PoolGetParamsparams, RequestOptionsoptions?): Pool` **get** `/accounts/{account_id}/load_balancers/pools/{pool_id}` Fetch a single configured pool. ### Parameters - `poolId: string` - `params: PoolGetParams` - `account_id: string` Identifier. ### Returns - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const pool = await client.loadBalancers.pools.get('17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(pool.id); ``` #### Response ```json { "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 } ``` ## Create Pool `client.loadBalancers.pools.create(PoolCreateParamsparams, RequestOptionsoptions?): Pool` **post** `/accounts/{account_id}/load_balancers/pools` Create a new pool. ### Parameters - `params: PoolCreateParams` - `account_id: string` Path param: Identifier. - `name: string` Body param: A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `origins: Array` Body param: 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. - `description?: string` Body param: A human-readable description of the pool. - `enabled?: boolean` Body param: 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). - `latitude?: number` Body param: 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. - `load_shedding?: LoadShedding | null` Body param: Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` Body param: 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?: number` Body param: 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. - `monitor?: string` Body param: The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` Body param: The ID of the Monitor Group to use for checking the health of origins within this pool. - `notification_email?: string` Body param: 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. - `notification_filter?: NotificationFilter | null` Body param: Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Body param: Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` ### Returns - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const pool = await client.loadBalancers.pools.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', name: 'primary-dc-1', origins: [{}], }); console.log(pool.id); ``` #### Response ```json { "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 } ``` ## Update Pool `client.loadBalancers.pools.update(stringpoolId, PoolUpdateParamsparams, RequestOptionsoptions?): Pool` **put** `/accounts/{account_id}/load_balancers/pools/{pool_id}` Modify a configured pool. ### Parameters - `poolId: string` - `params: PoolUpdateParams` - `account_id: string` Path param: Identifier. - `name: string` Body param: A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `origins: Array` Body param: 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. - `check_regions?: Array | null` Body param: A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `description?: string` Body param: A human-readable description of the pool. - `enabled?: boolean` Body param: 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). - `latitude?: number` Body param: 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. - `load_shedding?: LoadShedding | null` Body param: Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` Body param: 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?: number` Body param: 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. - `monitor?: string` Body param: The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` Body param: The ID of the Monitor Group to use for checking the health of origins within this pool. - `notification_email?: string` Body param: 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. - `notification_filter?: NotificationFilter | null` Body param: Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Body param: Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` ### Returns - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const pool = await client.loadBalancers.pools.update('17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', name: 'primary-dc-1', origins: [{}], }); console.log(pool.id); ``` #### Response ```json { "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 } ``` ## Patch Pool `client.loadBalancers.pools.edit(stringpoolId, PoolEditParamsparams, RequestOptionsoptions?): Pool` **patch** `/accounts/{account_id}/load_balancers/pools/{pool_id}` Apply changes to an existing pool, overwriting the supplied properties. ### Parameters - `poolId: string` - `params: PoolEditParams` - `account_id: string` Path param: Identifier. - `check_regions?: Array | null` Body param: A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `description?: string` Body param: A human-readable description of the pool. - `enabled?: boolean` Body param: 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). - `latitude?: number` Body param: 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. - `load_shedding?: LoadShedding | null` Body param: Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` Body param: 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?: number` Body param: 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. - `monitor?: string` Body param: The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` Body param: The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` Body param: A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `notification_email?: string` Body param: 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. - `notification_filter?: NotificationFilter | null` Body param: Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Body param: Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` Body param: 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Returns - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const pool = await client.loadBalancers.pools.edit('17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(pool.id); ``` #### Response ```json { "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 } ``` ## Delete Pool `client.loadBalancers.pools.delete(stringpoolId, PoolDeleteParamsparams, RequestOptionsoptions?): PoolDeleteResponse` **delete** `/accounts/{account_id}/load_balancers/pools/{pool_id}` Delete a configured pool. ### Parameters - `poolId: string` - `params: PoolDeleteParams` - `account_id: string` Identifier. ### Returns - `PoolDeleteResponse` - `id?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const pool = await client.loadBalancers.pools.delete('17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(pool.id); ``` #### Response ```json { "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" }, "success": true } ``` ## Patch Pools `client.loadBalancers.pools.bulkEdit(PoolBulkEditParamsparams, RequestOptionsoptions?): SinglePage` **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`. ### Parameters - `params: PoolBulkEditParams` - `account_id: string` Path param: Identifier. - `notification_email?: ""` Body param: The email address to send health status notifications to. This field is now deprecated in favor of Cloudflare Notifications for Load Balancing, so only resetting this field with an empty string `""` is accepted. - `""` ### Returns - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const pool of client.loadBalancers.pools.bulkEdit({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(pool.id); } ``` #### Response ```json { "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 } } ``` ## Domain Types ### Pool - `Pool` - `id?: string` - `check_regions?: Array | null` A list of regions from which to run health checks. Null means every Cloudflare data center. - `"WNAM"` - `"ENAM"` - `"WEU"` - `"EEU"` - `"NSAM"` - `"SSAM"` - `"OC"` - `"ME"` - `"NAF"` - `"SAF"` - `"SAS"` - `"SEAS"` - `"NEAS"` - `"ALL_REGIONS"` - `created_on?: string` - `description?: string` A human-readable description of the pool. - `disabled_at?: string` This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. - `enabled?: boolean` 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). - `latitude?: number` 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. - `load_shedding?: LoadShedding | null` Configures load shedding policies and percentages for the pool. - `default_percent?: number` The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. - `default_policy?: "random" | "hash"` 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. - `"random"` - `"hash"` - `session_percent?: number` The percent of existing sessions to shed from the pool, according to the session policy. - `session_policy?: "hash"` Only the hash policy is supported for existing sessions (to avoid exponential decay). - `"hash"` - `longitude?: number` 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?: number` 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. - `modified_on?: string` - `monitor?: string` The ID of the Monitor to use for checking the health of origins within this pool. - `monitor_group?: string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `name?: string` A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. - `networks?: Array` List of networks where Load Balancer or Pool is enabled. - `notification_email?: string` 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. - `notification_filter?: NotificationFilter | null` Filter pool and origin health notifications by resource type or health status. Use null to reset. - `origin?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `disable?: boolean | null` If set true, disable notifications for this type of resource (pool or origin). - `healthy?: boolean | null` If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). - `pool?: FilterOptions | null` Filter options for a particular resource type (pool or origin). Use null to reset. - `origin_steering?: OriginSteering | null` Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. - `policy?: "random" | "hash" | "least_outstanding_requests" | "least_connections"` 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. - `"random"` - `"hash"` - `"least_outstanding_requests"` - `"least_connections"` - `origins?: Array` 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. - `address?: string` 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. - `disabled_at?: string` This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. - `enabled?: boolean` 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. - `header?: Header` The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. - `Host?: Array` The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. - `name?: string` A human-identifiable name for the origin. - `port?: number` The port for upstream connections. A value of 0 means the default port for the protocol will be used. - `virtual_network_id?: string` The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. - `weight?: number` 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. ### Pool Delete Response - `PoolDeleteResponse` - `id?: string` # Health ## Pool Health Details `client.loadBalancers.pools.health.get(stringpoolId, HealthGetParamsparams, RequestOptionsoptions?): HealthGetResponse` **get** `/accounts/{account_id}/load_balancers/pools/{pool_id}/health` Fetch the latest pool health status for a single pool. ### Parameters - `poolId: string` - `params: HealthGetParams` - `account_id: string` Identifier. ### Returns - `HealthGetResponse` A list of regions from which to run health checks. Null means every Cloudflare data center. - `pool_id?: string` Pool ID. - `pop_health?: POPHealth` List of regions and associated health status. - `healthy?: boolean` Whether health check in region is healthy. - `origins?: Array` - `ip?: IP` - `failure_reason?: string` Failure reason. - `healthy?: boolean` Origin health status. - `response_code?: number` Response code from origin health check. - `rtt?: string` Origin RTT (Round Trip Time) response. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const health = await client.loadBalancers.pools.health.get('17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(health.pool_id); ``` #### Response ```json { "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": { "pool_id": "17b5962d775c646f3f9725cbc7a53df4", "pop_health": { "healthy": true, "origins": [ { "ip": { "failure_reason": "No failure reasons", "healthy": true, "response_code": 200, "rtt": "201.5ms" } } ] } }, "success": true } ``` ## Preview Pool `client.loadBalancers.pools.health.create(stringpoolId, HealthCreateParamsparams, RequestOptionsoptions?): HealthCreateResponse` **post** `/accounts/{account_id}/load_balancers/pools/{pool_id}/preview` Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results. ### Parameters - `poolId: string` - `params: HealthCreateParams` - `account_id: string` Path param: Identifier. - `allow_insecure?: boolean` Body param: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. - `consecutive_down?: number` Body param: To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times. - `consecutive_up?: number` Body param: To be marked healthy the monitored origin must pass this healthcheck N consecutive times. - `description?: string` Body param: Object description. - `expected_body?: string` Body param: A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. - `expected_codes?: string` Body param: The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors. - `follow_redirects?: boolean` Body param: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. - `header?: Record>` Body param: The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. - `interval?: number` Body param: The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations. - `method?: string` Body param: The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks. - `path_?: string` Body param: The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors. - `port?: number | null` Body param: The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443). - `probe_zone?: string` Body param: Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors. - `retries?: number` Body param: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. - `timeout?: number` Body param: The timeout (in seconds) before marking the health check as failed. - `type?: "http" | "https" | "tcp" | 3 more` Body param: The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. - `"http"` - `"https"` - `"tcp"` - `"udp_icmp"` - `"icmp_ping"` - `"smtp"` ### Returns - `HealthCreateResponse` - `pools?: Record` Monitored pool IDs mapped to their respective names. - `preview_id?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const health = await client.loadBalancers.pools.health.create('17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(health.preview_id); ``` #### Response ```json { "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": { "pools": { "abwlnp5jbqn45ecgxd03erbgtxtqai0d": "WNAM Datacenter", "ve8h9lrcip5n5bbga9yqmdws28ay5d0l": "EEU Datacenter" }, "preview_id": "f1aba936b94213e5b8dca0c0dbf1f9cc" }, "success": true } ``` ## Domain Types ### Health Get Response - `HealthGetResponse` A list of regions from which to run health checks. Null means every Cloudflare data center. - `pool_id?: string` Pool ID. - `pop_health?: POPHealth` List of regions and associated health status. - `healthy?: boolean` Whether health check in region is healthy. - `origins?: Array` - `ip?: IP` - `failure_reason?: string` Failure reason. - `healthy?: boolean` Origin health status. - `response_code?: number` Response code from origin health check. - `rtt?: string` Origin RTT (Round Trip Time) response. ### Health Create Response - `HealthCreateResponse` - `pools?: Record` Monitored pool IDs mapped to their respective names. - `preview_id?: string` # References ## List Pool References `client.loadBalancers.pools.references.get(stringpoolId, ReferenceGetParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/load_balancers/pools/{pool_id}/references` Get the list of resources that reference the provided pool. ### Parameters - `poolId: string` - `params: ReferenceGetParams` - `account_id: string` Identifier. ### Returns - `ReferenceGetResponse` - `reference_type?: "*" | "referral" | "referrer"` - `"*"` - `"referral"` - `"referrer"` - `resource_id?: string` - `resource_name?: string` - `resource_type?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const referenceGetResponse of client.loadBalancers.pools.references.get( '17b5962d775c646f3f9725cbc7a53df4', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, )) { console.log(referenceGetResponse.resource_id); } ``` #### Response ```json { "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": [ { "reference_type": "referrer", "resource_id": "699d98642c564d2e855e9661899b7252", "resource_name": "www.example.com", "resource_type": "load_balancer" }, { "reference_type": "referral", "resource_id": "f1aba936b94213e5b8dca0c0dbf1f9cc", "resource_name": "Login page monitor", "resource_type": "monitor" } ], "success": true } ``` ## Domain Types ### Reference Get Response - `ReferenceGetResponse` - `reference_type?: "*" | "referral" | "referrer"` - `"*"` - `"referral"` - `"referrer"` - `resource_id?: string` - `resource_name?: string` - `resource_type?: string`