get_revenue_statistics
¶
get_revenue_statistics(
statistic_type: RankingStatisticType,
time_window: TimeWindow,
scope: Scope,
currency: Currency,
*,
config_overrides: Optional[WAFV2ClientConfig] = None,
group_by: Optional[GroupByType] = None,
filters: Optional[MonetizationFilterList] = None,
next_marker: Optional[NextMarker] = None,
limit: Optional[PathStatisticsLimit] = None,
sort_by: Optional[RankingSortBy] = None,
sort_order: Optional[SortOrder] = None,
) -> GetRevenueStatisticsResponse
Retrieves ranked monetization statistics. Use the StatisticType parameter to specify the ranking: TOP_SOURCES_BY_REVENUE for top sources by revenue, or TOP_PATHS_BY_REVENUE for top content paths by revenue. This operation is only available for CLOUDFRONT scope. The maximum supported time window is 90 days. When no CurrencyMode filter is provided, results default to REAL. To retrieve test data, include a CurrencyMode filter with the value TEST.
Parameters:
-
statistic_type(RankingStatisticType) –TOP_SOURCES_BY_REVENUEranks revenue from AI bot traffic, grouped by the dimension you specify in theGroupByparameter (NAME,CATEGORY,INTENT,ORGANIZATION, orWEBACL);GroupByis required for this statistic type.TOP_PATHS_BY_REVENUEranks revenue by path. -
time_window(TimeWindow) –The time range for the query. Specify start and end timestamps.
-
scope(Scope) –Specifies whether this is for a Amazon CloudFront distribution (
CLOUDFRONT) or for a regional application (REGIONAL). -
currency(Currency) –The currency for the revenue amounts in the response.
-
group_by(Optional[GroupByType], default:None) –The dimension to group results by:
NAME,CATEGORY,INTENT,ORGANIZATION, orWEBACL. Required whenStatisticTypeisTOP_SOURCES_BY_REVENUE. Not required forTOP_PATHS_BY_REVENUE, where results are grouped by content path. IfStatisticTypeisTOP_SOURCES_BY_REVENUEandGroupByis omitted, the request is rejected with aWAFInvalidParameterException. -
filters(Optional[MonetizationFilterList], default:None) –Optional filters to narrow the results.
-
next_marker(Optional[NextMarker], default:None) –When you get a paginated response, this marker indicates that additional results are available. Use it in a subsequent request to retrieve the next page of results.
-
limit(Optional[PathStatisticsLimit], default:None) –The maximum number of results to return.
-
sort_by(Optional[RankingSortBy], default:None) –The field to sort results by:
REVENUE,PERCENTAGE, orNAME. -
sort_order(Optional[SortOrder], default:None) –The sort order:
ASCfor ascending orDESCfor descending.
Raises:
-
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
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 | |