get_top_path_statistics_by_traffic
¶
get_top_path_statistics_by_traffic(
web_acl_arn: ResourceArn,
scope: Scope,
time_window: TimeWindow,
limit: PathStatisticsLimit,
number_of_top_traffic_bots_per_path: NumberOfTopTrafficBotsPerPath,
*,
config_overrides: Optional[WAFV2ClientConfig] = None,
uri_path_prefix: Optional[UriPathPrefixString] = None,
bot_category: Optional[FilterString] = None,
bot_organization: Optional[FilterString] = None,
bot_name: Optional[FilterString] = None,
next_marker: Optional[NextMarker] = None,
) -> GetTopPathStatisticsByTrafficResponse
Retrieves aggregated statistics about the top URI paths accessed by bot traffic for a specified web ACL and time window. You can use this operation to analyze which paths on your web application receive the most bot traffic and identify the specific bots accessing those paths. The operation supports filtering by bot category, organization, or name, and allows you to drill down into specific path prefixes to view detailed URI-level statistics.
Parameters:
-
web_acl_arn(ResourceArn) –The Amazon Resource Name (ARN) of the web ACL for which you want to retrieve path statistics.
-
scope(Scope) –Specifies whether the web ACL is for an Amazon Web Services CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer, an AppSync GraphQL API, an Amazon Cognito user pool, an Amazon Web Services App Runner service, or an Amazon Web Services Verified Access instance.
-
uri_path_prefix(Optional[UriPathPrefixString], default:None) –A URI path prefix to filter the results. When you specify this parameter, the operation returns statistics for individual URIs within the specified path prefix. For example, if you specify
/api, the response includes statistics for paths like/api/v1/usersand/api/v2/orders. If you don't specify this parameter, the operation returns top-level path statistics. -
time_window(TimeWindow) –The time window for which you want to retrieve path statistics. The time window must be within the data retention period for your web ACL.
-
bot_category(Optional[FilterString], default:None) –Filters the results to include only traffic from bots in the specified category. For example, you can filter by
aito see only AI crawler traffic, orsearch_engineto see only search engine bot traffic. When you apply this filter, theSourcefield is populated in the response. -
bot_organization(Optional[FilterString], default:None) –Filters the results to include only traffic from bots belonging to the specified organization. For example, you can filter by
openaiorgoogle. When you apply this filter, theSourcefield is populated in the response. -
bot_name(Optional[FilterString], default:None) –Filters the results to include only traffic from the specified bot. For example, you can filter by
gptbotorgooglebot. When you apply this filter, theSourcefield is populated in the response. -
limit(PathStatisticsLimit) –The maximum number of path statistics to return. Valid values are 1 to 100.
-
number_of_top_traffic_bots_per_path(NumberOfTopTrafficBotsPerPath) –The maximum number of top bots to include in the statistics for each path. Valid values are 1 to 10.
-
next_marker(Optional[NextMarker], default:None) –When you request a list of objects with a
Limitsetting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarkervalue in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
Raises:
-
WAFFeatureNotIncludedInPricingPlanException–The operation failed because the specified WAF feature isn't supported by the CloudFront pricing plan associated with the web ACL.
-
WAFInternalErrorException–Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAFInvalidOperationException–The operation isn't valid.
-
WAFInvalidParameterException–The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACLwith aDefaultActionthat isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAFNonexistentItemException–WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_wafv2/_services/wafv2.py
2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 | |