---
title: Sites
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Magic Transit](https://developers.cloudflare.com/api/python/resources/magic_transit)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Sites

##### [List Sites](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/methods/list)

magic\_transit.sites.list(SiteListParams\*\*kwargs) -> SyncSinglePage\[[Site](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)]

GET/accounts/{account\_id}/magic/sites

##### [Site Details](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/methods/get)

magic\_transit.sites.get(strsite\_id, SiteGetParams\*\*kwargs) -> [Site](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)

GET/accounts/{account\_id}/magic/sites/{site\_id}

##### [Create a new Site](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/methods/create)

magic\_transit.sites.create(SiteCreateParams\*\*kwargs) -> [Site](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)

POST/accounts/{account\_id}/magic/sites

##### [Update Site](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/methods/update)

magic\_transit.sites.update(strsite\_id, SiteUpdateParams\*\*kwargs) -> [Site](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)

PUT/accounts/{account\_id}/magic/sites/{site\_id}

##### [Patch Site](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/methods/edit)

magic\_transit.sites.edit(strsite\_id, SiteEditParams\*\*kwargs) -> [Site](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/magic/sites/{site\_id}

##### [Delete Site](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/methods/delete)

magic\_transit.sites.delete(strsite\_id, SiteDeleteParams\*\*kwargs) -> [Site](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/magic/sites/{site\_id}

##### ModelsExpand Collapse

<details>

<summary>

class Site: …

</summary>

id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

connector\_id: Optional\[str]

Magic Connector identifier tag.

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20connector_id">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

ha\_mode: Optional\[bool]

Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20ha_mode">Link to this property</a>

location: Optional\[SiteLocation]

Location of site in latitude and longitude.

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20location">Link to this property</a>

name: Optional\[str]

The name of the site.

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

secondary\_connector\_id: Optional\[str]

Magic Connector identifier tag. Used when high availability mode is on.

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)%20%3E%20(property)%20secondary_connector_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites%20%3E%20(model)%20site%20%3E%20(schema)>)

<details>

<summary>

class SiteLocation: …

Location of site in latitude and longitude.

</summary>

lat: Optional\[str]

Latitude

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site_location%20%3E%20(schema)%20%3E%20(property)%20lat">Link to this property</a>

lon: Optional\[str]

Longitude

<a href="#(resource)%20magic_transit.sites%20%3E%20(model)%20site_location%20%3E%20(schema)%20%3E%20(property)%20lon">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites%20%3E%20(model)%20site_location%20%3E%20(schema)>)

#### SitesApp Configuration

#### SitesACLs

##### [List Site ACLs](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/acls/methods/list)

magic\_transit.sites.acls.list(strsite\_id, ACLListParams\*\*kwargs) -> SyncSinglePage\[[ACL](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)]

GET/accounts/{account\_id}/magic/sites/{site\_id}/acls

##### [Site ACL Details](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/acls/methods/get)

magic\_transit.sites.acls.get(stracl\_id, ACLGetParams\*\*kwargs) -> [ACL](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)

GET/accounts/{account\_id}/magic/sites/{site\_id}/acls/{acl\_id}

##### [Create a new Site ACL](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/acls/methods/create)

magic\_transit.sites.acls.create(strsite\_id, ACLCreateParams\*\*kwargs) -> [ACL](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)

POST/accounts/{account\_id}/magic/sites/{site\_id}/acls

##### [Update Site ACL](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/acls/methods/update)

magic\_transit.sites.acls.update(stracl\_id, ACLUpdateParams\*\*kwargs) -> [ACL](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)

PUT/accounts/{account\_id}/magic/sites/{site\_id}/acls/{acl\_id}

##### [Patch Site ACL](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/acls/methods/edit)

