regions
Creates, updates, deletes, gets or lists a regions resource.
Overview
| Name | regions |
| Type | Resource |
| Id | cloudflare.load_balancers.regions |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get Region response.
| Name | Datatype | Description |
|---|---|---|
errors | array | |
messages | array | |
result | object | A list of countries and subdivisions mapped to a region. |
success | boolean | Whether the API call was successful. (true) |
List Regions response.
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region_id, account_id | Get a single region mapping. | |
list | select | account_id | subdivision_code, subdivision_code_a2, country_code_a2 | List all region mappings. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
region_id | string | |
country_code_a2 | string | |
subdivision_code | string | |
subdivision_code_a2 | string |
SELECT examples
- get
- list
Get a single region mapping.
SELECT
errors,
messages,
result,
success
FROM cloudflare.load_balancers.regions
WHERE region_id = '{{ region_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
List all region mappings.
SELECT
*
FROM cloudflare.load_balancers.regions
WHERE account_id = '{{ account_id }}' -- required
AND subdivision_code = '{{ subdivision_code }}'
AND subdivision_code_a2 = '{{ subdivision_code_a2 }}'
AND country_code_a2 = '{{ country_code_a2 }}'
;