GuideReference
TrainingSupportCommunity

fail_​action

  • Property Manager name: Site Failover
  • Behavior version: The v2023-01-05 rule format supports the fail_​action behavior v1.7.
  • Rule format status: GA, stable
  • Access: Read-write
  • Allowed in includes: Yes

Specifies how to respond when the origin is not available: by serving stale content, by serving an error page, or by redirecting. To apply this behavior, you should match on an origin​_timeout or match​_response​_code.

OptionTypeDescriptionRequires
enabledboolean

When enabled in case of a failure to contact the origin, the current behavior applies.

{"displayType":"boolean","tag":"input","type":"checkbox"}
action_​typeenum

Specifies the basic action to take when there is a failure to contact the origin.

{"displayType":"enum","options":["SERVE_STALE","REDIRECT","RECREATED_CO","RECREATED_CEX","RECREATED_NS","DYNAMIC"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
SERVE_​STALE

Serves content that is already in the cache.

REDIRECT

Specifies a redirect action. (Use with these options: redirect_​hostname_​type, redirect_​hostname, redirect_​custom_​path, redirect_​path, redirect_​method, modify_​protocol, and protocol.)

RECREATED_​CO

Serves alternate content from your network. (Use with these options: content_​hostname, content_​custom_​path, and content_​path.)

RECREATED_​CEX

Serves alternate content from an external network. (Use with these options: cex_​hostname, cex_​custom_​path, and cex_​path.)

RECREATED_​NS

Serves Net​Storage content. (Use with these options: net_​storage_​hostname, net_​storage_​path, and cp_​code.)

DYNAMIC

Allows you to serve dynamic Saa​S content if Saa​S acceleration is available on your contract. (Use with these options: dynamic_​method, dynamic_​custom_​path, saas_​type, saas_​suffix, saas_​regex, and saas_​replace.)

saas_​typeenum

Identifies the component of the request that identifies the Saa​S dynamic fail action.

action_​type is DYNAMIC
{"displayType":"enum","options":["HOSTNAME","PATH","QUERY_STRING","COOKIE"],"tag":"select"}
{"if":{"attribute":"actionType","op":"eq","value":"DYNAMIC"}}
Supported values:
COOKIE
HOSTNAME
PATH
QUERY_STRING
saas_​cname_​enabledboolean

Specifies whether to use a CNAME chain to determine the hostname for the Saa​S dynamic failaction.

saas_​type is HOSTNAME
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"saasType","op":"eq","value":"HOSTNAME"}}
saas_​cname_​levelnumber

Specifies the number of elements in the CNAME chain backwards from the edge hostname that determines the hostname for the Saa​S dynamic failaction.

saas_​cname_​enabled is true
{"displayType":"number","tag":"input","type":"number"}
{"if":{"attribute":"saasCnameEnabled","op":"eq","value":true}}
saas_​query_​stringstring (allows variables)

Specifies the name of the query parameter that identifies this Saa​S dynamic failaction.

saas_​type is QUERY_​STRING
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"saasType","op":"eq","value":"QUERY_STRING"}}
saas_​regexstring

Specifies the substitution pattern (a Perl-compatible regular expression) that defines the Saa​S dynamic failaction.

action_​type is DYNAMIC
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"actionType","op":"eq","value":"DYNAMIC"}}
saas_​replacestring (allows variables)

Specifies the replacement pattern that defines the Saa​S dynamic failaction.

action_​type is DYNAMIC
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"actionType","op":"eq","value":"DYNAMIC"}}
saas_​suffixstring (allows variables)

Specifies the static portion of the Saa​S dynamic failaction.

action_​type is DYNAMIC
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"actionType","op":"eq","value":"DYNAMIC"}}
dynamic_​methodenum

Specifies the redirect method.

action_​type is DYNAMIC
{"displayType":"enum","options":["SERVE_301","SERVE_302","SERVE_ALTERNATE"],"tag":"select"}
{"if":{"attribute":"actionType","op":"eq","value":"DYNAMIC"}}
SERVE_301

A 301 redirect response.

SERVE_302

A 302 redirect response.

SERVE_​ALTERNATE

Serve an alternate response.

dynamic_​custom_​pathboolean

Allows you to modify the original requested path.

action_​type is DYNAMIC
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"actionType","op":"eq","value":"DYNAMIC"}}
dynamic_​pathstring (allows variables)

Specifies the new path.

dynamic_​custom_​path is true
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"dynamicCustomPath","op":"eq","value":true}}
redirect_​hostname_​typeenum

Whether to preserve or customize the hostname.

action_​type is REDIRECT
{"displayType":"enum","options":["ORIGINAL","ALTERNATE"],"tag":"select"}
{"if":{"attribute":"actionType","op":"eq","value":"REDIRECT"}}
ORIGINAL

Preserve the original hostname in the redirect.

ALTERNATE

Specify a redirect_​hostname.

redirect_​hostnamestring (allows variables)

When the action_​type is REDIRECT and the redirect_​hostname_​type is ALTERNATE, this specifies the hostname for the redirect.

redirect_​hostname_​type is ALTERNATE
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"redirectHostnameType","op":"eq","value":"ALTERNATE"}}
redirect_​custom_​pathboolean

Uses the redirect_​path to customize a new path.

action_​type is REDIRECT
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"actionType","op":"eq","value":"REDIRECT"}}
redirect_​pathstring (allows variables)

Specifies a new path.

redirect_​custom_​path is true
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"redirectCustomPath","op":"eq","value":true}}
redirect_​methodenum

Specifies the HTTP response code.

action_​type is REDIRECT
{"displayType":"enum","options":["302","301"],"tag":"select"}
{"if":{"attribute":"actionType","op":"eq","value":"REDIRECT"}}
Supported values:
301
302
content_​hostnamestring (allows variables)

Specifies the static hostname for the alternate redirect.

action_​type is RECREATED_​CO
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_CO"}}
content_​custom_​pathboolean

Specifies a custom redirect path.

action_​type is RECREATED_​CO
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_CO"}}
content_​pathstring (allows variables)

Specifies a custom redirect path.

content_​custom_​path is true
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"contentCustomPath","op":"eq","value":true}}
net_​storage_​hostnameobject

When the action_​type is RECREATED_​NS, specifies the Net​Storage origin to serve the alternate content. Contact Akamai Professional Services for your Net​Storage origin's id.

action_​type is RECREATED_​NS
{"displayType":"object","tag":"input","todo":true}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_NS"}}
net_​storage_​hostname.cp_​code​Listarray

A set of CP codes that apply to this storage group.

net_​storage_​hostname.download​Domain​Namestring

Domain name from which content can be downloaded.

net_​storage_​hostname.idnumber

Unique identifier for the storage group.

net_​storage_​hostname.namestring

Name of the storage group.

net_​storage_​hostname.upload​Domain​Namestring

Domain name used to upload content.

net_​storage_​pathstring (allows variables)

When the action_​type is RECREATED_​NS, specifies the path for the Net​Storage request.

action_​type is RECREATED_​NS
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_NS"}}
cex_​hostnamestring (allows variables)

Specifies a hostname.

action_​type is RECREATED_​CEX
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_CEX"}}
cex_​custom_​pathboolean

Specifies a custom path.

action_​type is RECREATED_​CEX
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_CEX"}}
cex_​pathstring (allows variables)

Specifies a custom path.

cex_​custom_​path is true
{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"cexCustomPath","op":"eq","value":true}}
cp_​codeobject

Specifies a CP code for which to log errors for the Net​Storage location.

action_​type is RECREATED_​NS
{"displayType":"object","tag":"input","todo":true}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_NS"}}
cp_​code.descriptionstring

Additional description for the CP code.

cp_​code.idinteger

Unique identifier for each CP code.

cp_​code.namestring

The name of the CP code.

cp_​code.productsarray

The set of products the CP code is assigned to.

status_​codeenum

Assigns a new HTTP status code to the failure response.

action_​type is RECREATED_​NS
{"displayType":"enum","options":["200","404","500","100","101","102","103","122","201","202","203","204","205","206","207","226","400","401","402","403","405","406","407","408","409","410","411","412","413","414","415","416","417","422","423","424","425","426","428","429","431","444","449","450","499","501","502","503","504","505","506","507","509","510","511","598","599"],"tag":"select"}
{"if":{"attribute":"actionType","op":"eq","value":"RECREATED_NS"}}
Supported values:
100
101
102
103
122
200
201
202
203
204
205
206
207
226
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
422
423
424
425
426
428
429
431
444
449
450
499
500
501
502
503
504
505
506
507
509
510
511
598
599
preserve_​query_​stringboolean

When using either content_​custom_​path, cex_​custom_​path, dynamic_​custom_​path, or redirect_​custom_​path to specify a custom path, enabling this passes in the original request's query string as part of the path.

content_​custom_​path is true
OR cex_​custom_​path is true
OR redirect_​custom_​path is true
OR dynamic_​custom_​path is true
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"op":"or","params":[{"attribute":"contentCustomPath","op":"eq","value":true},{"attribute":"cexCustomPath","op":"eq","value":true},{"attribute":"redirectCustomPath","op":"eq","value":true},{"attribute":"dynamicCustomPath","op":"eq","value":true}]}}
modify_​protocolboolean

Modifies the redirect's protocol using the value of the protocol field.

action_​type is REDIRECT
OR dynamic_​method is either: SERVE_301, SERVE_302
{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"op":"or","params":[{"attribute":"actionType","op":"eq","value":"REDIRECT"},{"attribute":"dynamicMethod","op":"in","value":["SERVE_301","SERVE_302"]}]}}
protocolenum

When the action_​type is REDIRECT and modify_​protocol is enabled, this specifies the redirect's protocol.

modify_​protocol is true
{"displayType":"enum","options":["HTTP","HTTPS"],"tag":"select"}
{"if":{"attribute":"modifyProtocol","op":"eq","value":true}}
Supported values:
HTTP
HTTPS