api_​prioritization

Version: v2025-01-13Includes use: Yes

Behavior name: API Prioritization Cloudlet

Enables the API Prioritization Cloudlet, which maintains continuity in user experience by serving an alternate static response when load is too high. You can configure rules using either the Cloudlets Policy Manager application or the Cloudlets API. Use this feature serve static API content, such as fallback JSON data. To serve non-API HTML content, use the visitor_prioritization behavior.

Default behavior

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

data "akamai_property_rules_builder" "api_prioritization" {
  rules_v2025_02_18 {
    name     = "API Prioritization Cloudlet"
    comments = "Enables the API Prioritization Cloudlet"
    behavior {
      api_prioritization {
        enabled                   = true
        isSharedPolicy            = false
        cloudletPolicy            = ""
        label                     = ""
        useThrottledCpCode        = false
        useThrottledStatusCode    = false
        netStorage                = ""
        netStoragePath            = ""
        alternateResponseCacheTtl = 5
      }
    }
  }
}
"behaviors": [
  {
    "name": "apiPrioritization",
    "options": {
      "enabled": true,
      "isSharedPolicy": false,
      "cloudletPolicy": "",
      "label": "",
      "useThrottledCpCode": false,
      "useThrottledStatusCode": false,
      "netStorage": "",
      "netStoragePath": "",
      "alternateResponseCacheTtl": 5
    }
  }
]

Options

Option Description
enabled
Activates the API Prioritization feature.
is_shared_policy
Whether you want to apply the Cloudlet shared policy to an unlimited number of properties within your account. Learn more about shared policies and how to create them in Cloudlets Policy Manager.
cloudlet_policy
Identifies the Cloudlet policy. Contains:
  • id. The cloudlet's ID.
  • name. The cloudlet's name.
cloudlet_shared_policy
Identifies the Cloudlet shared policy to use with this behavior. Use the Cloudlets API to list available shared policies.
label
A label to distinguish this API Prioritization policy from any others in the same property.
use_throttled_cp_code
Specifies whether to apply an alternative CP code for requests served the alternate response.
throttled_cp_code
Specifies the CP code as an object. You only need to provide the initial idstripping any
use_throttled_status_code
Allows you to assign a specific HTTP response code to a throttled request.
throttled_status_code
Specifies the HTTP response code for requests that receive the alternate response.
net_storage
Specify the NetStorage domain that contains the alternate response. Contains:
  • cp_code. Identifies a CP code assigned to this storage group.
  • download_domain_name. Domain name from which content can be downloaded.
  • g2o_token. Signature Header Authentication key.
net_storagePath
Specify the full NetStorage path for the alternate response, including trailing file name.
alternate_response_cache_ttl
Specifies the alternate response's time to live in the cache, 5 minutes by default. Value range is 5-30.