Retrieves ranked monetization statistics¶
Description¶
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.
Usage¶
wafv2_get_revenue_statistics(StatisticType, TimeWindow, Scope, Currency,
GroupBy, Filters, NextMarker, Limit, SortBy, SortOrder)
Arguments¶
StatisticType
[required] TOP_SOURCES_BY_REVENUE ranks revenue from AI bot traffic, grouped by the dimension you specify in the GroupBy parameter (NAME, CATEGORY, INTENT, ORGANIZATION, or WEBACL); GroupBy is required for this statistic type. TOP_PATHS_BY_REVENUE ranks revenue by path.
TimeWindow
[required] The time range for the query. Specify start and end timestamps.
Scope
[required] Specifies whether this is for a Amazon CloudFront distribution (CLOUDFRONT) or for a regional application (REGIONAL).
Currency
[required] The currency for the revenue amounts in the response.
GroupBy
The dimension to group results by: NAME, CATEGORY, INTENT, ORGANIZATION, or WEBACL. Required when StatisticType is TOP_SOURCES_BY_REVENUE. Not required for TOP_PATHS_BY_REVENUE, where results are grouped by content path. If StatisticType is TOP_SOURCES_BY_REVENUE and GroupBy is omitted, the request is rejected with a WAFInvalidParameterException.
Filters
Optional filters to narrow the results.
NextMarker
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
The maximum number of results to return.
SortBy
The field to sort results by: REVENUE, PERCENTAGE, or NAME.
SortOrder
The sort order: ASC for ascending or DESC for descending.
Value¶
A list with the following syntax:
list(
SourceStatistics = list(
list(
SourceName = "string",
Percentage = 123.0,
Amount = "string",
RequestCount = 123,
SourceCategory = "string",
Intent = "string",
Organization = "string",
Verified = TRUE|FALSE,
GroupByValue = "string"
)
),
RevenuePathStatistics = list(
list(
Path = "string",
Percentage = 123.0,
Amount = "string",
RequestCount = 123
)
),
NextMarker = "string"
)
Request syntax¶
svc$get_revenue_statistics(
StatisticType = "TOP_SOURCES_BY_REVENUE"|"TOP_PATHS_BY_REVENUE",
TimeWindow = list(
StartTime = as.POSIXct(
"2015-01-01"
),
EndTime = as.POSIXct(
"2015-01-01"
)
),
Scope = "CLOUDFRONT"|"REGIONAL",
Currency = "USDC",
GroupBy = "NAME"|"CATEGORY"|"INTENT"|"ORGANIZATION"|"WEBACL",
Filters = list(
list(
Name = "string",
Values = list(
"string"
)
)
),
NextMarker = "string",
Limit = 123,
SortBy = "REVENUE"|"PERCENTAGE"|"NAME",
SortOrder = "ASC"|"DESC"
)