regional_hostnames
Creates, updates, deletes, gets or lists a regional_hostnames resource.
Overview
| Name | regional_hostnames |
| Type | Resource |
| Id | cloudflare.addressing.regional_hostnames |
Fields
The following fields are returned by SELECT queries:
- get
- list
Fetch hostname response
| Name | Datatype | Description |
|---|---|---|
created_on | string (date-time) | When the regional hostname was created (example: 2014-01-01T05:20:00.12345Z) |
hostname | string | DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com (example: foo.example.com) |
region_key | string | Identifying key for the region (example: ca) |
routing | string | Configure which routing method to use for the regional hostname (default: dns, example: dns) |
List hostnames response
| Name | Datatype | Description |
|---|---|---|
created_on | string (date-time) | When the regional hostname was created (example: 2014-01-01T05:20:00.12345Z) |
hostname | string | DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com (example: foo.example.com) |
region_key | string | Identifying key for the region (example: ca) |
routing | string | Configure which routing method to use for the regional hostname (default: dns, example: dns) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_id, hostname | Fetch the configuration for a specific Regional Hostname, within a zone. | |
list | select | zone_id | List all Regional Hostnames within a zone. | |
create | insert | zone_id, hostname, region_key | Create a new Regional Hostname entry. Cloudflare will only use data centers that are physically located within the chosen region to decrypt and service HTTPS traffic. Learn more about Regional Services. | |
edit | update | zone_id, hostname, region_key | Update the configuration for a specific Regional Hostname. Only the region_key of a hostname is mutable. | |
delete | delete | zone_id, hostname | Delete the region configuration for a specific Regional Hostname. |
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 |
|---|---|---|
hostname | string | |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get
- list
Fetch the configuration for a specific Regional Hostname, within a zone.
SELECT
created_on,
hostname,
region_key,
routing
FROM cloudflare.addressing.regional_hostnames
WHERE zone_id = '{{ zone_id }}' -- required
AND hostname = '{{ hostname }}' -- required
;
List all Regional Hostnames within a zone.
SELECT
created_on,
hostname,
region_key,
routing
FROM cloudflare.addressing.regional_hostnames
WHERE zone_id = '{{ zone_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a new Regional Hostname entry. Cloudflare will only use data centers that are physically located within the chosen region to decrypt and service HTTPS traffic. Learn more about Regional Services.
INSERT INTO cloudflare.addressing.regional_hostnames (
hostname,
region_key,
routing,
zone_id
)
SELECT
'{{ hostname }}' /* required */,
'{{ region_key }}' /* required */,
'{{ routing }}',
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: regional_hostnames
props:
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the regional_hostnames resource.
- name: hostname
value: "{{ hostname }}"
description: |
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`
- name: region_key
value: "{{ region_key }}"
description: |
Identifying key for the region
- name: routing
value: "{{ routing }}"
description: |
Configure which routing method to use for the regional hostname
default: dns
UPDATE examples
- edit
Update the configuration for a specific Regional Hostname. Only the region_key of a hostname is mutable.
UPDATE cloudflare.addressing.regional_hostnames
SET
region_key = '{{ region_key }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND hostname = '{{ hostname }}' --required
AND region_key = '{{ region_key }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Delete the region configuration for a specific Regional Hostname.
DELETE FROM cloudflare.addressing.regional_hostnames
WHERE zone_id = '{{ zone_id }}' --required
AND hostname = '{{ hostname }}' --required
;