Skip to content

Commit

Permalink
add description to function
Browse files Browse the repository at this point in the history
  • Loading branch information
daknhh committed Apr 12, 2024
1 parent 7640350 commit 10e36b3
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,13 @@ async function calculateCustomRulesCapacities(customRules: FmsRule[], deployment
return capacities;
}


/**
* Function to remove the ScopeDown statement from the RateBasedStatement
* @param customRule the customRule
* @param rateBasedStatement the RateBasedStatement
* @returns tempCalcRule
*/
function calculateRatebasedStatementwithoutScopeDownStatement(customRule: FmsRule, rateBasedStatement: wafv2.CfnWebACL.RateBasedStatementProperty): FmsRule {
// Remove scopedDownStatement if it exists
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { scopeDownStatement, ...rateBasedWithoutScopeDown } = rateBasedStatement;
const statement:wafv2.CfnWebACL.StatementProperty = {
Expand Down Expand Up @@ -640,7 +644,7 @@ function calculateRegexPatternSetsStatementsCapacity(regexPatternSetsStatement:
* @param customRule FmsRule
* @param concatenatedStatement wafv2.CfnWebACL.AndStatementProperty | wafv2.CfnWebACL.OrStatementProperty
* @param isOrStatement boolean
* @returns
* @returns tempCalcRule
*/
function buildCustomRuleWithoutReferenceStatements(customRule: FmsRule, concatenatedStatement: wafv2.CfnWebACL.AndStatementProperty | wafv2.CfnWebACL.OrStatementProperty, isOrStatement: boolean) {
const statements = concatenatedStatement.statements as wafv2.CfnWebACL.StatementProperty[];
Expand Down

0 comments on commit 10e36b3

Please sign in to comment.