Skip to content
Start here

List Regions

client.loadBalancers.regions.list(RegionListParams { account_id, country_code_a2, subdivision_code, subdivision_code_a2 } params, RequestOptionsoptions?): RegionListResponse
GET/accounts/{account_id}/load_balancers/regions

List all region mappings.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Load Balancing: Monitors and Pools WriteLoad Balancing: Monitors and Pools Read
ParametersExpand Collapse
params: RegionListParams { account_id, country_code_a2, subdivision_code, subdivision_code_a2 }
account_id: string

Path param: Identifier.

maxLength32
country_code_a2?: string

Query param: Two-letter alpha-2 country code followed in ISO 3166-1.

subdivision_code?: string

Query param: Two-letter subdivision code followed in ISO 3166-2.

subdivision_code_a2?: string

Query param: Two-letter subdivision code followed in ISO 3166-2.

ReturnsExpand Collapse
RegionListResponse = unknown | string | null
One of the following:
unknown
string | null

List Regions

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const regions = await client.loadBalancers.regions.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(regions);
{
  "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": {},
  "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": {},
  "success": true
}