AWS SDK for C++  1.8.184
AWS SDK for C++
Public Member Functions | List of all members
Aws::CloudFront::Model::CustomErrorResponse Class Reference

#include <CustomErrorResponse.h>

Public Member Functions

 CustomErrorResponse ()
 
 CustomErrorResponse (const Aws::Utils::Xml::XmlNode &xmlNode)
 
CustomErrorResponseoperator= (const Aws::Utils::Xml::XmlNode &xmlNode)
 
void AddToNode (Aws::Utils::Xml::XmlNode &parentNode) const
 
int GetErrorCode () const
 
bool ErrorCodeHasBeenSet () const
 
void SetErrorCode (int value)
 
CustomErrorResponseWithErrorCode (int value)
 
const Aws::StringGetResponsePagePath () const
 
bool ResponsePagePathHasBeenSet () const
 
void SetResponsePagePath (const Aws::String &value)
 
void SetResponsePagePath (Aws::String &&value)
 
void SetResponsePagePath (const char *value)
 
CustomErrorResponseWithResponsePagePath (const Aws::String &value)
 
CustomErrorResponseWithResponsePagePath (Aws::String &&value)
 
CustomErrorResponseWithResponsePagePath (const char *value)
 
const Aws::StringGetResponseCode () const
 
bool ResponseCodeHasBeenSet () const
 
void SetResponseCode (const Aws::String &value)
 
void SetResponseCode (Aws::String &&value)
 
void SetResponseCode (const char *value)
 
CustomErrorResponseWithResponseCode (const Aws::String &value)
 
CustomErrorResponseWithResponseCode (Aws::String &&value)
 
CustomErrorResponseWithResponseCode (const char *value)
 
long long GetErrorCachingMinTTL () const
 
bool ErrorCachingMinTTLHasBeenSet () const
 
void SetErrorCachingMinTTL (long long value)
 
CustomErrorResponseWithErrorCachingMinTTL (long long value)
 

Detailed Description

A complex type that controls:

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

See Also:

AWS API Reference

Definition at line 37 of file CustomErrorResponse.h.

Constructor & Destructor Documentation

◆ CustomErrorResponse() [1/2]

Aws::CloudFront::Model::CustomErrorResponse::CustomErrorResponse ( )

◆ CustomErrorResponse() [2/2]

Aws::CloudFront::Model::CustomErrorResponse::CustomErrorResponse ( const Aws::Utils::Xml::XmlNode xmlNode)

Member Function Documentation

◆ AddToNode()

void Aws::CloudFront::Model::CustomErrorResponse::AddToNode ( Aws::Utils::Xml::XmlNode parentNode) const

◆ ErrorCachingMinTTLHasBeenSet()

bool Aws::CloudFront::Model::CustomErrorResponse::ErrorCachingMinTTLHasBeenSet ( ) const
inline

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode. When 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.

Definition at line 422 of file CustomErrorResponse.h.

◆ ErrorCodeHasBeenSet()

bool Aws::CloudFront::Model::CustomErrorResponse::ErrorCodeHasBeenSet ( ) const
inline

The HTTP status code for which you want to specify a custom error page and/or a caching duration.

Definition at line 57 of file CustomErrorResponse.h.

◆ GetErrorCachingMinTTL()

long long Aws::CloudFront::Model::CustomErrorResponse::GetErrorCachingMinTTL ( ) const
inline

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode. When 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.

Definition at line 411 of file CustomErrorResponse.h.

◆ GetErrorCode()

int Aws::CloudFront::Model::CustomErrorResponse::GetErrorCode ( ) const
inline

The HTTP status code for which you want to specify a custom error page and/or a caching duration.

Definition at line 51 of file CustomErrorResponse.h.

◆ GetResponseCode()

const Aws::String& Aws::CloudFront::Model::CustomErrorResponse::GetResponseCode ( ) const
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 273 of file CustomErrorResponse.h.

◆ GetResponsePagePath()

