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

#include <CacheBehavior.h>

Public Member Functions

 CacheBehavior ()
 
 CacheBehavior (const Aws::Utils::Xml::XmlNode &xmlNode)
 
CacheBehavioroperator= (const Aws::Utils::Xml::XmlNode &xmlNode)
 
void AddToNode (Aws::Utils::Xml::XmlNode &parentNode) const
 
const Aws::StringGetPathPattern () const
 
bool PathPatternHasBeenSet () const
 
void SetPathPattern (const Aws::String &value)
 
void SetPathPattern (Aws::String &&value)
 
void SetPathPattern (const char *value)
 
CacheBehaviorWithPathPattern (const Aws::String &value)
 
CacheBehaviorWithPathPattern (Aws::String &&value)
 
CacheBehaviorWithPathPattern (const char *value)
 
const Aws::StringGetTargetOriginId () const
 
bool TargetOriginIdHasBeenSet () const
 
void SetTargetOriginId (const Aws::String &value)
 
void SetTargetOriginId (Aws::String &&value)
 
void SetTargetOriginId (const char *value)
 
CacheBehaviorWithTargetOriginId (const Aws::String &value)
 
CacheBehaviorWithTargetOriginId (Aws::String &&value)
 
CacheBehaviorWithTargetOriginId (const char *value)
 
const TrustedSignersGetTrustedSigners () const
 
bool TrustedSignersHasBeenSet () const
 
void SetTrustedSigners (const TrustedSigners &value)
 
void SetTrustedSigners (TrustedSigners &&value)
 
CacheBehaviorWithTrustedSigners (const TrustedSigners &value)
 
CacheBehaviorWithTrustedSigners (TrustedSigners &&value)
 
const TrustedKeyGroupsGetTrustedKeyGroups () const
 
bool TrustedKeyGroupsHasBeenSet () const
 
void SetTrustedKeyGroups (const TrustedKeyGroups &value)
 
void SetTrustedKeyGroups (TrustedKeyGroups &&value)
 
CacheBehaviorWithTrustedKeyGroups (const TrustedKeyGroups &value)
 
CacheBehaviorWithTrustedKeyGroups (TrustedKeyGroups &&value)
 
const ViewerProtocolPolicyGetViewerProtocolPolicy () const
 
bool ViewerProtocolPolicyHasBeenSet () const
 
void SetViewerProtocolPolicy (const ViewerProtocolPolicy &value)
 
void SetViewerProtocolPolicy (ViewerProtocolPolicy &&value)
 
CacheBehaviorWithViewerProtocolPolicy (const ViewerProtocolPolicy &value)
 
CacheBehaviorWithViewerProtocolPolicy (ViewerProtocolPolicy &&value)
 
const AllowedMethodsGetAllowedMethods () const
 
bool AllowedMethodsHasBeenSet () const
 
void SetAllowedMethods (const AllowedMethods &value)
 
void SetAllowedMethods (AllowedMethods &&value)
 
CacheBehaviorWithAllowedMethods (const AllowedMethods &value)
 
CacheBehaviorWithAllowedMethods (AllowedMethods &&value)
 
bool GetSmoothStreaming () const
 
bool SmoothStreamingHasBeenSet () const
 
void SetSmoothStreaming (bool value)
 
CacheBehaviorWithSmoothStreaming (bool value)
 
bool GetCompress () const
 
bool CompressHasBeenSet () const
 
void SetCompress (bool value)
 
CacheBehaviorWithCompress (bool value)
 
const LambdaFunctionAssociationsGetLambdaFunctionAssociations () const
 
bool LambdaFunctionAssociationsHasBeenSet () const
 
void SetLambdaFunctionAssociations (const LambdaFunctionAssociations &value)
 
void SetLambdaFunctionAssociations (LambdaFunctionAssociations &&value)
 
CacheBehaviorWithLambdaFunctionAssociations (const LambdaFunctionAssociations &value)
 
CacheBehaviorWithLambdaFunctionAssociations (LambdaFunctionAssociations &&value)
 
const Aws::StringGetFieldLevelEncryptionId () const
 
bool FieldLevelEncryptionIdHasBeenSet () const
 
void SetFieldLevelEncryptionId (const Aws::String &value)
 
void SetFieldLevelEncryptionId (Aws::String &&value)
 
void SetFieldLevelEncryptionId (const char *value)
 
CacheBehaviorWithFieldLevelEncryptionId (const Aws::String &value)
 
CacheBehaviorWithFieldLevelEncryptionId (Aws::String &&value)
 
CacheBehaviorWithFieldLevelEncryptionId (const char *value)
 
const Aws::StringGetRealtimeLogConfigArn () const
 
bool RealtimeLogConfigArnHasBeenSet () const
 
void SetRealtimeLogConfigArn (const Aws::String &value)
 
void SetRealtimeLogConfigArn (Aws::String &&value)
 
void SetRealtimeLogConfigArn (const char *value)
 
CacheBehaviorWithRealtimeLogConfigArn (const Aws::String &value)
 
CacheBehaviorWithRealtimeLogConfigArn (Aws::String &&value)
 
CacheBehaviorWithRealtimeLogConfigArn (const char *value)
 
const Aws::StringGetCachePolicyId () const
 
bool CachePolicyIdHasBeenSet () const
 
void SetCachePolicyId (const Aws::String &value)
 
void SetCachePolicyId (Aws::String &&value)
 
void SetCachePolicyId (const char *value)
 
CacheBehaviorWithCachePolicyId (const Aws::String &value)
 
CacheBehaviorWithCachePolicyId (Aws::String &&value)
 
CacheBehaviorWithCachePolicyId (const char *value)
 
const Aws::StringGetOriginRequestPolicyId () const
 
bool OriginRequestPolicyIdHasBeenSet () const
 
void SetOriginRequestPolicyId (const Aws::String &value)
 
void SetOriginRequestPolicyId (Aws::String &&value)
 
void SetOriginRequestPolicyId (const char *value)
 
CacheBehaviorWithOriginRequestPolicyId (const Aws::String &value)
 
CacheBehaviorWithOriginRequestPolicyId (Aws::String &&value)
 
CacheBehaviorWithOriginRequestPolicyId (const char *value)
 

Detailed Description

A complex type that describes how CloudFront processes requests.

You must create at least as many cache behaviors (including the default cache behavior) as you have origins if you want CloudFront to serve objects from all of the origins. Each cache behavior specifies the one origin from which you want CloudFront to get objects. If you have two origins and only the default cache behavior, the default cache behavior will cause CloudFront to get objects from one of the origins, but the other origin is never used.

For the current quota (formerly known as limit) on the number of cache behaviors that you can add to a distribution, see Quotas in the Amazon CloudFront Developer Guide.

If you don’t want to specify any cache behaviors, include only an empty CacheBehaviors element. Don’t include an empty CacheBehavior element because this is invalid.

To delete all cache behaviors in an existing distribution, update the distribution configuration and include only an empty CacheBehaviors element.

To add, change, or remove one or more cache behaviors, update the distribution configuration and specify all of the cache behaviors that you want to include in the updated distribution.

For more information about cache behaviors, see Cache Behavior Settings in the Amazon CloudFront Developer Guide.

See Also:

AWS API Reference

Definition at line 56 of file CacheBehavior.h.

Constructor & Destructor Documentation

◆ CacheBehavior() [1/2]

Aws::CloudFront::Model::CacheBehavior::CacheBehavior ( )

◆ CacheBehavior() [2/2]

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

Member Function Documentation

◆ AddToNode()

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

◆ AllowedMethodsHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::AllowedMethodsHasBeenSet ( ) const
inline

Definition at line 583 of file CacheBehavior.h.

◆ CachePolicyIdHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::CachePolicyIdHasBeenSet ( ) const
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 855 of file CacheBehavior.h.

◆ CompressHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::CompressHasBeenSet ( ) const
inline

Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see Serving Compressed Files in the Amazon CloudFront Developer Guide.

Definition at line 655 of file CacheBehavior.h.

◆ FieldLevelEncryptionIdHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::FieldLevelEncryptionIdHasBeenSet ( ) const
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 725 of file CacheBehavior.h.

◆ GetAllowedMethods()

const AllowedMethods& Aws::CloudFront::Model::CacheBehavior::GetAllowedMethods ( ) const
inline

Definition at line 580 of file CacheBehavior.h.

◆ GetCachePolicyId()

const Aws::String& Aws::CloudFront::Model::CacheBehavior::GetCachePolicyId ( ) const
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 844 of file CacheBehavior.h.

◆ GetCompress()

bool Aws::CloudFront::Model::CacheBehavior::GetCompress ( ) const
inline

Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see Serving Compressed Files in the Amazon CloudFront Developer Guide.

Definition at line 646 of file CacheBehavior.h.

◆ GetFieldLevelEncryptionId()

