You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@aws-sdk/client-wafv2

Package Overview
Dependencies
Maintainers
2
Versions
493
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-wafv2

AWS SDK for JavaScript Wafv2 Client for Node.js, Browser and React Native

3.844.0
Source
npmnpm
Version published
Weekly downloads
134K
-12.79%
Maintainers
2
Weekly downloads
 
Created

What is @aws-sdk/client-wafv2?

@aws-sdk/client-wafv2 is an AWS SDK for JavaScript package that allows developers to interact with AWS WAF (Web Application Firewall) V2. This package provides functionalities to manage web ACLs, rules, and other WAF resources to protect web applications from common web exploits.

What are @aws-sdk/client-wafv2's main functionalities?

Create Web ACL

This feature allows you to create a new Web ACL (Access Control List) in AWS WAF. The code sample demonstrates how to set up a basic Web ACL with default actions and visibility configurations.

{"import":"import { WAFV2Client, CreateWebACLCommand } from '@aws-sdk/client-wafv2';","client":"const client = new WAFV2Client({ region: 'us-west-2' });","command":"const command = new CreateWebACLCommand({\n  Name: 'example-web-acl',\n  Scope: 'REGIONAL',\n  DefaultAction: { Allow: {} },\n  VisibilityConfig: {\n    SampledRequestsEnabled: true,\n    CloudWatchMetricsEnabled: true,\n    MetricName: 'example-web-acl'\n  },\n  Rules: []\n});","response":"const response = await client.send(command);","log":"console.log(response);"}

List Web ACLs

This feature allows you to list all Web ACLs in a specified scope (REGIONAL or CLOUDFRONT). The code sample demonstrates how to retrieve and log the list of Web ACLs.

{"import":"import { WAFV2Client, ListWebACLsCommand } from '@aws-sdk/client-wafv2';","client":"const client = new WAFV2Client({ region: 'us-west-2' });","command":"const command = new ListWebACLsCommand({ Scope: 'REGIONAL' });","response":"const response = await client.send(command);","log":"console.log(response.WebACLs);"}

Update Web ACL

This feature allows you to update an existing Web ACL. The code sample demonstrates how to change the default action of a Web ACL to block requests.

{"import":"import { WAFV2Client, UpdateWebACLCommand } from '@aws-sdk/client-wafv2';","client":"const client = new WAFV2Client({ region: 'us-west-2' });","command":"const command = new UpdateWebACLCommand({\n  Name: 'example-web-acl',\n  Scope: 'REGIONAL',\n  Id: 'web-acl-id',\n  DefaultAction: { Block: {} },\n  VisibilityConfig: {\n    SampledRequestsEnabled: true,\n    CloudWatchMetricsEnabled: true,\n    MetricName: 'example-web-acl'\n  },\n  Rules: []\n});","response":"const response = await client.send(command);","log":"console.log(response);"}

Delete Web ACL

This feature allows you to delete an existing Web ACL. The code sample demonstrates how to remove a Web ACL by specifying its name, scope, and ID.

{"import":"import { WAFV2Client, DeleteWebACLCommand } from '@aws-sdk/client-wafv2';","client":"const client = new WAFV2Client({ region: 'us-west-2' });","command":"const command = new DeleteWebACLCommand({\n  Name: 'example-web-acl',\n  Scope: 'REGIONAL',\n  Id: 'web-acl-id'\n});","response":"const response = await client.send(command);","log":"console.log(response);"}

Other packages similar to @aws-sdk/client-wafv2

FAQs

Package last updated on 09 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts