firewall_config_versions
Creates, updates, deletes, gets or lists a firewall_config_versions resource.
Overview
| Name | firewall_config_versions |
| Type | Resource |
| Id | vercel.security.firewall_config_versions |
Fields
The following fields are returned by SELECT queries:
- get
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
| Name | Datatype | Description |
|---|---|---|
id | string | |
owner_id | string | (wire: ownerId) |
bot_id_enabled | boolean | (false, true) (wire: botIdEnabled) |
changes | array | |
conditions | array | |
crs | object | Custom Ruleset |
firewall_enabled | boolean | (false, true) (wire: firewallEnabled) |
ips | array | |
log_headers | array | (*) (wire: logHeaders) |
managed_rules | object | (wire: managedRules) |
project_key | string | (wire: projectKey) |
rules | array | |
rulesets | array | |
updated_at | string | (wire: updatedAt) |
version | number |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project_id, config_version | team_id, slug | Retrieve the specified firewall configuration for a project. The deployed configVersion will be active |
delete | delete | config_version | Promotes a draft WAF config to an active config | |
activate | exec | config_version | Promotes 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.
| Name | Datatype | Description |
|---|---|---|
config_version | string | The deployed configVersion for the firewall configuration |
project_id | string | (wire: projectId) |
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- get
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
- delete
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.
- activate
Promotes a draft WAF config to an active config
EXEC vercel.security.firewall_config_versions.activate
@config_version='{{ config_version }}' --required
;