syn_protection_rules
Creates, updates, deletes, gets or lists a syn_protection_rules resource.
Overview
| Name | syn_protection_rules |
| Type | Resource |
| Id | cloudflare.ddos_protection.syn_protection_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get SYN Protection rule response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the SYN Protection rule. |
name | string | The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. |
burst_sensitivity | string | The burst sensitivity. Must be one of 'low', 'medium', 'high'. |
created_on | string (date-time) | The creation timestamp of the SYN Protection rule. |
mitigation_type | string | The type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'. |
mode | string | The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. |
modified_on | string (date-time) | The last modification timestamp of the SYN Protection rule. |
rate_sensitivity | string | The rate sensitivity. Must be one of 'low', 'medium', 'high'. |
scope | string | The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. |
List all SYN Protection rules response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the SYN Protection rule. |
name | string | The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. |
burst_sensitivity | string | The burst sensitivity. Must be one of 'low', 'medium', 'high'. |
created_on | string (date-time) | The creation timestamp of the SYN Protection rule. |
mitigation_type | string | The type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'. |
mode | string | The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. |
modified_on | string (date-time) | The last modification timestamp of the SYN Protection rule. |
rate_sensitivity | string | The rate sensitivity. Must be one of 'low', 'medium', 'high'. |
scope | string | The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, rule_id | Get a SYN Protection rule specified by the given UUID. | |
list | select | account_id | page, per_page, order, direction | List all SYN Protection rules for an account. |
create | insert | account_id, scope, name, mode, rate_sensitivity, burst_sensitivity | Create a SYN Protection rule for an account. | |
edit | update | account_id, rule_id | Update a SYN Protection rule specified by the given UUID. | |
delete | delete | account_id, rule_id | Delete a SYN Protection rule specified by the given UUID. | |
bulk_delete | delete | account_id | Delete all SYN Protection rules 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. |
rule_id | string | The rule ID. |
direction | string | The direction of ordering (ASC or DESC). Defaults to 'ASC'. |
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 rule specified by the given UUID.
SELECT
id,
name,
burst_sensitivity,
created_on,
mitigation_type,
mode,
modified_on,
rate_sensitivity,
scope
FROM cloudflare.ddos_protection.syn_protection_rules
WHERE account_id = '{{ account_id }}' -- required
AND rule_id = '{{ rule_id }}' -- required
;
List all SYN Protection rules for an account.
SELECT
id,
name,
burst_sensitivity,
created_on,
mitigation_type,
mode,
modified_on,
rate_sensitivity,
scope
FROM cloudflare.ddos_protection.syn_protection_rules
WHERE account_id = '{{ account_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND order = '{{ order }}'
AND direction = '{{ direction }}'
;
INSERT examples
- create
- Manifest
Create a SYN Protection rule for an account.
INSERT INTO cloudflare.ddos_protection.syn_protection_rules (
burst_sensitivity,
mitigation_type,
mode,
name,
rate_sensitivity,
scope,
account_id
)
SELECT
'{{ burst_sensitivity }}' /* required */,
'{{ mitigation_type }}',
'{{ mode }}' /* required */,
'{{ name }}' /* required */,
'{{ rate_sensitivity }}' /* required */,
'{{ scope }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: syn_protection_rules
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the syn_protection_rules resource.
- name: burst_sensitivity
value: "{{ burst_sensitivity }}"
description: |
The burst sensitivity. Must be one of 'low', 'medium', 'high'.
- name: mitigation_type
value: "{{ mitigation_type }}"
description: |
The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.
- name: mode
value: "{{ mode }}"
description: |
The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
- name: name
value: "{{ name }}"
description: |
The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.
- name: rate_sensitivity
value: "{{ rate_sensitivity }}"
description: |
The rate sensitivity. Must be one of 'low', 'medium', 'high'.
- name: scope
value: "{{ scope }}"
description: |
The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.
UPDATE examples
- edit
Update a SYN Protection rule specified by the given UUID.
UPDATE cloudflare.ddos_protection.syn_protection_rules
SET
burst_sensitivity = '{{ burst_sensitivity }}',
mitigation_type = '{{ mitigation_type }}',
mode = '{{ mode }}',
rate_sensitivity = '{{ rate_sensitivity }}'
WHERE
account_id = '{{ account_id }}' --required
AND rule_id = '{{ rule_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
- bulk_delete
Delete a SYN Protection rule specified by the given UUID.
DELETE FROM cloudflare.ddos_protection.syn_protection_rules
WHERE account_id = '{{ account_id }}' --required
AND rule_id = '{{ rule_id }}' --required
;
Delete all SYN Protection rules for an account.
DELETE FROM cloudflare.ddos_protection.syn_protection_rules
WHERE account_id = '{{ account_id }}' --required
;