Security
July 31, 2026 ยท View on GitHub
Overview
Available Operations
- updateAttackChallengeMode - Update Attack Challenge mode
- getSecurityFirewallConfig - Returns activated WAF config
- putFirewallConfig - Put Firewall Configuration
- updateFirewallConfig - Update Firewall Configuration
- getFirewallConfig - Read Firewall Configuration
- deleteSecurityFirewallConfigByConfigVersion - Returns activated WAF config
- createSecurityFirewallConfigByConfigVersionActivate - Returns activated WAF config
- getActiveAttackStatus - Read active attack data
- getBypassIp - Read System Bypass
- addBypassIp - Create System Bypass Rule
- removeBypassIp - Remove System Bypass Rule
- getSecurityFirewallEvents - Read Firewall Actions by Project
- generateFirewallRule - Generate a firewall rule from natural language
updateAttackChallengeMode
Update the setting for determining if the project has Attack Challenge mode enabled.
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.updateAttackChallengeMode({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
projectId: "<id>",
attackModeEnabled: false,
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityUpdateAttackChallengeMode } from "@vercel/sdk/funcs/securityUpdateAttackChallengeMode.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityUpdateAttackChallengeMode(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
projectId: "<id>",
attackModeEnabled: false,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityUpdateAttackChallengeMode failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.UpdateAttackChallengeModeRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.UpdateAttackChallengeModeResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
getSecurityFirewallConfig
Lists WAF configs for a project
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.security.getSecurityFirewallConfig();
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityGetSecurityFirewallConfig } from "@vercel/sdk/funcs/securityGetSecurityFirewallConfig.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore();
async function run() {
const res = await securityGetSecurityFirewallConfig(vercel);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityGetSecurityFirewallConfig failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GetSecurityFirewallConfigResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
putFirewallConfig
Set the firewall configuration to provided rules and settings. Creates or overwrite the existing firewall configuration.
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.putFirewallConfig({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
firewallEnabled: true,
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityPutFirewallConfig } from "@vercel/sdk/funcs/securityPutFirewallConfig.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityPutFirewallConfig(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
firewallEnabled: true,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityPutFirewallConfig failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.PutFirewallConfigRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.PutFirewallConfigResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
updateFirewallConfig
Process updates to modify the existing firewall config for a project
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.updateFirewallConfig({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
action: "ip.remove",
id: "<id>",
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityUpdateFirewallConfig } from "@vercel/sdk/funcs/securityUpdateFirewallConfig.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityUpdateFirewallConfig(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
action: "ip.remove",
id: "<id>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityUpdateFirewallConfig failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.UpdateFirewallConfigRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.UpdateFirewallConfigResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
getFirewallConfig
Retrieve the specified firewall configuration for a project. The deployed configVersion will be active
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.getFirewallConfig({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
configVersion: "<value>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityGetFirewallConfig } from "@vercel/sdk/funcs/securityGetFirewallConfig.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityGetFirewallConfig(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
configVersion: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityGetFirewallConfig failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.GetFirewallConfigRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GetFirewallConfigResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
deleteSecurityFirewallConfigByConfigVersion
Promotes a draft WAF config to an active config
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.security.deleteSecurityFirewallConfigByConfigVersion({
configVersion: "<value>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityDeleteSecurityFirewallConfigByConfigVersion } from "@vercel/sdk/funcs/securityDeleteSecurityFirewallConfigByConfigVersion.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore();
async function run() {
const res = await securityDeleteSecurityFirewallConfigByConfigVersion(vercel, {
configVersion: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityDeleteSecurityFirewallConfigByConfigVersion failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.DeleteSecurityFirewallConfigByConfigVersionRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.DeleteSecurityFirewallConfigByConfigVersionResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
createSecurityFirewallConfigByConfigVersionActivate
Promotes a draft WAF config to an active config
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.security.createSecurityFirewallConfigByConfigVersionActivate({
configVersion: "<value>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityCreateSecurityFirewallConfigByConfigVersionActivate } from "@vercel/sdk/funcs/securityCreateSecurityFirewallConfigByConfigVersionActivate.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore();
async function run() {
const res = await securityCreateSecurityFirewallConfigByConfigVersionActivate(vercel, {
configVersion: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityCreateSecurityFirewallConfigByConfigVersionActivate failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.CreateSecurityFirewallConfigByConfigVersionActivateRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.CreateSecurityFirewallConfigByConfigVersionActivateResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
getActiveAttackStatus
Retrieve active attack data within the last N days (default: 1 day)
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.getActiveAttackStatus({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityGetActiveAttackStatus } from "@vercel/sdk/funcs/securityGetActiveAttackStatus.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityGetActiveAttackStatus(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityGetActiveAttackStatus failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.GetActiveAttackStatusRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GetActiveAttackStatusResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
getBypassIp
Retrieve the system bypass rules configured for the specified project
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.getBypassIp({
projectId: "<id>",
limit: 10,
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityGetBypassIp } from "@vercel/sdk/funcs/securityGetBypassIp.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityGetBypassIp(vercel, {
projectId: "<id>",
limit: 10,
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityGetBypassIp failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.GetBypassIpRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GetBypassIpResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
addBypassIp
Create new system bypass rules
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.addBypassIp({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityAddBypassIp } from "@vercel/sdk/funcs/securityAddBypassIp.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityAddBypassIp(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityAddBypassIp failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.AddBypassIpRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.AddBypassIpResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
removeBypassIp
Remove system bypass rules
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.removeBypassIp({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityRemoveBypassIp } from "@vercel/sdk/funcs/securityRemoveBypassIp.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityRemoveBypassIp(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityRemoveBypassIp failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.RemoveBypassIpRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.RemoveBypassIpResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
getSecurityFirewallEvents
Retrieve firewall actions for a project
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.security.getSecurityFirewallEvents({
projectId: "<id>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityGetSecurityFirewallEvents } from "@vercel/sdk/funcs/securityGetSecurityFirewallEvents.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore();
async function run() {
const res = await securityGetSecurityFirewallEvents(vercel, {
projectId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityGetSecurityFirewallEvents failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.GetSecurityFirewallEventsRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GetSecurityFirewallEventsResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
generateFirewallRule
Generate a firewall rule from a natural language description.
Example Usage
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.generateFirewallRule({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { securityGenerateFirewallRule } from "@vercel/sdk/funcs/securityGenerateFirewallRule.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await securityGenerateFirewallRule(vercel, {
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("securityGenerateFirewallRule failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.GenerateFirewallRuleRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GenerateFirewallRuleResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |