Skip to main content

tcp_flow_protection_rules

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

Overview

Nametcp_flow_protection_rules
TypeResource
Idcloudflare.ddos_protection.tcp_flow_protection_rules

Fields

The following fields are returned by SELECT queries:

Get TCP Flow Protection rule response.

NameDatatypeDescription
idstringThe unique ID of the TCP Flow Protection rule.
namestringThe name of the TCP Flow 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 TCP Flow Protection rule.
modestringThe mode for TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
modified_onstring (date-time)The last modification timestamp of the TCP Flow Protection rule.
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
scopestringThe scope for the TCP Flow 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 TCP Flow Protection rule specified by the given UUID.
listselectaccount_idpage, per_page, order, directionList all TCP Flow Protection rules for an account.
createinsertaccount_id, scope, name, mode, rate_sensitivity, burst_sensitivityCreate a TCP Flow Protection rule for an account.
editupdateaccount_id, rule_idUpdate a TCP Flow Protection rule specified by the given UUID.
deletedeleteaccount_id, rule_idDelete a TCP Flow Protection rule specified by the given UUID.
bulk_deletedeleteaccount_idDelete all TCP Flow 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 TCP Flow Protection rule specified by the given UUID.

SELECT
id,
name,
burst_sensitivity,
created_on,
mode,
modified_on,
rate_sensitivity,
scope
FROM cloudflare.ddos_protection.tcp_flow_protection_rules
WHERE account_id = '{{ account_id }}' -- required
AND rule_id = '{{ rule_id }}' -- required
;

INSERT examples

Create a TCP Flow Protection rule for an account.

INSERT INTO cloudflare.ddos_protection.tcp_flow_protection_rules (
burst_sensitivity,
mode,
name,
rate_sensitivity,
scope,
account_id
)
SELECT
'{{ burst_sensitivity }}' /* required */,
'{{ mode }}' /* required */,
'{{ name }}' /* required */,
'{{ rate_sensitivity }}' /* required */,
'{{ scope }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

UPDATE examples

Update a TCP Flow Protection rule specified by the given UUID.

UPDATE cloudflare.ddos_protection.tcp_flow_protection_rules
SET
burst_sensitivity = '{{ burst_sensitivity }}',
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 TCP Flow Protection rule specified by the given UUID.

DELETE FROM cloudflare.ddos_protection.tcp_flow_protection_rules
WHERE account_id = '{{ account_id }}' --required
AND rule_id = '{{ rule_id }}' --required
;