GetTopPathStatisticsByTraffic
Source:
src/AWS/WAFv2/GetTopPathStatisticsByTraffic.ts
Runtime binding for wafv2:GetTopPathStatisticsByTraffic — read
aggregated statistics about the URI paths receiving the most bot traffic
on the bound WebACL; the web ACL ARN and scope are injected
automatically.
Requires a pricing plan that includes bot statistics — accounts without
it receive the typed WAFFeatureNotIncludedInPricingPlanException.
Provide WAFv2.GetTopPathStatisticsByTrafficHttp on the hosting Lambda
Function to satisfy the requirement.
Inspecting Traffic
Section titled “Inspecting Traffic”// init — grants wafv2:GetTopPathStatisticsByTraffic on the web ACLconst getTopPaths = yield* AWS.WAFv2.GetTopPathStatisticsByTraffic(acl);
// runtimeconst now = yield* Effect.sync(() => new Date());const { PathStatistics } = yield* getTopPaths({ TimeWindow: { StartTime: new Date(now.getTime() - 60 * 60 * 1000), EndTime: now, }, Limit: 10, NumberOfTopTrafficBotsPerPath: 3,});