syn_protection_filters
Creates, updates, deletes, gets or lists a syn_protection_filters resource.
Overview
| Name | syn_protection_filters |
| Type | Resource |
| Id | cloudflare.ddos_protection.syn_protection_filters |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get SYN Protection filter response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the expression filter. |
created_on | string (date-time) | The creation timestamp of the expression filter. |
expression | string | The filter expression. (example: ip.dst in { 192.0.2.0/24 198.51.100.0/24 } and tcp.srcport in { 80 443 10000..65535 }) |
mode | string | The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. |
modified_on | string (date-time) | The last modification timestamp of the expression filter. |
List all SYN Protection filters response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the expression filter. |
created_on | string (date-time) | The creation timestamp of the expression filter. |
expression | string | The filter expression. (example: ip.dst in { 192.0.2.0/24 198.51.100.0/24 } and tcp.srcport in { 80 443 10000..65535 }) |
mode | string | The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. |
modified_on | string (date-time) | The last modification timestamp of the expression filter. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, filter_id | Get a SYN Protection filter specified by the given UUID. | |
list | select | account_id | mode, page, per_page, order, direction | List all SYN Protection filters for an account. |
create | insert | account_id, expression, mode | Create a SYN Protection filter for an account. | |
edit | update | account_id, filter_id | Update a SYN Protection filter specified by the given UUID. | |
delete | delete | account_id, filter_id | Delete a SYN Protection filter specified by the given UUID. | |
bulk_delete | delete | account_id | Delete all SYN Protection filters for an account. |
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. |
filter_id | string | The UUID of the filter to delete. |
direction | string | The direction of ordering (ASC or DESC). Defaults to 'ASC'. |
mode | string | The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'. |
order | string | The field to order by. Defaults to 'prefix'. |
page | integer (int64) | The page number for pagination. Defaults to 1. |
per_page | integer (int64) | The number of items per page. Must be between 10 and 1000. Defaults to 25. |
SELECT examples
- get
- list
Get a SYN Protection filter specified by the given UUID.
SELECT
id,
created_on,
expression,
mode,
modified_on
FROM cloudflare.ddos_protection.syn_protection_filters
WHERE account_id = '{{ account_id }}' -- required
AND filter_id = '{{ filter_id }}' -- required
;
List all SYN Protection filters for an account.
SELECT
id,
created_on,
expression,
mode,
modified_on
FROM cloudflare.ddos_protection.syn_protection_filters
WHERE account_id = '{{ account_id }}' -- required
AND mode = '{{ mode }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND order = '{{ order }}'
AND direction = '{{ direction }}'
;
INSERT examples
- create
- Manifest
Create a SYN Protection filter for an account.
INSERT INTO cloudflare.ddos_protection.syn_protection_filters (
expression,
mode,
account_id
)
SELECT
'{{ expression }}' /* required */,
'{{ mode }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: syn_protection_filters
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the syn_protection_filters resource.
- name: expression
value: "{{ expression }}"
description: |
The filter expression.
- name: mode
value: "{{ mode }}"
description: |
The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
UPDATE examples
- edit
Update a SYN Protection filter specified by the given UUID.
UPDATE cloudflare.ddos_protection.syn_protection_filters
SET
expression = '{{ expression }}',
mode = '{{ mode }}'
WHERE
account_id = '{{ account_id }}' --required
AND filter_id = '{{ filter_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
- bulk_delete
Delete a SYN Protection filter specified by the given UUID.
DELETE FROM cloudflare.ddos_protection.syn_protection_filters
WHERE account_id = '{{ account_id }}' --required
AND filter_id = '{{ filter_id }}' --required
;
Delete all SYN Protection filters for an account.
DELETE FROM cloudflare.ddos_protection.syn_protection_filters
WHERE account_id = '{{ account_id }}' --required
;