magic\_transit.sites.acls.edit(stracl\_id, ACLEditParams\*\*kwargs) -> [ACL](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/magic/sites/{site\_id}/acls/{acl\_id}

##### [Delete Site ACL](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/acls/methods/delete)

magic\_transit.sites.acls.delete(stracl\_id, ACLDeleteParams\*\*kwargs) -> [ACL](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/magic/sites/{site\_id}/acls/{acl\_id}

##### ModelsExpand Collapse

<details>

<summary>

class ACL: …

Bidirectional ACL policy for network traffic within a site.

</summary>

id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description: Optional\[str]

Description for the ACL.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

forward\_locally: Optional\[bool]

The desired forwarding action for this ACL policy. If set to “false”, the policy will forward traffic to Cloudflare. If set to “true”, the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20forward_locally">Link to this property</a>

lan\_1: Optional\[ACLConfiguration]

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20lan_1">Link to this property</a>

lan\_2: Optional\[ACLConfiguration]

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20lan_2">Link to this property</a>

name: Optional\[str]

The name of the ACL.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

protocols: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)">AllowedProtocol</a>]]

</summary>

One of the following:

"tcp"

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"udp"

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"icmp"

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20protocols">Link to this property</a>

unidirectional: Optional\[bool]

The desired traffic direction for this ACL policy. If set to “false”, the policy will allow bidirectional traffic. If set to “true”, the policy will only allow traffic in one direction. If not included in request, will default to false.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)%20%3E%20(property)%20unidirectional">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl%20%3E%20(schema)>)

<details>

<summary>

class ACLConfiguration: …

</summary>

lan\_id: str

The identifier for the LAN you want to create an ACL policy with.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl_configuration%20%3E%20(schema)%20%3E%20(property)%20lan_id">Link to this property</a>

lan\_name: Optional\[str]

The name of the LAN based on the provided lan\_id.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl_configuration%20%3E%20(schema)%20%3E%20(property)%20lan_name">Link to this property</a>

port\_ranges: Optional\[List\[str]]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl_configuration%20%3E%20(schema)%20%3E%20(property)%20port_ranges">Link to this property</a>

ports: Optional\[List\[int]]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl_configuration%20%3E%20(schema)%20%3E%20(property)%20ports">Link to this property</a>

subnets: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20subnet%20%3E%20(schema)">Subnet</a>]]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl_configuration%20%3E%20(schema)%20%3E%20(property)%20subnets">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20acl_configuration%20%3E%20(schema)>)

<details>

<summary>

Literal\["tcp", "udp", "icmp"]

Array of allowed communication protocols between configured LANs. If no protocols are provided, all protocols are allowed.

</summary>

One of the following:

"tcp"

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"udp"

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"icmp"

<a href="#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20allowed_protocol%20%3E%20(schema)>)

str

A valid IPv4 address.

