Class: Aws::CloudFront::Types::CustomErrorResponses

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-cloudfront/types.rb

Overview

Note:

When making an API call, you may pass CustomErrorResponses data as a hash:

{
  quantity: 1, # required
  items: [
    {
      error_code: 1, # required
      response_page_path: "string",
      response_code: "string",
      error_caching_min_ttl: 1,
    },
  ],
}

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*.

[1]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html

Instance Attribute Summary collapse

Instance Attribute Details

#itemsArray<Types::CustomErrorResponse>

A complex type that contains a ‘CustomErrorResponse` element for each HTTP status code for which you want to specify a custom error page and/or a caching duration.

Returns:



2038
2039
2040
2041
2042
# File 'lib/aws-sdk-cloudfront/types.rb', line 2038

class CustomErrorResponses < Struct.new(
  :quantity,
  :items)
  include Aws::Structure
end

#quantityInteger

The number of HTTP status codes for which you want to specify a custom error page and/or a caching duration. If ‘Quantity` is `0`, you can omit `Items`.

Returns:

  • (Integer)


2038
2039
2040
2041
2042
# File 'lib/aws-sdk-cloudfront/types.rb', line 2038

class CustomErrorResponses < Struct.new(
  :quantity,
  :items)
  include Aws::Structure
end