const Aws::String& Aws::CloudFront::Model::CacheBehavior::GetFieldLevelEncryptionId ( ) const
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 718 of file CacheBehavior.h.

◆ GetLambdaFunctionAssociations()

const LambdaFunctionAssociations& Aws::CloudFront::Model::CacheBehavior::GetLambdaFunctionAssociations ( ) const
inline

A complex type that contains zero or more Lambda function associations for a cache behavior.

Definition at line 680 of file CacheBehavior.h.

◆ GetOriginRequestPolicyId()

const Aws::String& Aws::CloudFront::Model::CacheBehavior::GetOriginRequestPolicyId ( ) const
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 933 of file CacheBehavior.h.

◆ GetPathPattern()

const Aws::String& Aws::CloudFront::Model::CacheBehavior::GetPathPattern ( ) const
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 81 of file CacheBehavior.h.

◆ GetRealtimeLogConfigArn()

const Aws::String& Aws::CloudFront::Model::CacheBehavior::GetRealtimeLogConfigArn ( ) const
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 776 of file CacheBehavior.h.

◆ GetSmoothStreaming()

bool Aws::CloudFront::Model::CacheBehavior::GetSmoothStreaming ( ) const
inline

Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify true; if not, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern.

Definition at line 606 of file CacheBehavior.h.

◆ GetTargetOriginId()

const Aws::String& Aws::CloudFront::Model::CacheBehavior::GetTargetOriginId ( ) const
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 207 of file CacheBehavior.h.

◆ GetTrustedKeyGroups()

const TrustedKeyGroups& Aws::CloudFront::Model::CacheBehavior::GetTrustedKeyGroups ( ) const
inline

A list of key groups that CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 354 of file CacheBehavior.h.

◆ GetTrustedSigners()

const TrustedSigners& Aws::CloudFront::Model::CacheBehavior::GetTrustedSigners ( ) const
inline

We recommend using TrustedKeyGroups instead of TrustedSigners.

A list of AWS account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer’s AWS account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 265 of file CacheBehavior.h.

◆ GetViewerProtocolPolicy()

const ViewerProtocolPolicy& Aws::CloudFront::Model::CacheBehavior::GetViewerProtocolPolicy ( ) const
inline

The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options:

  • allow-all: Viewers can use HTTP or HTTPS.

  • redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL.

  • https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Managing Cache Expiration in the Amazon CloudFront Developer Guide.

Definition at line 446 of file CacheBehavior.h.

◆ LambdaFunctionAssociationsHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::LambdaFunctionAssociationsHasBeenSet ( ) const
inline

A complex type that contains zero or more Lambda function associations for a cache behavior.

Definition at line 686 of file CacheBehavior.h.

◆ operator=()

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

◆ OriginRequestPolicyIdHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::OriginRequestPolicyIdHasBeenSet ( ) const
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 944 of file CacheBehavior.h.

◆ PathPatternHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::PathPatternHasBeenSet ( ) const
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 98 of file CacheBehavior.h.

◆ RealtimeLogConfigArnHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::RealtimeLogConfigArnHasBeenSet ( ) const
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 784 of file CacheBehavior.h.

◆ SetAllowedMethods() [1/2]

void Aws::CloudFront::Model::CacheBehavior::SetAllowedMethods ( AllowedMethods &&  value)
inline

Definition at line 589 of file CacheBehavior.h.

◆ SetAllowedMethods() [2/2]

void Aws::CloudFront::Model::CacheBehavior::SetAllowedMethods ( const AllowedMethods value)
inline

Definition at line 586 of file CacheBehavior.h.

◆ SetCachePolicyId() [1/3]

void Aws::CloudFront::Model::CacheBehavior::SetCachePolicyId ( Aws::String &&  value)
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 877 of file CacheBehavior.h.

◆ SetCachePolicyId() [2/3]

void Aws::CloudFront::Model::CacheBehavior::SetCachePolicyId ( const Aws::String value)
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 866 of file CacheBehavior.h.

◆ SetCachePolicyId() [3/3]

void Aws::CloudFront::Model::CacheBehavior::SetCachePolicyId ( const char *  value)
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 888 of file CacheBehavior.h.

◆ SetCompress()

void Aws::CloudFront::Model::CacheBehavior::SetCompress ( bool  value)
inline

Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see Serving Compressed Files in the Amazon CloudFront Developer Guide.

Definition at line 664 of file CacheBehavior.h.

◆ SetFieldLevelEncryptionId() [1/3]

void Aws::CloudFront::Model::CacheBehavior::SetFieldLevelEncryptionId ( Aws::String &&  value)
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 739 of file CacheBehavior.h.

◆ SetFieldLevelEncryptionId() [2/3]

void Aws::CloudFront::Model::CacheBehavior::SetFieldLevelEncryptionId ( const Aws::String value)
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 732 of file CacheBehavior.h.

◆ SetFieldLevelEncryptionId() [3/3]

void Aws::CloudFront::Model::CacheBehavior::SetFieldLevelEncryptionId ( const char *  value)
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 746 of file CacheBehavior.h.

◆ SetLambdaFunctionAssociations() [1/2]

void Aws::CloudFront::Model::CacheBehavior::SetLambdaFunctionAssociations ( const LambdaFunctionAssociations value)
inline

A complex type that contains zero or more Lambda function associations for a cache behavior.

Definition at line 692 of file CacheBehavior.h.

◆ SetLambdaFunctionAssociations() [2/2]

void Aws::CloudFront::Model::CacheBehavior::SetLambdaFunctionAssociations ( LambdaFunctionAssociations &&  value)
inline

A complex type that contains zero or more Lambda function associations for a cache behavior.

Definition at line 698 of file CacheBehavior.h.

◆ SetOriginRequestPolicyId() [1/3]

void Aws::CloudFront::Model::CacheBehavior::SetOriginRequestPolicyId ( Aws::String &&  value)
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 966 of file CacheBehavior.h.

◆ SetOriginRequestPolicyId() [2/3]

void Aws::CloudFront::Model::CacheBehavior::SetOriginRequestPolicyId ( const Aws::String value)
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 955 of file CacheBehavior.h.

◆ SetOriginRequestPolicyId() [3/3]

void Aws::CloudFront::Model::CacheBehavior::SetOriginRequestPolicyId ( const char *  value)
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 977 of file CacheBehavior.h.

◆ SetPathPattern() [1/3]

void Aws::CloudFront::Model::CacheBehavior::SetPathPattern ( Aws::String &&  value)
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 132 of file CacheBehavior.h.

◆ SetPathPattern() [2/3]

void Aws::CloudFront::Model::CacheBehavior::SetPathPattern ( const Aws::String value)
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 115 of file CacheBehavior.h.

◆ SetPathPattern() [3/3]

void Aws::CloudFront::Model::CacheBehavior::SetPathPattern ( const char *  value)
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 149 of file CacheBehavior.h.

◆ SetRealtimeLogConfigArn() [1/3]

void Aws::CloudFront::Model::CacheBehavior::SetRealtimeLogConfigArn ( Aws::String &&  value)
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 800 of file CacheBehavior.h.

◆ SetRealtimeLogConfigArn() [2/3]

void Aws::CloudFront::Model::CacheBehavior::SetRealtimeLogConfigArn ( const Aws::String value)
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 792 of file CacheBehavior.h.

◆ SetRealtimeLogConfigArn() [3/3]

void Aws::CloudFront::Model::CacheBehavior::SetRealtimeLogConfigArn ( const char *  value)
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 808 of file CacheBehavior.h.

◆ SetSmoothStreaming()

void Aws::CloudFront::Model::CacheBehavior::SetSmoothStreaming ( bool  value)
inline

Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify true; if not, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern.

Definition at line 626 of file CacheBehavior.h.

◆ SetTargetOriginId() [1/3]

void Aws::CloudFront::Model::CacheBehavior::SetTargetOriginId ( Aws::String &&  value)
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 225 of file CacheBehavior.h.

◆ SetTargetOriginId() [2/3]

void Aws::CloudFront::Model::CacheBehavior::SetTargetOriginId ( const Aws::String value)
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 219 of file CacheBehavior.h.

◆ SetTargetOriginId() [3/3]

void Aws::CloudFront::Model::CacheBehavior::SetTargetOriginId ( const char *  value)
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 231 of file CacheBehavior.h.

◆ SetTrustedKeyGroups() [1/2]

void Aws::CloudFront::Model::CacheBehavior::SetTrustedKeyGroups ( const TrustedKeyGroups value)
inline

A list of key groups that CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 380 of file CacheBehavior.h.

◆ SetTrustedKeyGroups() [2/2]

void Aws::CloudFront::Model::CacheBehavior::SetTrustedKeyGroups ( TrustedKeyGroups &&  value)
inline

A list of key groups that CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 393 of file CacheBehavior.h.

◆ SetTrustedSigners() [1/2]

void Aws::CloudFront::Model::CacheBehavior::SetTrustedSigners ( const TrustedSigners value)
inline

We recommend using TrustedKeyGroups instead of TrustedSigners.

A list of AWS account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer’s AWS account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 295 of file CacheBehavior.h.

◆ SetTrustedSigners() [2/2]

void Aws::CloudFront::Model::CacheBehavior::SetTrustedSigners ( TrustedSigners &&  value)
inline

We recommend using TrustedKeyGroups instead of TrustedSigners.

A list of AWS account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer’s AWS account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 310 of file CacheBehavior.h.

◆ SetViewerProtocolPolicy() [1/2]

void Aws::CloudFront::Model::CacheBehavior::SetViewerProtocolPolicy ( const ViewerProtocolPolicy value)
inline

The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options:

  • allow-all: Viewers can use HTTP or HTTPS.

  • redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL.

  • https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Managing Cache Expiration in the Amazon CloudFront Developer Guide.

Definition at line 498 of file CacheBehavior.h.

◆ SetViewerProtocolPolicy() [2/2]

void Aws::CloudFront::Model::CacheBehavior::SetViewerProtocolPolicy ( ViewerProtocolPolicy &&  value)
inline

The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options:

  • allow-all: Viewers can use HTTP or HTTPS.

  • redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL.

  • https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Managing Cache Expiration in the Amazon CloudFront Developer Guide.

Definition at line 524 of file CacheBehavior.h.

◆ SmoothStreamingHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::SmoothStreamingHasBeenSet ( ) const
inline

Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify true; if not, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern.

Definition at line 616 of file CacheBehavior.h.

◆ TargetOriginIdHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::TargetOriginIdHasBeenSet ( ) const
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 213 of file CacheBehavior.h.

◆ TrustedKeyGroupsHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::TrustedKeyGroupsHasBeenSet ( ) const
inline

A list of key groups that CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 367 of file CacheBehavior.h.

◆ TrustedSignersHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::TrustedSignersHasBeenSet ( ) const
inline

We recommend using TrustedKeyGroups instead of TrustedSigners.

A list of AWS account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer’s AWS account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 280 of file CacheBehavior.h.

◆ ViewerProtocolPolicyHasBeenSet()

bool Aws::CloudFront::Model::CacheBehavior::ViewerProtocolPolicyHasBeenSet ( ) const
inline

The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options:

  • allow-all: Viewers can use HTTP or HTTPS.

  • redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL.

  • https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Managing Cache Expiration in the Amazon CloudFront Developer Guide.

Definition at line 472 of file CacheBehavior.h.

