How to use the WAFV2 function from aws-sdk

Find comprehensive JavaScript aws-sdk.WAFV2 code examples handpicked from public code repositorys.

16
17
18
19
20
21
22
23
24


const AWS = require('aws-sdk');
const lambda = process.env.METRICS == "true" ? new AWS.Lambda({ customUserAgent: process.env.SOLUTION_IDENTIFIER, region: 'us-east-1' }) : new AWS.Lambda({ region: 'us-east-1' });
const ssm = process.env.METRICS == "true" ? new AWS.SSM({ customUserAgent: process.env.SOLUTION_IDENTIFIER }) : new AWS.SSM();
const wafv2 = process.env.METRICS == "true" ? new AWS.WAFV2({ customUserAgent: process.env.SOLUTION_IDENTIFIER, region: 'us-east-1' }) : new AWS.WAFV2({ region: 'us-east-1' });


exports.handler = async (event, context) => {
fork icon5
star icon12
watch icon15

10
11
12
13
14
15
16
17
18
19
 *  and limitations under the License.                                                                                *
 *********************************************************************************************************************/

const aws = require('aws-sdk');

const wafv2 = process.env.METRICS == "true" ? new aws.WAFV2({ region: 'us-east-1', customUserAgent: process.env.SOLUTION_IDENTIFIER }) : new aws.WAFV2({ region: 'us-east-1' });
const dynamodb = process.env.METRICS == "true" ? new aws.DynamoDB({customUserAgent: process.env.SOLUTION_IDENTIFIER}) : new aws.DynamoDB();


const crypto = require("crypto");
fork icon5
star icon12
watch icon15

0
1
2
3
4
5
6
7
8
9
var AWS = require('aws-sdk');
var async = require('async');
var helpers = require(__dirname + '/../../../helpers/aws');

module.exports = function(AWSConfig, collection, retries, callback) {
    var wafv2 = new AWS.WAFV2(AWSConfig);

    async.eachLimit(collection.wafv2.listWebACLs[AWSConfig.region].data, 15, function(acl, cb){        
        var params = {
            'Name': acl.Name,
fork icon595
star icon0
watch icon71

1
2
3
4
5
6
7
8
9
10
const config = require('./config');

module.exports = class ApiGateway {
  constructor() {
    this.gtw = new AWS.APIGateway();
    this.waf = new AWS.WAFV2();
  }

  async createApi(name, description) {
    const params = {
fork icon1
star icon0
watch icon7