| Version: v2023-09-20 | Includes use: Yes | 
|---|
Behavior name: Media Origin Failover
Specifies how edge servers respond when the origin is unresponsive or suffers from server or content errors. You can specify how many times to retry, switch to a backup origin hostname, or configure a redirect.
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" "media_origin_failover" {
  rules_v2023_09_20 {
    name     = "Media Origin Failover"
    comments = "Specifies how edge servers respond when the origin is unresponsive or suffers from server or content errors."
    behavior {
      media_origin_failover {
        detect_origin_unresponsive = false
        detect_origin_unavailable  = false
        detect_object_unavailable  = false
        other_options              = ""
        client_response_code       = ""
        cache_error_response       = false
      }
    }
  }
}
"behaviors": [
  {
    "name": "mediaOriginFailover",
    "options": {
      "detectOriginUnresponsive": false,
      "detectOriginUnavailable": false,
      "detectObjectUnavailable": false,
      "otherOptions": "",
      "clientResponseCode": "",
      "cacheErrorResponse": false
    }
  }
]
Options
| Option | Description | 
|---|---|
| detect_origin_unresponsive | Allows you to configure what happens when the origin is unresponsive.
         | 
| origin_unresponsive_detection_level | Specify the level of response to slow origin connections. Value is one of:
           
 | 
| origin_unresponsive_blocklist_origin_ip | Enabling this blocklists the origin's IP address.
         | 
| origin_unresponsive_blocklist_window | This sets the delay before blocklisting an IP address. Value is one of:
           
 | 
| origin_unresponsive_recovery | This sets the recovery option. Value is one of:
           
 | 
| origin_unresponsive_retry_limit | Sets how many times to retry. Value is one of:
           
 | 
| origin_unresponsive_backup_host | This specifies the origin hostname.
         | 
| origin_unresponsive_alternate_host | This specifies the redirect's destination hostname.
         | 
| origin_unresponsive_modify_request_path | Modifies the request path.
         | 
| origin_unresponsive_modified_path | This specifies the path to form the new URL.
         | 
| origin_unresponsive_include_query_string | Enabling this includes the original set of query parameters.
         | 
| origin_unresponsive_redirect_method | Specifies the redirect response code. Value is one of:
           
 | 
| origin_unresponsive_change_protocol | This allows you to change the request protocol.
         | 
| origin_unresponsive_protocol | Specifies which protocol to use. Value is one of:
           
 | 
| detect_origin_unavailable | Allows you to configure failover settings when the origin server responds with errors.
         | 
| origin_unavailable_detection_level | Specifies how edge servers respond when the origin is unresponsive or suffers from server or content errors. Value is  RESPONSE_CODES. | 
| origin_unavailable_response_codes | Specifies the set of response codes identifying when the origin responds with errors.
         | 
| origin_unavailable_blocklist_origin_ip | Enabling this blocklists the origin's IP address.
         | 
| origin_unavailable_blocklist_window | This sets the delay before blocklisting an IP address. Value is one of:
           
 | 
| origin_unavailable_recovery | This sets the recovery option. Value is one of:
           
 | 
| origin_unavailable_retry_limit | Sets how many times to retry. Value is one of:
           
 | 
| origin_unavailable_backup_host | This specifies the origin hostname.
         | 
| origin_unavailable_alternate_host | This specifies the redirect's destination hostname.
         | 
| origin_unavailable_modify_request_path | Modifies the request path.
         | 
| origin_unavailable_modified_path | This specifies the path to form the new URL.
         | 
| origin_unavailable_include_query_string | Enabling this includes the original set of query parameters.
         | 
| origin_unavailable_redirect_method | Specifies either a redirect response code. Value is one of:
           
 | 
| origin_unavailable_change_protocol | Modifies the request protocol.
         | 
| origin_unavailable_protocol | Specifies the internet protocol type. Value is one of:
           
 | 
| detect_object_unavailable | Allows you to configure failover settings when the origin has content errors.
         | 
| object_unavailable_detection_level | Specify  RESPONSE_CODESthe only available option. | 
| object_unavailable_response_codes | Specifies the set of response codes identifying when there are content errors.
         | 
| object_unavailable_blocklist_origin_ip | Enabling this blocklists the origin's IP address.
         | 
| object_unavailable_blocklist_window | This sets the delay before blocklisting an IP address. Value is one of:
           
 | 
| object_unavailable_recovery | This sets the recovery option. Value is one of:
           
 | 
| object_unavailable_retry_limit | Sets how many times to retry. Value is one of:
           
 | 
| object_unavailable_backup_host | This specifies the origin hostname.
         | 
| object_unavailable_alternate_host | This specifies the redirect's destination hostname.
         | 
| object_unavailable_modify_request_path | Enabling this allows you to modify the request path.
         | 
| object_unavailable_modified_path | This specifies the path to form the new URL.
         | 
| object_unavailable_include_query_string | Enabling this includes the original set of query parameters.
         | 
| object_unavailable_redirect_method | Specifies a redirect response code. Value is one of:
           
 | 
| object_unavailable_change_protocol | Changes the request protocol.
         | 
| object_unavailable_protocol | Specifies the internet protocol. Value is one of:
           
 | 
| client_response_code | Specifies the response code served to the client.
         | 
| cache_error_response | When enabled, caches the error response.
         | 
| cache_window | This sets error response's TTL. Value is one of:
           
 | 
