address_maps
Creates, updates, deletes, gets or lists an address_maps resource.
Overview
| Name | address_maps |
| Type | Resource |
| Id | cloudflare.addressing.address_maps |
Fields
The following fields are returned by SELECT queries:
- get
- list
Address Map Details response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of an Address Map. (example: 055817b111884e0227e1be16a0be6ee0) |
can_delete | boolean | If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. |
can_modify_ips | boolean | If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
default_sni | string | If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. (example: *.example.com) |
description | string | An optional description field which may be used to describe the types of IPs or zones on the map. (example: My Ecommerce zones) |
enabled | boolean | Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. |
ips | array | The set of IPs on the Address Map. |
memberships | array | Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. |
modified_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
List Address Maps response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of an Address Map. (example: 055817b111884e0227e1be16a0be6ee0) |
can_delete | boolean | If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. |
can_modify_ips | boolean | If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
default_sni | string | If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. (example: *.example.com) |
description | string | An optional description field which may be used to describe the types of IPs or zones on the map. (example: My Ecommerce zones) |
enabled | boolean | Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. |
modified_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | address_map_id, account_id | Show a particular address map owned by the account. | |
list | select | account_id | List all address maps owned by the account. | |
create | insert | account_id | Create a new address map under the account. | |
edit | update | address_map_id, account_id | Modify properties of an address map owned by the account. | |
delete | delete | address_map_id, account_id | Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted. |
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. |
address_map_id | string |
SELECT examples
- get
- list
Show a particular address map owned by the account.
SELECT
id,
can_delete,
can_modify_ips,
created_at,
default_sni,
description,
enabled,
ips,
memberships,
modified_at
FROM cloudflare.addressing.address_maps
WHERE address_map_id = '{{ address_map_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
List all address maps owned by the account.
SELECT
id,
can_delete,
can_modify_ips,
created_at,
default_sni,
description,
enabled,
modified_at
FROM cloudflare.addressing.address_maps
WHERE account_id = '{{ account_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a new address map under the account.
INSERT INTO cloudflare.addressing.address_maps (
description,
enabled,
ips,
memberships,
account_id
)
SELECT
'{{ description }}',
{{ enabled }},
'{{ ips }}',
'{{ memberships }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: address_maps
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the address_maps resource.
- name: description
value: "{{ description }}"
description: |
An optional description field which may be used to describe the types of IPs or zones on the map.
- name: enabled
value: {{ enabled }}
description: |
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
default: false
- name: ips
value:
- "{{ ips }}"
- name: memberships
description: |
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
value:
- identifier: "{{ identifier }}"
kind: "{{ kind }}"
UPDATE examples
- edit
Modify properties of an address map owned by the account.
UPDATE cloudflare.addressing.address_maps
SET
default_sni = '{{ default_sni }}',
description = '{{ description }}',
enabled = {{ enabled }}
WHERE
address_map_id = '{{ address_map_id }}' --required
AND account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.
DELETE FROM cloudflare.addressing.address_maps
WHERE address_map_id = '{{ address_map_id }}' --required
AND account_id = '{{ account_id }}' --required
;