Skip to content
Start here

ACLs

List Site ACLs
magic_transit.sites.acls.list(strsite_id, ACLListParams**kwargs) -> SyncSinglePage[ACL]
GET/accounts/{account_id}/magic/sites/{site_id}/acls
Site ACL Details
magic_transit.sites.acls.get(stracl_id, ACLGetParams**kwargs) -> ACL
GET/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
Create a new Site ACL
magic_transit.sites.acls.create(strsite_id, ACLCreateParams**kwargs) -> ACL
POST/accounts/{account_id}/magic/sites/{site_id}/acls
Update Site ACL
magic_transit.sites.acls.update(stracl_id, ACLUpdateParams**kwargs) -> ACL
PUT/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
Patch Site ACL
magic_transit.sites.acls.edit(stracl_id, ACLEditParams**kwargs) -> ACL
PATCH/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
Delete Site ACL
magic_transit.sites.acls.delete(stracl_id, ACLDeleteParams**kwargs) -> ACL
DELETE/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
ModelsExpand Collapse
class ACL:

Bidirectional ACL policy for network traffic within a site.

id: Optional[str]

Identifier

maxLength32
description: Optional[str]

Description for the ACL.

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.

lan_1: Optional[ACLConfiguration]
lan_2: Optional[ACLConfiguration]
name: Optional[str]

The name of the ACL.

protocols: Optional[List[AllowedProtocol]]
One of the following:
"tcp"
"udp"
"icmp"
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.

class ACLConfiguration:
lan_id: str

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

lan_name: Optional[str]

The name of the LAN based on the provided lan_id.

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.

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.

subnets: Optional[List[Subnet]]

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.

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

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

One of the following:
"tcp"
"udp"
"icmp"
str

A valid IPv4 address.