Skip to content
Start here

Locations

List Zero Trust Gateway locations
zero_trust.gateway.locations.list(LocationListParams**kwargs) -> SyncSinglePage[Location]
GET/accounts/{account_id}/gateway/locations
Get Zero Trust Gateway location details
zero_trust.gateway.locations.get(strlocation_id, LocationGetParams**kwargs) -> Location
GET/accounts/{account_id}/gateway/locations/{location_id}
Create a Zero Trust Gateway location
zero_trust.gateway.locations.create(LocationCreateParams**kwargs) -> Location
POST/accounts/{account_id}/gateway/locations
Update a Zero Trust Gateway location
zero_trust.gateway.locations.update(strlocation_id, LocationUpdateParams**kwargs) -> Location
PUT/accounts/{account_id}/gateway/locations/{location_id}
Delete a Zero Trust Gateway location
zero_trust.gateway.locations.delete(strlocation_id, LocationDeleteParams**kwargs) -> object
DELETE/accounts/{account_id}/gateway/locations/{location_id}
ModelsExpand Collapse
class DOHEndpoint:
enabled: Optional[bool]

Indicate whether the DOH endpoint is enabled for this location.

networks: Optional[List[IPNetwork]]

Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location.

network: str

Specify the IP address or IP CIDR.

require_token: Optional[bool]

Specify whether the DOH endpoint requires user identity authentication.

class DOTEndpoint:
enabled: Optional[bool]

Indicate whether the DOT endpoint is enabled for this location.

networks: Optional[List[IPNetwork]]

Specify the list of allowed source IP network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location.

network: str

Specify the IP address or IP CIDR.

class Endpoint:

Configure the destination endpoints for this location.

class IPNetwork:
network: str

Specify the IP address or IP CIDR.

class IPV4Endpoint:
enabled: Optional[bool]

Indicate whether the IPv4 endpoint is enabled for this location.

class IPV6Endpoint:
enabled: Optional[bool]

Indicate whether the IPV6 endpoint is enabled for this location.

networks: Optional[List[IPV6Network]]

Specify the list of allowed source IPv6 network ranges for this endpoint. When the list is empty, the endpoint allows all source IPs. The list takes effect only if the endpoint is enabled for this location.

network: str

Specify the IPv6 address or IPv6 CIDR.

class IPV6Network:
network: str

Specify the IPv6 address or IPv6 CIDR.

class Location:
id: Optional[str]
client_default: Optional[bool]

Indicate whether this location is the default location.

created_at: Optional[datetime]
formatdate-time
dns_destination_ips_id: Optional[str]

Indicate the identifier of the pair of IPv4 addresses assigned to this location.

dns_destination_ipv6_block_id: Optional[str]

Specify the UUID of the IPv6 block brought to the gateway so that this location’s IPv6 address is allocated from the Bring Your Own IPv6 (BYOIPv6) block rather than the standard Cloudflare IPv6 block.

doh_subdomain: Optional[str]

Specify the DNS over HTTPS domain that receives DNS requests. Gateway automatically generates this value.

ecs_support: Optional[bool]

Indicate whether the location must resolve EDNS queries.

endpoints: Optional[Endpoint]

Configure the destination endpoints for this location.

ip: Optional[str]

Defines the automatically generated IPv6 destination IP assigned to this location. Gateway counts all DNS requests sent to this IP as requests under this location.

ipv4_destination: Optional[str]

Show the primary destination IPv4 address from the pair identified dns_destination_ips_id. This field read-only.

ipv4_destination_backup: Optional[str]

Show the backup destination IPv4 address from the pair identified dns_destination_ips_id. This field read-only.

name: Optional[str]

Specify the location name.

networks: Optional[List[Network]]

Specify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location.

network: str

Specify the IPv4 address or IPv4 CIDR. Limit IPv4 CIDRs to a maximum of /24.

updated_at: Optional[datetime]
formatdate-time