[Link to this property](<#(resource)%20magic_transit.sites.acls%20%3E%20(model)%20subnet%20%3E%20(schema)>)

#### SitesLANs

##### [List Site LANs](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/lans/methods/list)

magic\_transit.sites.lans.list(strsite\_id, LANListParams\*\*kwargs) -> SyncSinglePage\[[LAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)]

GET/accounts/{account\_id}/magic/sites/{site\_id}/lans

##### [Site LAN Details](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/lans/methods/get)

magic\_transit.sites.lans.get(strlan\_id, LANGetParams\*\*kwargs) -> [LAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)

GET/accounts/{account\_id}/magic/sites/{site\_id}/lans/{lan\_id}

##### [Create a new Site LAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/lans/methods/create)

magic\_transit.sites.lans.create(strsite\_id, LANCreateParams\*\*kwargs) -> SyncSinglePage\[[LAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)]

POST/accounts/{account\_id}/magic/sites/{site\_id}/lans

##### [Update Site LAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/lans/methods/update)

magic\_transit.sites.lans.update(strlan\_id, LANUpdateParams\*\*kwargs) -> [LAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)

PUT/accounts/{account\_id}/magic/sites/{site\_id}/lans/{lan\_id}

##### [Patch Site LAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/lans/methods/edit)

magic\_transit.sites.lans.edit(strlan\_id, LANEditParams\*\*kwargs) -> [LAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/magic/sites/{site\_id}/lans/{lan\_id}

##### [Delete Site LAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/lans/methods/delete)

magic\_transit.sites.lans.delete(strlan\_id, LANDeleteParams\*\*kwargs) -> [LAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/magic/sites/{site\_id}/lans/{lan\_id}

##### ModelsExpand Collapse

<details>

<summary>

class DHCPRelay: …

</summary>

server\_addresses: Optional\[List\[str]]

List of DHCP server IPs.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_relay%20%3E%20(schema)%20%3E%20(property)%20server_addresses">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_relay%20%3E%20(schema)>)

<details>

<summary>

class DHCPServer: …

</summary>

<details>

<summary>

dhcp\_options: Optional\[List\[DHCPOption]]

Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled.

</summary>

code: int

DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options 3, 6, and 51 are not allowed because they conflict with connector-managed configuration.

maximum254

minimum1

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

<details>

<summary>

type: Literal\["text", "hex", "ip", 3 more]

The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. “01:04:aa:bb:cc”, max 255 bytes). ip: an IPv4 address (e.g. “10.20.30.40”). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes).

</summary>

One of the following:

"text"

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

"hex"

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

"ip"

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

"byte"

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type%20%3E%20(member)%203">Link to this property</a>

"short"

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type%20%3E%20(member)%204">Link to this property</a>

"integer"

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20type">Link to this property</a>

value: str

The option value, interpreted according to the type field.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_options">Link to this property</a>

dhcp\_pool\_end: Optional\[str]

A valid IPv4 address.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_pool_end">Link to this property</a>

dhcp\_pool\_start: Optional\[str]

A valid IPv4 address.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dhcp_pool_start">Link to this property</a>

Deprecateddns\_server: Optional\[str]

A valid IPv4 address.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dns_server">Link to this property</a>

dns\_servers: Optional\[List\[str]]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20dns_servers">Link to this property</a>

reservations: Optional\[Dict\[str, str]]

Mapping of MAC addresses to IP addresses

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)%20%3E%20(property)%20reservations">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20dhcp_server%20%3E%20(schema)>)

<details>

<summary>

class LAN: …

</summary>

id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

bond\_id: Optional\[int]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20bond_id">Link to this property</a>

ha\_link: Optional\[bool]

mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha\_link.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20ha_link">Link to this property</a>

is\_breakout: Optional\[bool]

mark true to use this LAN for source-based breakout traffic

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20is_breakout">Link to this property</a>

is\_prioritized: Optional\[bool]

mark true to use this LAN for source-based prioritized traffic

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20is_prioritized">Link to this property</a>

name: Optional\[str]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

nat: Optional\[Nat]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20nat">Link to this property</a>

physport: Optional\[int]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20physport">Link to this property</a>

<details>

<summary>

routed\_subnets: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)">RoutedSubnet</a>]]

</summary>

next\_hop: str

A valid IPv4 address.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)%20%3E%20(property)%20next_hop">Link to this property</a>

prefix: str

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)%20%3E%20(property)%20prefix">Link to this property</a>

nat: Optional\[Nat]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)%20%3E%20(property)%20nat">Link to this property</a>

</details>

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20routed_subnets">Link to this property</a>

site\_id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20site_id">Link to this property</a>

static\_addressing: Optional\[LANStaticAddressing]

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static\_address is required along with secondary and virtual address.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20static_addressing">Link to this property</a>

vlan\_tag: Optional\[int]

VLAN ID. Use zero for untagged.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)%20%3E%20(property)%20vlan_tag">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan%20%3E%20(schema)>)

<details>

<summary>

class LANStaticAddressing: …

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static\_address is required along with secondary and virtual address.

</summary>

address: str

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

dhcp\_relay: Optional\[DHCPRelay]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20dhcp_relay">Link to this property</a>

dhcp\_server: Optional\[DHCPServer]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20dhcp_server">Link to this property</a>

secondary\_address: Optional\[str]

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20secondary_address">Link to this property</a>

virtual\_address: Optional\[str]

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20virtual_address">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20lan_static_addressing%20%3E%20(schema)>)

<details>

<summary>

class Nat: …

</summary>

static\_prefix: Optional\[str]

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20nat%20%3E%20(schema)%20%3E%20(property)%20static_prefix">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20nat%20%3E%20(schema)>)

