Skip to content

/AWS1/CL_LSADISTRIBCUSRORRSP

Describes a custom error response for a Lightsail distribution. A custom error response specifies the page that the distribution returns to the viewer. It also specifies the HTTP status code that the distribution sends when the origin responds with a given HTTP error code.

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_errorcode TYPE /AWS1/LSAINTEGER /AWS1/LSAINTEGER

The HTTP error code from the origin that triggers the custom error response (for example, 403 or 404).

iv_responsecode TYPE /AWS1/LSASTRING /AWS1/LSASTRING

The HTTP status code that the distribution returns to the viewer for the custom error response.

iv_responsepagepath TYPE /AWS1/LSASTRING /AWS1/LSASTRING

The path to the custom error page that the distribution returns to the viewer (for example, /404.html). The path must begin with a forward slash (/) and reference an object that is available from the origin.

iv_errorcachingminttl TYPE /AWS1/LSALONG /AWS1/LSALONG

The minimum time, in seconds, that the distribution caches the custom error response before requesting the object again from the origin. If you don't specify a value, the default is 10 seconds.


Queryable Attributes

errorCode

The HTTP error code from the origin that triggers the custom error response (for example, 403 or 404).

Accessible with the following methods

Method Description
GET_ERRORCODE() Getter for ERRORCODE, with configurable default
ASK_ERRORCODE() Getter for ERRORCODE w/ exceptions if field has no value
HAS_ERRORCODE() Determine if ERRORCODE has a value

responseCode

The HTTP status code that the distribution returns to the viewer for the custom error response.

Accessible with the following methods

Method Description
GET_RESPONSECODE() Getter for RESPONSECODE, with configurable default
ASK_RESPONSECODE() Getter for RESPONSECODE w/ exceptions if field has no value
HAS_RESPONSECODE() Determine if RESPONSECODE has a value

responsePagePath

The path to the custom error page that the distribution returns to the viewer (for example, /404.html). The path must begin with a forward slash (/) and reference an object that is available from the origin.

Accessible with the following methods

Method Description
GET_RESPONSEPAGEPATH() Getter for RESPONSEPAGEPATH, with configurable default
ASK_RESPONSEPAGEPATH() Getter for RESPONSEPAGEPATH w/ exceptions if field has no va
HAS_RESPONSEPAGEPATH() Determine if RESPONSEPAGEPATH has a value

errorCachingMinTTL

The minimum time, in seconds, that the distribution caches the custom error response before requesting the object again from the origin. If you don't specify a value, the default is 10 seconds.

Accessible with the following methods

Method Description
GET_ERRORCACHINGMINTTL() Getter for ERRORCACHINGMINTTL, with configurable default
ASK_ERRORCACHINGMINTTL() Getter for ERRORCACHINGMINTTL w/ exceptions if field has no
HAS_ERRORCACHINGMINTTL() Determine if ERRORCACHINGMINTTL has a value

Public Local Types In This Class

Internal table types, representing arrays and maps of this class, are defined as local types:

TT_DISTRIBCUSRORRESPONSELIST

TYPES TT_DISTRIBCUSRORRESPONSELIST TYPE STANDARD TABLE OF REF TO /AWS1/CL_LSADISTRIBCUSRORRSP WITH DEFAULT KEY
.