Skip to main content

firewall_config_versions

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

Overview

Namefirewall_config_versions
TypeResource
Idvercel.security.firewall_config_versions

Fields

The following fields are returned by SELECT queries:

If the firewall configuration includes a custom managed ruleset, it will include a crs item that has the following values: sd: Scanner Detection ma: Multipart Attack lfi: Local File Inclusion Attack rfi: Remote File Inclusion Attack rce: Remote Execution Attack php: PHP Attack gen: Generic Attack xss: XSS Attack sqli: SQL Injection Attack sf: Session Fixation Attack java: Java Attack

NameDatatypeDescription
idstring
owner_idstring (wire: ownerId)
bot_id_enabledboolean (false, true) (wire: botIdEnabled)
changesarray
conditionsarray
crsobjectCustom Ruleset
firewall_enabledboolean (false, true) (wire: firewallEnabled)
ipsarray
log_headersarray (*) (wire: logHeaders)
managed_rulesobject (wire: managedRules)
project_keystring (wire: projectKey)
rulesarray
rulesetsarray
updated_atstring (wire: updatedAt)
versionnumber

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject_id, config_versionteam_id, slugRetrieve the specified firewall configuration for a project. The deployed configVersion will be active
deletedeleteconfig_versionPromotes a draft WAF config to an active config
activateexecconfig_versionPromotes a draft WAF config to an active config

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
config_versionstringThe deployed configVersion for the firewall configuration
project_idstring (wire: projectId)
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples

Retrieve the specified firewall configuration for a project. The deployed configVersion will be active

SELECT
id,
owner_id,
bot_id_enabled,
changes,
conditions,
crs,
firewall_enabled,
ips,
log_headers,
managed_rules,
project_key,
rules,
rulesets,
updated_at,
version
FROM vercel.security.firewall_config_versions
WHERE project_id = '{{ project_id }}' -- required
AND config_version = '{{ config_version }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

DELETE examples

Promotes a draft WAF config to an active config

DELETE FROM vercel.security.firewall_config_versions
WHERE config_version = '{{ config_version }}' --required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Promotes a draft WAF config to an active config

EXEC vercel.security.firewall_config_versions.activate
@config_version='{{ config_version }}' --required
;