@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-11T17:58:48.801Z") @Stability(value=Stable) 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.services.cloudfront.*;
import software.amazon.awscdk.core.*;
ErrorResponse errorResponse = ErrorResponse.builder()
.httpStatus(123)
// the properties below are optional
.responseHttpStatus(123)
.responsePagePath("responsePagePath")
.ttl(Duration.minutes(30))
.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()
The HTTP status code for which you want to specify a custom error page and/or a caching duration.
|
default Number |
getResponseHttpStatus()
The HTTP status code that you want CloudFront to return to the viewer along with the custom error page.
|
default String |
getResponsePagePath()
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()
The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode.
|
@Stability(value=Stable) @NotNull Number getHttpStatus()
@Stability(value=Stable) @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=Stable) @Nullable default String getResponsePagePath()
Default: - the default CloudFront response is shown.
@Stability(value=Stable) @Nullable default Duration getTtl()
Default: - the default caching TTL behavior applies
@Stability(value=Stable) static ErrorResponse.Builder builder()
ErrorResponse.Builder of ErrorResponseCopyright © 2022. All rights reserved.