const Aws::String& Aws::CloudFront::Model::CustomErrorResponse::GetResponsePagePath ( ) const
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 93 of file CustomErrorResponse.h.

◆ operator=()

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::operator= ( const Aws::Utils::Xml::XmlNode xmlNode)

◆ ResponseCodeHasBeenSet()

bool Aws::CloudFront::Model::CustomErrorResponse::ResponseCodeHasBeenSet ( ) const
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 291 of file CustomErrorResponse.h.

◆ ResponsePagePathHasBeenSet()

bool Aws::CloudFront::Model::CustomErrorResponse::ResponsePagePathHasBeenSet ( ) const
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 116 of file CustomErrorResponse.h.

◆ SetErrorCachingMinTTL()

void Aws::CloudFront::Model::CustomErrorResponse::SetErrorCachingMinTTL ( long long  value)
inline

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode. When 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.

Definition at line 433 of file CustomErrorResponse.h.

◆ SetErrorCode()

void Aws::CloudFront::Model::CustomErrorResponse::SetErrorCode ( int  value)
inline

The HTTP status code for which you want to specify a custom error page and/or a caching duration.

Definition at line 63 of file CustomErrorResponse.h.

◆ SetResponseCode() [1/3]

void Aws::CloudFront::Model::CustomErrorResponse::SetResponseCode ( Aws::String &&  value)
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 327 of file CustomErrorResponse.h.

◆ SetResponseCode() [2/3]

void Aws::CloudFront::Model::CustomErrorResponse::SetResponseCode ( const Aws::String value)
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 309 of file CustomErrorResponse.h.

◆ SetResponseCode() [3/3]

void Aws::CloudFront::Model::CustomErrorResponse::SetResponseCode ( const char *  value)
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 345 of file CustomErrorResponse.h.

◆ SetResponsePagePath() [1/3]

void Aws::CloudFront::Model::CustomErrorResponse::SetResponsePagePath ( Aws::String &&  value)
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 162 of file CustomErrorResponse.h.

◆ SetResponsePagePath() [2/3]

void Aws::CloudFront::Model::CustomErrorResponse::SetResponsePagePath ( const Aws::String value)
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 139 of file CustomErrorResponse.h.

◆ SetResponsePagePath() [3/3]

void Aws::CloudFront::Model::CustomErrorResponse::SetResponsePagePath ( const char *  value)
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 185 of file CustomErrorResponse.h.

◆ WithErrorCachingMinTTL()

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithErrorCachingMinTTL ( long long  value)
inline

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode. When 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.

Definition at line 444 of file CustomErrorResponse.h.

◆ WithErrorCode()

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithErrorCode ( int  value)
inline

The HTTP status code for which you want to specify a custom error page and/or a caching duration.

Definition at line 69 of file CustomErrorResponse.h.

◆ WithResponseCode() [1/3]

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithResponseCode ( Aws::String &&  value)
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 381 of file CustomErrorResponse.h.

◆ WithResponseCode() [2/3]

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithResponseCode ( const Aws::String value)
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 363 of file CustomErrorResponse.h.

◆ WithResponseCode() [3/3]

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithResponseCode ( const char *  value)
inline

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There 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:

  • Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.

  • If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.

  • You might want to return a 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.

Definition at line 399 of file CustomErrorResponse.h.

◆ WithResponsePagePath() [1/3]

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithResponsePagePath ( Aws::String &&  value)
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 231 of file CustomErrorResponse.h.

◆ WithResponsePagePath() [2/3]

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithResponsePagePath ( const Aws::String value)
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 208 of file CustomErrorResponse.h.

◆ WithResponsePagePath() [3/3]

CustomErrorResponse& Aws::CloudFront::Model::CustomErrorResponse::WithResponsePagePath ( const char *  value)
inline

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. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

  • The value of 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/ *.

  • The value of 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.

Definition at line 254 of file CustomErrorResponse.h.


The documentation for this class was generated from the following file: