Skip to main content

syn_protection_rules

Creates, updates, deletes, gets or lists a syn_protection_rules resource.

Overview

Namesyn_protection_rules
TypeResource
Idcloudflare.ddos_protection.syn_protection_rules

Fields

The following fields are returned by SELECT queries:

Get SYN Protection rule response.

NameDatatypeDescription
idstringThe unique ID of the SYN Protection rule.
namestringThe 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_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
created_onstring (date-time)The creation timestamp of the SYN Protection rule.
mitigation_typestringThe type of mitigation for SYN Protection. Must be one of 'challenge' or 'retransmit'.
modestringThe mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
modified_onstring (date-time)The last modification timestamp of the SYN Protection rule.
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
scopestringThe scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, rule_idGet a SYN Protection rule specified by the given UUID.
listselectaccount_idpage, per_page, order, directionList all SYN Protection rules for an account.
createinsertaccount_id, scope, name, mode, rate_sensitivity, burst_sensitivityCreate a SYN Protection rule for an account.
editupdateaccount_id, rule_idUpdate a SYN Protection rule specified by the given UUID.
deletedeleteaccount_id, rule_idDelete a SYN Protection rule specified by the given UUID.
bulk_deletedeleteaccount_idDelete 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
rule_idstringThe rule ID.
directionstringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
orderstringThe field to order by. Defaults to 'prefix'.
pageinteger (int64)The page number for pagination. Defaults to 1.
per_pageinteger (int64)The number of items per page. Must be between 10 and 1000. Defaults to 25.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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
;