@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:43.931Z") @Stability(value=Experimental) public interface ErrorResponse extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.services.cloudfront.*;
Duration duration;
ErrorResponse errorResponse = ErrorResponse.builder()
.httpStatus(123)
// the properties below are optional
.responseHttpStatus(123)
.responsePagePath("responsePagePath")
.ttl(duration)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
ErrorResponse.Builder
A builder for
ErrorResponse |
static class |
ErrorResponse.Jsii$Proxy
An implementation for
ErrorResponse |
| Modifier and Type | Method and Description |
|---|---|
static ErrorResponse.Builder |
builder() |
Number |
getHttpStatus()
(experimental) The HTTP status code for which you want to specify a custom error page and/or a caching duration.
|
default Number |
getResponseHttpStatus()
(experimental) The HTTP status code that you want CloudFront to return to the viewer along with the custom error page.
|
default String |
getResponsePagePath()
(experimental) The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the `httpStatus`, for example, /4xx-errors/403-forbidden.html.
|
default Duration |
getTtl()
(experimental) The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode.
|
@Stability(value=Experimental) @NotNull Number getHttpStatus()
@Stability(value=Experimental) @Nullable default Number getResponseHttpStatus()
If you specify a value for responseHttpStatus, you must also specify a value for responsePagePath.
Default: - the error code will be returned as the response code.
@Stability(value=Experimental) @Nullable default String getResponsePagePath()
Default: - the default CloudFront response is shown.
@Stability(value=Experimental) @Nullable default Duration getTtl()
Default: - the default caching TTL behavior applies
@Stability(value=Experimental) static ErrorResponse.Builder builder()
ErrorResponse.Builder of ErrorResponseCopyright © 2022. All rights reserved.