Skip to content
Start here

ACLs

List Site ACLs
client.MagicTransit.Sites.ACLs.List(ctx, siteID, query) (*SinglePage[ACL], error)
GET/accounts/{account_id}/magic/sites/{site_id}/acls
Site ACL Details
client.MagicTransit.Sites.ACLs.Get(ctx, siteID, aclID, query) (*ACL, error)
GET/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
Create a new Site ACL
client.MagicTransit.Sites.ACLs.New(ctx, siteID, params) (*ACL, error)
POST/accounts/{account_id}/magic/sites/{site_id}/acls
Update Site ACL
client.MagicTransit.Sites.ACLs.Update(ctx, siteID, aclID, params) (*ACL, error)
PUT/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
Patch Site ACL
client.MagicTransit.Sites.ACLs.Edit(ctx, siteID, aclID, params) (*ACL, error)
PATCH/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
Delete Site ACL
client.MagicTransit.Sites.ACLs.Delete(ctx, siteID, aclID, body) (*ACL, error)
DELETE/accounts/{account_id}/magic/sites/{site_id}/acls/{acl_id}
ModelsExpand Collapse
type ACL struct{…}

Bidirectional ACL policy for network traffic within a site.

ID stringOptional

Identifier

maxLength32
Description stringOptional

Description for the ACL.

ForwardLocally boolOptional

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.

LAN1 ACLConfigurationOptional
LAN2 ACLConfigurationOptional
Name stringOptional

The name of the ACL.

Protocols []AllowedProtocolOptional
One of the following:
const AllowedProtocolTCP AllowedProtocol = "tcp"
const AllowedProtocolUdp AllowedProtocol = "udp"
const AllowedProtocolIcmp AllowedProtocol = "icmp"
Unidirectional boolOptional

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.

type ACLConfiguration struct{…}
LANID string

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

LANName stringOptional

The name of the LAN based on the provided lan_id.

PortRanges []stringOptional

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 []int64Optional

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 []SubnetOptional

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.

type AllowedProtocol string

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

One of the following:
const AllowedProtocolTCP AllowedProtocol = "tcp"
const AllowedProtocolUdp AllowedProtocol = "udp"
const AllowedProtocolIcmp AllowedProtocol = "icmp"
type Subnet string

A valid IPv4 address.