failAction

  • Property Manager name: Site Failover
  • Behavior version: The v2023-01-05 rule format supports the failAction 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