Interface CfnDistribution.CustomErrorResponseProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnDistribution.CustomErrorResponseProperty.Jsii$Proxy
Enclosing class:
CfnDistribution

@Stability(Stable) public static interface CfnDistribution.CustomErrorResponseProperty extends software.amazon.jsii.JsiiSerializable
A complex type that controls:.

  • Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.
  • How long CloudFront caches HTTP status codes in the 4xx and 5xx range.

For more information about custom error pages, see Customizing Error Responses in the Amazon CloudFront Developer Guide .

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.*;
 CustomErrorResponseProperty customErrorResponseProperty = CustomErrorResponseProperty.builder()
         .errorCode(123)
         // the properties below are optional
         .errorCachingMinTtl(123)
         .responseCode(123)
         .responsePagePath("responsePagePath")
         .build();
 

See Also: