acls
Creates, updates, deletes, gets or lists an acls resource.
Overview
| Name | acls |
| Type | Resource |
| Id | cloudflare.magic_transit.acls |
Fields
The following fields are returned by SELECT queries:
- get
- list
Site ACL Details response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | The name of the ACL. (example: PIN Pad - Cash Register) |
description | string | Description for the ACL. (example: Allows local traffic between PIN pads and cash register.) |
forward_locally | boolean | 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 | object | |
lan_2 | object | |
protocols | array | |
unidirectional | boolean | 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. |
List Site ACLs response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | The name of the ACL. (example: PIN Pad - Cash Register) |
description | string | Description for the ACL. (example: Allows local traffic between PIN pads and cash register.) |
forward_locally | boolean | 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 | object | |
lan_2 | object | |
protocols | array | |
unidirectional | boolean | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | site_id, account_id, acl_id | Get a specific Site ACL. | |
list | select | account_id, site_id | Lists Site ACLs associated with an account. | |
create | insert | account_id, site_id, name, lan_1, lan_2 | Creates a new Site ACL. | |
edit | update | site_id, account_id, acl_id | Patch a specific Site ACL. | |
update | replace | site_id, account_id, acl_id | Update a specific Site ACL. | |
delete | delete | site_id, account_id, acl_id | Remove a specific Site ACL. |
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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
acl_id | string | |
site_id | string | The site ID. |
SELECT examples
- get
- list
Get a specific Site ACL.
SELECT
id,
name,
description,
forward_locally,
lan_1,
lan_2,
protocols,
unidirectional
FROM cloudflare.magic_transit.acls
WHERE site_id = '{{ site_id }}' -- required
AND account_id = '{{ account_id }}' -- required
AND acl_id = '{{ acl_id }}' -- required
;
Lists Site ACLs associated with an account.
SELECT
id,
name,
description,
forward_locally,
lan_1,
lan_2,
protocols,
unidirectional
FROM cloudflare.magic_transit.acls
WHERE account_id = '{{ account_id }}' -- required
AND site_id = '{{ site_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates a new Site ACL.
INSERT INTO cloudflare.magic_transit.acls (
description,
forward_locally,
lan_1,
lan_2,
name,
protocols,
unidirectional,
account_id,
site_id
)
SELECT
'{{ description }}',
{{ forward_locally }},
'{{ lan_1 }}' /* required */,
'{{ lan_2 }}' /* required */,
'{{ name }}' /* required */,
'{{ protocols }}',
{{ unidirectional }},
'{{ account_id }}',
'{{ site_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: acls
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the acls resource.
- name: site_id
value: "{{ site_id }}"
description: Required parameter for the acls resource.
- name: description
value: "{{ description }}"
description: |
Description for the ACL.
- name: forward_locally
value: {{ forward_locally }}
description: |
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.
- name: lan_1
value:
lan_id: "{{ lan_id }}"
lan_name: "{{ lan_name }}"
port_ranges:
- "{{ port_ranges }}"
ports:
- {{ ports }}
subnets:
- "{{ subnets }}"
- name: lan_2
value:
lan_id: "{{ lan_id }}"
lan_name: "{{ lan_name }}"
port_ranges:
- "{{ port_ranges }}"
ports:
- {{ ports }}
subnets:
- "{{ subnets }}"
- name: name
value: "{{ name }}"
description: |
The name of the ACL.
- name: protocols
value:
- "{{ protocols }}"
- name: unidirectional
value: {{ unidirectional }}
description: |
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.
UPDATE examples
- edit
Patch a specific Site ACL.
UPDATE cloudflare.magic_transit.acls
SET
description = '{{ description }}',
forward_locally = {{ forward_locally }},
lan_1 = '{{ lan_1 }}',
lan_2 = '{{ lan_2 }}',
name = '{{ name }}',
protocols = '{{ protocols }}',
unidirectional = {{ unidirectional }}
WHERE
site_id = '{{ site_id }}' --required
AND account_id = '{{ account_id }}' --required
AND acl_id = '{{ acl_id }}' --required
RETURNING
errors,
messages,
result,
success;
REPLACE examples
- update
Update a specific Site ACL.
REPLACE cloudflare.magic_transit.acls
SET
description = '{{ description }}',
forward_locally = {{ forward_locally }},
lan_1 = '{{ lan_1 }}',
lan_2 = '{{ lan_2 }}',
name = '{{ name }}',
protocols = '{{ protocols }}',
unidirectional = {{ unidirectional }}
WHERE
site_id = '{{ site_id }}' --required
AND account_id = '{{ account_id }}' --required
AND acl_id = '{{ acl_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Remove a specific Site ACL.
DELETE FROM cloudflare.magic_transit.acls
WHERE site_id = '{{ site_id }}' --required
AND account_id = '{{ account_id }}' --required
AND acl_id = '{{ acl_id }}' --required
;