Interface DistributionCustomErrorResponse.Builder

  • Method Details

    • errorCode

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

      Parameters:
      errorCode - The HTTP error code from the origin that triggers the custom error response (for example, 403 or 404).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • responseCode

      DistributionCustomErrorResponse.Builder responseCode(String responseCode)

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

      Parameters:
      responseCode - The HTTP status code that the distribution returns to the viewer for the custom error response.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • responsePagePath

      DistributionCustomErrorResponse.Builder responsePagePath(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • errorCachingMinTTL

      DistributionCustomErrorResponse.Builder errorCachingMinTTL(Long 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.