◆ WithAllowedMethods() [1/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithAllowedMethods ( AllowedMethods &&  value)
inline

Definition at line 595 of file CacheBehavior.h.

◆ WithAllowedMethods() [2/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithAllowedMethods ( const AllowedMethods value)
inline

Definition at line 592 of file CacheBehavior.h.

◆ WithCachePolicyId() [1/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithCachePolicyId ( Aws::String &&  value)
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 910 of file CacheBehavior.h.

◆ WithCachePolicyId() [2/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithCachePolicyId ( const Aws::String value)
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 899 of file CacheBehavior.h.

◆ WithCachePolicyId() [3/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithCachePolicyId ( const char *  value)
inline

The unique identifier of the cache policy that is attached to this cache behavior. For more information, see Creating cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

Definition at line 921 of file CacheBehavior.h.

◆ WithCompress()

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithCompress ( bool  value)
inline

Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see Serving Compressed Files in the Amazon CloudFront Developer Guide.

Definition at line 673 of file CacheBehavior.h.

◆ WithFieldLevelEncryptionId() [1/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithFieldLevelEncryptionId ( Aws::String &&  value)
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 760 of file CacheBehavior.h.

◆ WithFieldLevelEncryptionId() [2/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithFieldLevelEncryptionId ( const Aws::String value)
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 753 of file CacheBehavior.h.

◆ WithFieldLevelEncryptionId() [3/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithFieldLevelEncryptionId ( const char *  value)
inline

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior.

Definition at line 767 of file CacheBehavior.h.

◆ WithLambdaFunctionAssociations() [1/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithLambdaFunctionAssociations ( const LambdaFunctionAssociations value)
inline

A complex type that contains zero or more Lambda function associations for a cache behavior.

Definition at line 704 of file CacheBehavior.h.

◆ WithLambdaFunctionAssociations() [2/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithLambdaFunctionAssociations ( LambdaFunctionAssociations &&  value)
inline

A complex type that contains zero or more Lambda function associations for a cache behavior.

Definition at line 710 of file CacheBehavior.h.

◆ WithOriginRequestPolicyId() [1/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithOriginRequestPolicyId ( Aws::String &&  value)
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 999 of file CacheBehavior.h.

◆ WithOriginRequestPolicyId() [2/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithOriginRequestPolicyId ( const Aws::String value)
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 988 of file CacheBehavior.h.

◆ WithOriginRequestPolicyId() [3/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithOriginRequestPolicyId ( const char *  value)
inline

The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see Creating origin request policies or Using the managed origin request policies in the Amazon CloudFront Developer Guide.

Definition at line 1010 of file CacheBehavior.h.

◆ WithPathPattern() [1/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithPathPattern ( Aws::String &&  value)
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 183 of file CacheBehavior.h.

◆ WithPathPattern() [2/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithPathPattern ( const Aws::String value)
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 166 of file CacheBehavior.h.

◆ WithPathPattern() [3/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithPathPattern ( const char *  value)
inline

The pattern (for example, images/ *.jpg) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.

You can optionally include a slash (/) at the beginning of the path pattern. For example, /images/ *.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Definition at line 200 of file CacheBehavior.h.

◆ WithRealtimeLogConfigArn() [1/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithRealtimeLogConfigArn ( Aws::String &&  value)
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 824 of file CacheBehavior.h.

◆ WithRealtimeLogConfigArn() [2/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithRealtimeLogConfigArn ( const Aws::String value)
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 816 of file CacheBehavior.h.

◆ WithRealtimeLogConfigArn() [3/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithRealtimeLogConfigArn ( const char *  value)
inline

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Definition at line 832 of file CacheBehavior.h.

◆ WithSmoothStreaming()

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithSmoothStreaming ( bool  value)
inline

Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify true; if not, specify false. If you specify true for SmoothStreaming, you can still distribute other content using this cache behavior if the content matches the value of PathPattern.

Definition at line 636 of file CacheBehavior.h.

◆ WithTargetOriginId() [1/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTargetOriginId ( Aws::String &&  value)
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 243 of file CacheBehavior.h.

◆ WithTargetOriginId() [2/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTargetOriginId ( const Aws::String value)
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 237 of file CacheBehavior.h.

◆ WithTargetOriginId() [3/3]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTargetOriginId ( const char *  value)
inline

The value of ID for the origin that you want CloudFront to route requests to when they match this cache behavior.

Definition at line 249 of file CacheBehavior.h.

◆ WithTrustedKeyGroups() [1/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTrustedKeyGroups ( const TrustedKeyGroups value)
inline

A list of key groups that CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 406 of file CacheBehavior.h.

◆ WithTrustedKeyGroups() [2/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTrustedKeyGroups ( TrustedKeyGroups &&  value)
inline

A list of key groups that CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 419 of file CacheBehavior.h.

◆ WithTrustedSigners() [1/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTrustedSigners ( const TrustedSigners value)
inline

We recommend using TrustedKeyGroups instead of TrustedSigners.

A list of AWS account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer’s AWS account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 325 of file CacheBehavior.h.

◆ WithTrustedSigners() [2/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithTrustedSigners ( TrustedSigners &&  value)
inline

We recommend using TrustedKeyGroups instead of TrustedSigners.

A list of AWS account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies.

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer’s AWS account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

Definition at line 340 of file CacheBehavior.h.

◆ WithViewerProtocolPolicy() [1/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithViewerProtocolPolicy ( const ViewerProtocolPolicy value)
inline

The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options:

  • allow-all: Viewers can use HTTP or HTTPS.

  • redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL.

  • https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Managing Cache Expiration in the Amazon CloudFront Developer Guide.

Definition at line 550 of file CacheBehavior.h.

◆ WithViewerProtocolPolicy() [2/2]

CacheBehavior& Aws::CloudFront::Model::CacheBehavior::WithViewerProtocolPolicy ( ViewerProtocolPolicy &&  value)
inline

The protocol that viewers can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. You can specify the following options:

  • allow-all: Viewers can use HTTP or HTTPS.

  • redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL.

  • https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see Managing Cache Expiration in the Amazon CloudFront Developer Guide.

Definition at line 576 of file CacheBehavior.h.


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