image_​manager_​video

Version: v2024-02-12Includes use: Yes

Behavior name: Image and Video Manager (Videos)

Optimizes videos managed by Image and Video Manager for the requesting device. You can also use this behavior to generate API tokens to apply your own policies to matching videos using the Image and Video Manager API. To apply this behavior, you need to match on a file_extension.

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" "image_manager_video" {
  rules_v2025_02_18 {
    name     = "Image and Video Manager (Videos)"
    comments = "Optimizes videos managed by Image and Video Manager for the requesting device."
    behavior {
      image_manager_video {
        enabled                 = true
        resize                  = false
        apply_best_file_type    = true
        super_cache_region      = "US"
        cp_code_original        = ""
        cp_code_transformed     = ""
        use_existing_policy_set = false
        advanced                = false
        policy_token_default    = "freshVideo"
      }
    }
  }
}
"behaviors": [
  {
  "name": "imageManagerVideo",
  "options": {
    "enabled": true,
    "resize": false,
    "applyBestFileType": true,
    "superCacheRegion": "US",
    "cpCodeOriginal": "",
    "cpCodeTransformed": "",
    "useExistingPolicySet": false,
    "advanced": false,
    "policyTokenDefault": "freshVideo"
    }
  }
]

Options

Option Description
enabled
Applies Image and Video Manager's video optimization to the current content.
resize
When enabled, scales down video for smaller mobile screens, based on the device's User-Agent header.
apply_best_file_type
When enabled, automatically converts videos to the best file type for the requesting device. This produces the smallest file size that retains image quality, based on the user agent and the initial image file.
super_cache_region
To optimize caching, assign a region close to your site's heaviest traffic. Value is one of:
  • US
  • ASIA
  • AUSTRALIA
  • EMEA
  • JAPAN
  • CHINA
cp_code_original
Specifies the CP code for which to track Image and Video Manager video traffic. Use this along with cp_code_transformed to track traffic to derivative video content. You only need to provide the initial id, stripping any cpc_ prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data. Contains:
  • limits. Describes the current usage limit for the CP code.
  • date. UNIX epoch timestamp reflecting when the CP code was originally created.
  • description. Additional information about the CP code.
  • id. Unique identifier for each CP code. Initially, you get this value when creating a new CP code in PAPI. You can also assign a cpcodeId value from the List CP codes operation.
  • name. The name of the CP code you specify as the cpcodeName when creating a new CP code in PAPI. You can modify this value with the PUT operation in the CP codes and Reporting Groups API.
  • products. The set of products the CP code is assigned to. This reflects productId values you specify when creating a new CP code in PAPI.
cp_code_transformed
Specifies the CP code to identify derivative transformed video content. You only need to provide the initial id, stripping any cpc_ prefix to pass the integer to the rule tree. Additional CP code details may reflect back in subsequent read-only data. Contains:
  • cp_code_limits. Describes the current usage limit for the CP code.
  • created_date. UNIX epoch timestamp reflecting when the CP code was originally created.
  • description. Additional information about the CP code.
  • id. Unique identifier for each CP code. Initially, you get this value when creating a new CP code in PAPI. You can also assign a cp_code_id value from the List CP codes operation.
  • name. The name of the CP code you specify as the cp_code_name when creating a new CP code in PAPI. You can modify this value with the PUT operation in the CP codes and Reporting Groups API.
  • products. The set of products the CP code is assigned to. This reflects product_iId values you specify when creating a new CP code in PAPI.
use_existing_policy_set
Whether to use a previously created policy set that may be referenced in other properties, or create a new policy set to use with this property. A policy set can be shared across multiple properties belonging to the same contract. The behavior populates any changes to the policy set across all properties that reference that set.
policy_set
Identifies the existing policy set configured with Image and Video Manager API.
advanced
When disabled, applies a single standard policy based on your property name. Allows you to reference a rule-specific policy_token for videos with different match criteria.
policy_token
Specifies a custom policy defined in the Image and Video Manager Policy Manager or the Image and Video Manager API. The policy name can include up to 64 alphanumeric, dash, or underscore characters.
policy_tokenDefault
Specifies the default policy identifier, which is registered with the Image and Video Manager API once you activate this property.