/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudFront { namespace Model { /** *

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

*/ class CacheBehavior { public: AWS_CLOUDFRONT_API CacheBehavior(); AWS_CLOUDFRONT_API CacheBehavior(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API CacheBehavior& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

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.

*/ inline const Aws::String& GetPathPattern() const{ return m_pathPattern; } /** *

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.

*/ inline bool PathPatternHasBeenSet() const { return m_pathPatternHasBeenSet; } /** *

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.

*/ inline void SetPathPattern(const Aws::String& value) { m_pathPatternHasBeenSet = true; m_pathPattern = value; } /** *

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.

*/ inline void SetPathPattern(Aws::String&& value) { m_pathPatternHasBeenSet = true; m_pathPattern = std::move(value); } /** *

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.

*/ inline void SetPathPattern(const char* value) { m_pathPatternHasBeenSet = true; m_pathPattern.assign(value); } /** *

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.

*/ inline CacheBehavior& WithPathPattern(const Aws::String& value) { SetPathPattern(value); return *this;} /** *

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.

*/ inline CacheBehavior& WithPathPattern(Aws::String&& value) { SetPathPattern(std::move(value)); return *this;} /** *

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.

*/ inline CacheBehavior& WithPathPattern(const char* value) { SetPathPattern(value); return *this;} /** *

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

*/ inline const Aws::String& GetTargetOriginId() const{ return m_targetOriginId; } /** *

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

*/ inline bool TargetOriginIdHasBeenSet() const { return m_targetOriginIdHasBeenSet; } /** *

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

*/ inline void SetTargetOriginId(const Aws::String& value) { m_targetOriginIdHasBeenSet = true; m_targetOriginId = value; } /** *

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

*/ inline void SetTargetOriginId(Aws::String&& value) { m_targetOriginIdHasBeenSet = true; m_targetOriginId = std::move(value); } /** *

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

*/ inline void SetTargetOriginId(const char* value) { m_targetOriginIdHasBeenSet = true; m_targetOriginId.assign(value); } /** *

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

*/ inline CacheBehavior& WithTargetOriginId(const Aws::String& value) { SetTargetOriginId(value); return *this;} /** *

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

*/ inline CacheBehavior& WithTargetOriginId(Aws::String&& value) { SetTargetOriginId(std::move(value)); return *this;} /** *

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

*/ inline CacheBehavior& WithTargetOriginId(const char* value) { SetTargetOriginId(value); return *this;} /** *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

A list of Amazon Web Services * 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 Amazon Web Services 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.

*/ inline const TrustedSigners& GetTrustedSigners() const{ return m_trustedSigners; } /** *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

A list of Amazon Web Services * 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 Amazon Web Services 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.

*/ inline bool TrustedSignersHasBeenSet() const { return m_trustedSignersHasBeenSet; } /** *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

A list of Amazon Web Services * 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 Amazon Web Services 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.

*/ inline void SetTrustedSigners(const TrustedSigners& value) { m_trustedSignersHasBeenSet = true; m_trustedSigners = value; } /** *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

A list of Amazon Web Services * 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 Amazon Web Services 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.

*/ inline void SetTrustedSigners(TrustedSigners&& value) { m_trustedSignersHasBeenSet = true; m_trustedSigners = std::move(value); } /** *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

A list of Amazon Web Services * 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 Amazon Web Services 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.

*/ inline CacheBehavior& WithTrustedSigners(const TrustedSigners& value) { SetTrustedSigners(value); return *this;} /** *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

A list of Amazon Web Services * 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 Amazon Web Services 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.

*/ inline CacheBehavior& WithTrustedSigners(TrustedSigners&& value) { SetTrustedSigners(std::move(value)); return *this;} /** *

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.

*/ inline const TrustedKeyGroups& GetTrustedKeyGroups() const{ return m_trustedKeyGroups; } /** *

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.

*/ inline bool TrustedKeyGroupsHasBeenSet() const { return m_trustedKeyGroupsHasBeenSet; } /** *

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.

*/ inline void SetTrustedKeyGroups(const TrustedKeyGroups& value) { m_trustedKeyGroupsHasBeenSet = true; m_trustedKeyGroups = value; } /** *

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.

*/ inline void SetTrustedKeyGroups(TrustedKeyGroups&& value) { m_trustedKeyGroupsHasBeenSet = true; m_trustedKeyGroups = std::move(value); } /** *

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.

*/ inline CacheBehavior& WithTrustedKeyGroups(const TrustedKeyGroups& value) { SetTrustedKeyGroups(value); return *this;} /** *

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.

*/ inline CacheBehavior& WithTrustedKeyGroups(TrustedKeyGroups&& value) { SetTrustedKeyGroups(std::move(value)); return *this;} /** *

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.

* */ inline const ViewerProtocolPolicy& GetViewerProtocolPolicy() const{ return m_viewerProtocolPolicy; } /** *

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.

* */ inline bool ViewerProtocolPolicyHasBeenSet() const { return m_viewerProtocolPolicyHasBeenSet; } /** *

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.

* */ inline void SetViewerProtocolPolicy(const ViewerProtocolPolicy& value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy = value; } /** *

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.

* */ inline void SetViewerProtocolPolicy(ViewerProtocolPolicy&& value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy = std::move(value); } /** *

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.

* */ inline CacheBehavior& WithViewerProtocolPolicy(const ViewerProtocolPolicy& value) { SetViewerProtocolPolicy(value); return *this;} /** *

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.

* */ inline CacheBehavior& WithViewerProtocolPolicy(ViewerProtocolPolicy&& value) { SetViewerProtocolPolicy(std::move(value)); return *this;} inline const AllowedMethods& GetAllowedMethods() const{ return m_allowedMethods; } inline bool AllowedMethodsHasBeenSet() const { return m_allowedMethodsHasBeenSet; } inline void SetAllowedMethods(const AllowedMethods& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = value; } inline void SetAllowedMethods(AllowedMethods&& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = std::move(value); } inline CacheBehavior& WithAllowedMethods(const AllowedMethods& value) { SetAllowedMethods(value); return *this;} inline CacheBehavior& WithAllowedMethods(AllowedMethods&& value) { SetAllowedMethods(std::move(value)); return *this;} /** *

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.

*/ inline bool GetSmoothStreaming() const{ return m_smoothStreaming; } /** *

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.

*/ inline bool SmoothStreamingHasBeenSet() const { return m_smoothStreamingHasBeenSet; } /** *

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.

*/ inline void SetSmoothStreaming(bool value) { m_smoothStreamingHasBeenSet = true; m_smoothStreaming = value; } /** *

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.

*/ inline CacheBehavior& WithSmoothStreaming(bool value) { SetSmoothStreaming(value); return *this;} /** *

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.

*/ inline bool GetCompress() const{ return m_compress; } /** *

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.

*/ inline bool CompressHasBeenSet() const { return m_compressHasBeenSet; } /** *

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.

*/ inline void SetCompress(bool value) { m_compressHasBeenSet = true; m_compress = value; } /** *

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.

*/ inline CacheBehavior& WithCompress(bool value) { SetCompress(value); return *this;} /** *

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

*/ inline const LambdaFunctionAssociations& GetLambdaFunctionAssociations() const{ return m_lambdaFunctionAssociations; } /** *

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

*/ inline bool LambdaFunctionAssociationsHasBeenSet() const { return m_lambdaFunctionAssociationsHasBeenSet; } /** *

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

*/ inline void SetLambdaFunctionAssociations(const LambdaFunctionAssociations& value) { m_lambdaFunctionAssociationsHasBeenSet = true; m_lambdaFunctionAssociations = value; } /** *

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

*/ inline void SetLambdaFunctionAssociations(LambdaFunctionAssociations&& value) { m_lambdaFunctionAssociationsHasBeenSet = true; m_lambdaFunctionAssociations = std::move(value); } /** *

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

*/ inline CacheBehavior& WithLambdaFunctionAssociations(const LambdaFunctionAssociations& value) { SetLambdaFunctionAssociations(value); return *this;} /** *

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

*/ inline CacheBehavior& WithLambdaFunctionAssociations(LambdaFunctionAssociations&& value) { SetLambdaFunctionAssociations(std::move(value)); return *this;} /** *

A list of CloudFront functions that are associated with this cache behavior. * CloudFront functions must be published to the LIVE stage to * associate them with a cache behavior.

*/ inline const FunctionAssociations& GetFunctionAssociations() const{ return m_functionAssociations; } /** *

A list of CloudFront functions that are associated with this cache behavior. * CloudFront functions must be published to the LIVE stage to * associate them with a cache behavior.

*/ inline bool FunctionAssociationsHasBeenSet() const { return m_functionAssociationsHasBeenSet; } /** *

A list of CloudFront functions that are associated with this cache behavior. * CloudFront functions must be published to the LIVE stage to * associate them with a cache behavior.

*/ inline void SetFunctionAssociations(const FunctionAssociations& value) { m_functionAssociationsHasBeenSet = true; m_functionAssociations = value; } /** *

A list of CloudFront functions that are associated with this cache behavior. * CloudFront functions must be published to the LIVE stage to * associate them with a cache behavior.

*/ inline void SetFunctionAssociations(FunctionAssociations&& value) { m_functionAssociationsHasBeenSet = true; m_functionAssociations = std::move(value); } /** *

A list of CloudFront functions that are associated with this cache behavior. * CloudFront functions must be published to the LIVE stage to * associate them with a cache behavior.

*/ inline CacheBehavior& WithFunctionAssociations(const FunctionAssociations& value) { SetFunctionAssociations(value); return *this;} /** *

A list of CloudFront functions that are associated with this cache behavior. * CloudFront functions must be published to the LIVE stage to * associate them with a cache behavior.

*/ inline CacheBehavior& WithFunctionAssociations(FunctionAssociations&& value) { SetFunctionAssociations(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::String& GetFieldLevelEncryptionId() const{ return m_fieldLevelEncryptionId; } /** *

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.

*/ inline bool FieldLevelEncryptionIdHasBeenSet() const { return m_fieldLevelEncryptionIdHasBeenSet; } /** *

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.

*/ inline void SetFieldLevelEncryptionId(const Aws::String& value) { m_fieldLevelEncryptionIdHasBeenSet = true; m_fieldLevelEncryptionId = value; } /** *

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.

*/ inline void SetFieldLevelEncryptionId(Aws::String&& value) { m_fieldLevelEncryptionIdHasBeenSet = true; m_fieldLevelEncryptionId = std::move(value); } /** *

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.

*/ inline void SetFieldLevelEncryptionId(const char* value) { m_fieldLevelEncryptionIdHasBeenSet = true; m_fieldLevelEncryptionId.assign(value); } /** *

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.

*/ inline CacheBehavior& WithFieldLevelEncryptionId(const Aws::String& value) { SetFieldLevelEncryptionId(value); return *this;} /** *

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.

*/ inline CacheBehavior& WithFieldLevelEncryptionId(Aws::String&& value) { SetFieldLevelEncryptionId(std::move(value)); return *this;} /** *

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.

*/ inline CacheBehavior& WithFieldLevelEncryptionId(const char* value) { SetFieldLevelEncryptionId(value); return *this;} /** *

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.

*/ inline const Aws::String& GetRealtimeLogConfigArn() const{ return m_realtimeLogConfigArn; } /** *

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.

*/ inline bool RealtimeLogConfigArnHasBeenSet() const { return m_realtimeLogConfigArnHasBeenSet; } /** *

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.

*/ inline void SetRealtimeLogConfigArn(const Aws::String& value) { m_realtimeLogConfigArnHasBeenSet = true; m_realtimeLogConfigArn = value; } /** *

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.

*/ inline void SetRealtimeLogConfigArn(Aws::String&& value) { m_realtimeLogConfigArnHasBeenSet = true; m_realtimeLogConfigArn = std::move(value); } /** *

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.

*/ inline void SetRealtimeLogConfigArn(const char* value) { m_realtimeLogConfigArnHasBeenSet = true; m_realtimeLogConfigArn.assign(value); } /** *

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.

*/ inline CacheBehavior& WithRealtimeLogConfigArn(const Aws::String& value) { SetRealtimeLogConfigArn(value); return *this;} /** *

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.

*/ inline CacheBehavior& WithRealtimeLogConfigArn(Aws::String&& value) { SetRealtimeLogConfigArn(std::move(value)); return *this;} /** *

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.

*/ inline CacheBehavior& WithRealtimeLogConfigArn(const char* value) { SetRealtimeLogConfigArn(value); return *this;} /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline const Aws::String& GetCachePolicyId() const{ return m_cachePolicyId; } /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline bool CachePolicyIdHasBeenSet() const { return m_cachePolicyIdHasBeenSet; } /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline void SetCachePolicyId(const Aws::String& value) { m_cachePolicyIdHasBeenSet = true; m_cachePolicyId = value; } /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline void SetCachePolicyId(Aws::String&& value) { m_cachePolicyIdHasBeenSet = true; m_cachePolicyId = std::move(value); } /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline void SetCachePolicyId(const char* value) { m_cachePolicyIdHasBeenSet = true; m_cachePolicyId.assign(value); } /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline CacheBehavior& WithCachePolicyId(const Aws::String& value) { SetCachePolicyId(value); return *this;} /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline CacheBehavior& WithCachePolicyId(Aws::String&& value) { SetCachePolicyId(std::move(value)); return *this;} /** *

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.

A CacheBehavior must include either a * CachePolicyId or ForwardedValues. We recommend that * you use a CachePolicyId.

*/ inline CacheBehavior& WithCachePolicyId(const char* value) { SetCachePolicyId(value); return *this;} /** *

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.

*/ inline const Aws::String& GetOriginRequestPolicyId() const{ return m_originRequestPolicyId; } /** *

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.

*/ inline bool OriginRequestPolicyIdHasBeenSet() const { return m_originRequestPolicyIdHasBeenSet; } /** *

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.

*/ inline void SetOriginRequestPolicyId(const Aws::String& value) { m_originRequestPolicyIdHasBeenSet = true; m_originRequestPolicyId = value; } /** *

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.

*/ inline void SetOriginRequestPolicyId(Aws::String&& value) { m_originRequestPolicyIdHasBeenSet = true; m_originRequestPolicyId = std::move(value); } /** *

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.

*/ inline void SetOriginRequestPolicyId(const char* value) { m_originRequestPolicyIdHasBeenSet = true; m_originRequestPolicyId.assign(value); } /** *

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.

*/ inline CacheBehavior& WithOriginRequestPolicyId(const Aws::String& value) { SetOriginRequestPolicyId(value); return *this;} /** *

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.

*/ inline CacheBehavior& WithOriginRequestPolicyId(Aws::String&& value) { SetOriginRequestPolicyId(std::move(value)); return *this;} /** *

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.

*/ inline CacheBehavior& WithOriginRequestPolicyId(const char* value) { SetOriginRequestPolicyId(value); return *this;} /** *

The identifier for a response headers policy.

*/ inline const Aws::String& GetResponseHeadersPolicyId() const{ return m_responseHeadersPolicyId; } /** *

The identifier for a response headers policy.

*/ inline bool ResponseHeadersPolicyIdHasBeenSet() const { return m_responseHeadersPolicyIdHasBeenSet; } /** *

The identifier for a response headers policy.

*/ inline void SetResponseHeadersPolicyId(const Aws::String& value) { m_responseHeadersPolicyIdHasBeenSet = true; m_responseHeadersPolicyId = value; } /** *

The identifier for a response headers policy.

*/ inline void SetResponseHeadersPolicyId(Aws::String&& value) { m_responseHeadersPolicyIdHasBeenSet = true; m_responseHeadersPolicyId = std::move(value); } /** *

The identifier for a response headers policy.

*/ inline void SetResponseHeadersPolicyId(const char* value) { m_responseHeadersPolicyIdHasBeenSet = true; m_responseHeadersPolicyId.assign(value); } /** *

The identifier for a response headers policy.

*/ inline CacheBehavior& WithResponseHeadersPolicyId(const Aws::String& value) { SetResponseHeadersPolicyId(value); return *this;} /** *

The identifier for a response headers policy.

*/ inline CacheBehavior& WithResponseHeadersPolicyId(Aws::String&& value) { SetResponseHeadersPolicyId(std::move(value)); return *this;} /** *

The identifier for a response headers policy.

*/ inline CacheBehavior& WithResponseHeadersPolicyId(const char* value) { SetResponseHeadersPolicyId(value); return *this;} private: Aws::String m_pathPattern; bool m_pathPatternHasBeenSet = false; Aws::String m_targetOriginId; bool m_targetOriginIdHasBeenSet = false; TrustedSigners m_trustedSigners; bool m_trustedSignersHasBeenSet = false; TrustedKeyGroups m_trustedKeyGroups; bool m_trustedKeyGroupsHasBeenSet = false; ViewerProtocolPolicy m_viewerProtocolPolicy; bool m_viewerProtocolPolicyHasBeenSet = false; AllowedMethods m_allowedMethods; bool m_allowedMethodsHasBeenSet = false; bool m_smoothStreaming; bool m_smoothStreamingHasBeenSet = false; bool m_compress; bool m_compressHasBeenSet = false; LambdaFunctionAssociations m_lambdaFunctionAssociations; bool m_lambdaFunctionAssociationsHasBeenSet = false; FunctionAssociations m_functionAssociations; bool m_functionAssociationsHasBeenSet = false; Aws::String m_fieldLevelEncryptionId; bool m_fieldLevelEncryptionIdHasBeenSet = false; Aws::String m_realtimeLogConfigArn; bool m_realtimeLogConfigArnHasBeenSet = false; Aws::String m_cachePolicyId; bool m_cachePolicyIdHasBeenSet = false; Aws::String m_originRequestPolicyId; bool m_originRequestPolicyIdHasBeenSet = false; Aws::String m_responseHeadersPolicyId; bool m_responseHeadersPolicyIdHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws