random

Version: v2023-01-05Includes use: Yes

Criterion name: Sample Percentage

Matches a specified percentage of requests. Use this match to apply behaviors to a percentage of your incoming requests that differ from the remainder, useful for A/B testing, or to offload traffic onto different servers.

Default criterion

These samples reflect the criterion's default settings. You can use these as is in your configurations or make adjustments based on the criterion's available options.

data "akamai_property_rules_builder" "random" {
  rules_v2023_01_05 {
    name     = "Sample Percentage"
    comments = "Matches a specified percentage of requests."
    criterion {
      random {
        bucket = 100
      }
    }
  }
}
"criterion": [
  {
    "name": "random",
    "options": {
      "bucket": 100
    }
  }
]

Options

Option Description
bucket
Specify a percentage of random requests to which to apply a behavior. Any remainders do not match. Value range is 0-100.