@Stability(value=Stable) @Internal public static final class CfnDistribution.CustomErrorResponseProperty.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnDistribution.CustomErrorResponseProperty
CfnDistribution.CustomErrorResponsePropertysoftware.amazon.jsii.JsiiObject.InitializationModeCfnDistribution.CustomErrorResponseProperty.Builder, CfnDistribution.CustomErrorResponseProperty.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
Jsii$Proxy(CfnDistribution.CustomErrorResponseProperty.Builder builder)
Constructor that initializes the object based on literal property values passed by the
CfnDistribution.CacheBehaviorProperty.Builder. |
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
Number |
getErrorCachingMinTtl()
The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in `ErrorCode` .
|
Number |
getErrorCode()
The HTTP status code for which you want to specify a custom error page and/or a caching duration.
|
Number |
getResponseCode()
The HTTP status code that you want CloudFront to return to the viewer along with the custom error page.
|
String |
getResponsePagePath()
The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the HTTP status code specified by `ErrorCode` , for example, `/4xx-errors/403-forbidden.html` .
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbuilderprotected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef - Reference to the JSII managed object.protected Jsii$Proxy(CfnDistribution.CustomErrorResponseProperty.Builder builder)
CfnDistribution.CacheBehaviorProperty.Builder.public final Number getErrorCode()
CfnDistribution.CustomErrorResponsePropertygetErrorCode in interface CfnDistribution.CustomErrorResponsePropertypublic final Number getErrorCachingMinTtl()
CfnDistribution.CustomErrorResponsePropertyWhen this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available.
For more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide .
getErrorCachingMinTtl in interface CfnDistribution.CustomErrorResponsePropertypublic final Number getResponseCode()
CfnDistribution.CustomErrorResponsePropertyThere are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:
200 , the response typically won't be intercepted.400 or 500 as the ResponseCode for all 4xx or 5xx errors.200 status code (OK) and static website so your customers don't know that your website is down.
If you specify a value for ResponseCode , you must also specify a value for ResponsePagePath .
getResponseCode in interface CfnDistribution.CustomErrorResponsePropertypublic final String getResponsePagePath()
CfnDistribution.CustomErrorResponseProperty
PathPattern matches the path to your custom error messages. For example, suppose you saved custom error pages for 4xx errors in an Amazon S3 bucket in a directory named /4xx-errors . Your distribution must include a cache behavior for which the path pattern routes requests for your custom error pages to that location, for example, /4xx-errors/* .TargetOriginId specifies the value of the ID element for the origin that contains your custom error pages.
If you specify a value for ResponsePagePath , you must also specify a value for ResponseCode .
We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable.
getResponsePagePath in interface CfnDistribution.CustomErrorResponseProperty@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson in interface software.amazon.jsii.JsiiSerializableCopyright © 2022. All rights reserved.