{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-waf/json-schema/aws-waf-get-revenue-statistics-request-schema.json",
  "title": "GetRevenueStatisticsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-waf-operations-api-openapi.yml#/components/schemas/GetRevenueStatisticsRequest",
  "type": "object",
  "properties": {
    "StatisticType": {
      "type": "string",
      "enum": [
        "TOP_SOURCES_BY_REVENUE",
        "TOP_PATHS_BY_REVENUE"
      ],
      "description": "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": {
      "$ref": "#/$defs/TimeWindow"
    },
    "Scope": {
      "type": "string",
      "enum": [
        "CLOUDFRONT",
        "REGIONAL"
      ],
      "description": "Specifies whether this is for a Amazon CloudFront distribution (CLOUDFRONT) or for a regional application (REGIONAL)."
    },
    "Currency": {
      "type": "string",
      "enum": [
        "USDC"
      ],
      "description": "The currency for the revenue amounts in the response."
    },
    "GroupBy": {
      "type": "string",
      "enum": [
        "NAME",
        "CATEGORY",
        "INTENT",
        "ORGANIZATION",
        "WEBACL"
      ],
      "description": "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": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MonetizationFilter"
      },
      "description": "Optional filters to narrow the results."
    },
    "NextMarker": {
      "type": "string",
      "description": "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": {
      "type": "integer",
      "description": "The maximum number of results to return."
    },
    "SortBy": {
      "type": "string",
      "enum": [
        "REVENUE",
        "PERCENTAGE",
        "NAME"
      ],
      "description": "The field to sort results by: REVENUE, PERCENTAGE, or NAME."
    },
    "SortOrder": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "description": "The sort order: ASC for ascending or DESC for descending."
    }
  },
  "required": [
    "StatisticType",
    "TimeWindow",
    "Scope",
    "Currency"
  ],
  "$defs": {
    "MonetizationFilter": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The filter name. Format: Key is a string, Value is a list of strings. Enum-restricted (invalid values rejected): CurrencyMode: REAL, TEST ChainName: BASE, SOLANA, BASE_SEPOLIA, SOLANA_DEVNET SettlementStatus: SETTLED, PENDING, FAILED, SERVICE_ERROR, SKIPPED_ORIGIN_ERROR, DUPLICATE HttpSourceName: CF, ALB, APIGW, APPRUNNER, COGNITO, VERIFIED_ACCESS ARN-validated: WebACLArn: valid WAFv2 web ACL ARN Free-text (any string up to 256 chars): SourceName: The name of the bot. Populated from Bot Control verified bot labels. SourceCategory: The category classification of the bot. From Bot Control catego"
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values to filter on. Specify as a list of strings. Results match any of the specified values (OR logic). Duplicate values are silently deduplicated. Maximum: 20 values per filter."
        }
      },
      "required": [
        "Name",
        "Values"
      ]
    },
    "TimeWindow": {
      "type": "object",
      "properties": {
        "StartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The beginning of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\". You can specify any time range in the previous three hours."
        },
        "EndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end of the time range from which you want GetSampledRequests to return a sample of the requests that your Amazon Web Services resource received. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, \"2016-09-27T14:50Z\". You can specify any time range in the previous three hours."
        }
      },
      "required": [
        "StartTime",
        "EndTime"
      ]
    }
  }
}