Skip to main content

tcp_flow_protection_filters

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

Overview

Nametcp_flow_protection_filters
TypeResource
Idcloudflare.ddos_protection.tcp_flow_protection_filters

Fields

The following fields are returned by SELECT queries:

Get TCP Flow Protection filter response.

NameDatatypeDescription
idstringThe unique ID of the expression filter.
created_onstring (date-time)The creation timestamp of the expression filter.
expressionstringThe filter expression. (example: ip.dst in { 192.0.2.0/24 198.51.100.0/24 } and tcp.srcport in { 80 443 10000..65535 })
modestringThe filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
modified_onstring (date-time)The last modification timestamp of the expression filter.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, filter_idGet a TCP Flow Protection filter specified by the given UUID.
listselectaccount_idmode, page, per_page, order, directionList all TCP Flow Protection filters for an account.
createinsertaccount_id, expression, modeCreate a TCP Flow Protection filter for an account.
editupdateaccount_id, filter_idUpdate a TCP Flow Protection filter specified by the given UUID.
deletedeleteaccount_id, filter_idDelete a TCP Flow Protection filter specified by the given UUID.
bulk_deletedeleteaccount_idDelete all TCP Flow 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
filter_idstringThe UUID of the filter to delete.
directionstringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
modestringThe mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.
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 filter specified by the given UUID.

SELECT
id,
created_on,
expression,
mode,
modified_on
FROM cloudflare.ddos_protection.tcp_flow_protection_filters
WHERE account_id = '{{ account_id }}' -- required
AND filter_id = '{{ filter_id }}' -- required
;

INSERT examples

Create a TCP Flow Protection filter for an account.

INSERT INTO cloudflare.ddos_protection.tcp_flow_protection_filters (
expression,
mode,
account_id
)
SELECT
'{{ expression }}' /* required */,
'{{ mode }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

UPDATE examples

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

UPDATE cloudflare.ddos_protection.tcp_flow_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 a TCP Flow Protection filter specified by the given UUID.

DELETE FROM cloudflare.ddos_protection.tcp_flow_protection_filters
WHERE account_id = '{{ account_id }}' --required
AND filter_id = '{{ filter_id }}' --required
;