<details>

<summary>

class RoutedSubnet: …

</summary>

next\_hop: str

A valid IPv4 address.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)%20%3E%20(property)%20next_hop">Link to this property</a>

prefix: str

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)%20%3E%20(property)%20prefix">Link to this property</a>

nat: Optional\[Nat]

<a href="#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)%20%3E%20(property)%20nat">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.lans%20%3E%20(model)%20routed_subnet%20%3E%20(schema)>)

#### SitesWANs

##### [List Site WANs](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/wans/methods/list)

magic\_transit.sites.wans.list(strsite\_id, WANListParams\*\*kwargs) -> SyncSinglePage\[[WAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)]

GET/accounts/{account\_id}/magic/sites/{site\_id}/wans

##### [Site WAN Details](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/wans/methods/get)

magic\_transit.sites.wans.get(strwan\_id, WANGetParams\*\*kwargs) -> [WAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)

GET/accounts/{account\_id}/magic/sites/{site\_id}/wans/{wan\_id}

##### [Create a new Site WAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/wans/methods/create)

magic\_transit.sites.wans.create(strsite\_id, WANCreateParams\*\*kwargs) -> SyncSinglePage\[[WAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)]

POST/accounts/{account\_id}/magic/sites/{site\_id}/wans

##### [Update Site WAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/wans/methods/update)

magic\_transit.sites.wans.update(strwan\_id, WANUpdateParams\*\*kwargs) -> [WAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)

PUT/accounts/{account\_id}/magic/sites/{site\_id}/wans/{wan\_id}

##### [Patch Site WAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/wans/methods/edit)

magic\_transit.sites.wans.edit(strwan\_id, WANEditParams\*\*kwargs) -> [WAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/magic/sites/{site\_id}/wans/{wan\_id}

##### [Delete Site WAN](https://developers.cloudflare.com/api/python/resources/magic_transit/subresources/sites/subresources/wans/methods/delete)

magic\_transit.sites.wans.delete(strwan\_id, WANDeleteParams\*\*kwargs) -> [WAN](<https://developers.cloudflare.com/api/python/resources/magic_transit#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/magic/sites/{site\_id}/wans/{wan\_id}

##### ModelsExpand Collapse

<details>

<summary>

class WAN: …

</summary>

id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

health\_check\_rate: Optional\[Literal\["low", "mid", "high"]]

Magic WAN health check rate for tunnels created on this link. The default value is <code>mid</code>.

</summary>

One of the following:

"low"

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20health_check_rate%20%3E%20(member)%200">Link to this property</a>

"mid"

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20health_check_rate%20%3E%20(member)%201">Link to this property</a>

"high"

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20health_check_rate%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20health_check_rate">Link to this property</a>

load\_balance\_inner\_flows: Optional\[bool]

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20load_balance_inner_flows">Link to this property</a>

name: Optional\[str]

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

physport: Optional\[int]

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20physport">Link to this property</a>

priority: Optional\[int]

Priority of WAN for traffic loadbalancing.

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20priority">Link to this property</a>

site\_id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20site_id">Link to this property</a>

static\_addressing: Optional\[WANStaticAddressing]

(optional) if omitted, use DHCP. Submit secondary\_address when site is in high availability mode.

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20static_addressing">Link to this property</a>

vlan\_tag: Optional\[int]

VLAN ID. Use zero for untagged.

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)%20%3E%20(property)%20vlan_tag">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan%20%3E%20(schema)>)

<details>

<summary>

class WANStaticAddressing: …

(optional) if omitted, use DHCP. Submit secondary\_address when site is in high availability mode.

</summary>

address: str

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

gateway\_address: str

A valid IPv4 address.

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20gateway_address">Link to this property</a>

secondary\_address: Optional\[str]

A valid CIDR notation representing an IP range.

<a href="#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan_static_addressing%20%3E%20(schema)%20%3E%20(property)%20secondary_address">Link to this property</a>

</details>

[Link to this property](<#(resource)%20magic_transit.sites.wans%20%3E%20(model)%20wan_static_addressing%20%3E%20(schema)>)