GetSampledRequests
Source:
src/AWS/WAFv2/GetSampledRequests.ts
Runtime binding for wafv2:GetSampledRequests — read a sample of the web
requests that the bound WebACL evaluated for a given rule and
time window; the web ACL ARN and scope are injected automatically.
Provide WAFv2.GetSampledRequestsHttp on the hosting Lambda Function to
satisfy the requirement.
Inspecting Traffic
Section titled “Inspecting Traffic”// init — grants wafv2:GetSampledRequests on the web ACLconst getSampledRequests = yield* AWS.WAFv2.GetSampledRequests(acl);
// runtimeconst now = yield* Effect.sync(() => new Date());const { SampledRequests } = yield* getSampledRequests({ RuleMetricName: "rate-limit", TimeWindow: { StartTime: new Date(now.getTime() - 60 * 60 * 1000), EndTime: now, }, MaxItems: 100,});