fail_‚Äčaction

  • Property Manager name: Site Failover
  • Behavior version: The v2023-09-20 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_‚Äčcodeinteger

Identifies a CP code assigned to this storage group.

net_‚Äčstorage_‚Äčhostname.download‚ÄčDomain‚ÄčNamestring

Domain name from which content can be downloaded.

net_‚Äčstorage_‚Äčhostname.g2o‚ÄčTokenstring

Signature Header Authentication key.

net_‚Äčstorage_‚Äčhostname.idinteger

Unique identifier for the storage group.

net_‚Äčstorage_‚Äčhostname.namestring

Name of the storage group.

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. 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.

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

Read-only. Describes the current usage limit for the CP code.

cp_‚Äčcode.created‚ÄčDateinteger

Read-only. UNIX epoch timestamp reflecting when the CP code was originally created.

cp_‚Äčcode.descriptionstring

Read-only. Additional description for the CP code.

cp_‚Äčcode.idinteger

Unique identifier for each CP code. Initially, you get this value when creating a new CP code in PAPI. You can also assign a cpcode‚ÄčId value from the List CP codes operation.

cp_‚Äčcode.namestring

Read-only. The name of the CP code you specify as the cpcode‚Äč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.

cp_‚Äčcode.productsarray

Read-only. The set of products the CP code is assigned to. This reflects product‚ÄčId values you specify when creating a new CP code in PAPI.

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