Skip to main content

address_maps

Creates, updates, deletes, gets or lists an address_maps resource.

Overview

Nameaddress_maps
TypeResource
Idcloudflare.addressing.address_maps

Fields

The following fields are returned by SELECT queries:

Address Map Details response

NameDatatypeDescription
idstringIdentifier of an Address Map. (example: 055817b111884e0227e1be16a0be6ee0)
can_deletebooleanIf set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
can_modify_ipsbooleanIf set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
created_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
default_snistringIf 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)
descriptionstringAn optional description field which may be used to describe the types of IPs or zones on the map. (example: My Ecommerce zones)
enabledbooleanWhether 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.
ipsarrayThe set of IPs on the Address Map.
membershipsarrayZones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
modified_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaddress_map_id, account_idShow a particular address map owned by the account.
listselectaccount_idList all address maps owned by the account.
createinsertaccount_idCreate a new address map under the account.
editupdateaddress_map_id, account_idModify properties of an address map owned by the account.
deletedeleteaddress_map_id, account_idDelete 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
address_map_idstring

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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
;