/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes the cache settings of an Amazon Lightsail content delivery network
* (CDN) distribution. These settings apply only to your distribution's
* cacheBehaviors
(including the defaultCacheBehavior
)
* that have a behavior
of cache
.See
* Also:
AWS
* API Reference
The default amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the content has been updated.
The value specified applies
* only when the origin does not add HTTP headers such as Cache-Control
* max-age
, Cache-Control s-maxage
, and Expires
to
* objects.
The default amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the content has been updated.
The value specified applies
* only when the origin does not add HTTP headers such as Cache-Control
* max-age
, Cache-Control s-maxage
, and Expires
to
* objects.
The default amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the content has been updated.
The value specified applies
* only when the origin does not add HTTP headers such as Cache-Control
* max-age
, Cache-Control s-maxage
, and Expires
to
* objects.
The default amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the content has been updated.
The value specified applies
* only when the origin does not add HTTP headers such as Cache-Control
* max-age
, Cache-Control s-maxage
, and Expires
to
* objects.
The minimum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
A value of 0
must be
* specified for minimumTTL
if the distribution is configured to
* forward all headers to the origin.
The minimum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
A value of 0
must be
* specified for minimumTTL
if the distribution is configured to
* forward all headers to the origin.
The minimum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
A value of 0
must be
* specified for minimumTTL
if the distribution is configured to
* forward all headers to the origin.
The minimum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
A value of 0
must be
* specified for minimumTTL
if the distribution is configured to
* forward all headers to the origin.
The maximum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
The value specified applies only
* when the origin adds HTTP headers such as Cache-Control max-age
,
* Cache-Control s-maxage
, and Expires
to objects.
The maximum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
The value specified applies only
* when the origin adds HTTP headers such as Cache-Control max-age
,
* Cache-Control s-maxage
, and Expires
to objects.
The maximum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
The value specified applies only
* when the origin adds HTTP headers such as Cache-Control max-age
,
* Cache-Control s-maxage
, and Expires
to objects.
The maximum amount of time that objects stay in the distribution's cache * before the distribution forwards another request to the origin to determine * whether the object has been updated.
The value specified applies only
* when the origin adds HTTP headers such as Cache-Control max-age
,
* Cache-Control s-maxage
, and Expires
to objects.
The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline const Aws::String& GetAllowedHTTPMethods() const{ return m_allowedHTTPMethods; } /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline bool AllowedHTTPMethodsHasBeenSet() const { return m_allowedHTTPMethodsHasBeenSet; } /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline void SetAllowedHTTPMethods(const Aws::String& value) { m_allowedHTTPMethodsHasBeenSet = true; m_allowedHTTPMethods = value; } /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline void SetAllowedHTTPMethods(Aws::String&& value) { m_allowedHTTPMethodsHasBeenSet = true; m_allowedHTTPMethods = std::move(value); } /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline void SetAllowedHTTPMethods(const char* value) { m_allowedHTTPMethodsHasBeenSet = true; m_allowedHTTPMethods.assign(value); } /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline CacheSettings& WithAllowedHTTPMethods(const Aws::String& value) { SetAllowedHTTPMethods(value); return *this;} /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline CacheSettings& WithAllowedHTTPMethods(Aws::String&& value) { SetAllowedHTTPMethods(std::move(value)); return *this;} /** *The HTTP methods that are processed and forwarded to the distribution's * origin.
You can specify the following options:
* GET,HEAD
- The distribution forwards the GET
and
* HEAD
methods.
GET,HEAD,OPTIONS
-
* The distribution forwards the GET
, HEAD
, and
* OPTIONS
methods.
* GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards
* the GET
, HEAD
, OPTIONS
, PUT
,
* PATCH
, POST
, and DELETE
methods.
If you specify the third option, you might need to restrict * access to your distribution's origin so users can't perform operations that you * don't want them to. For example, you might not want users to have permission to * delete objects from your origin.
*/ inline CacheSettings& WithAllowedHTTPMethods(const char* value) { SetAllowedHTTPMethods(value); return *this;} /** *The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
The HTTP method responses that are cached by your distribution.
You * can specify the following options:
GET,HEAD
- The
* distribution caches responses to the GET
and HEAD
* methods.
GET,HEAD,OPTIONS
- The distribution
* caches responses to the GET
, HEAD
, and
* OPTIONS
methods.
An object that describes the cookies that are forwarded to the origin. Your * content is cached based on the cookies that are forwarded.
*/ inline const CookieObject& GetForwardedCookies() const{ return m_forwardedCookies; } /** *An object that describes the cookies that are forwarded to the origin. Your * content is cached based on the cookies that are forwarded.
*/ inline bool ForwardedCookiesHasBeenSet() const { return m_forwardedCookiesHasBeenSet; } /** *An object that describes the cookies that are forwarded to the origin. Your * content is cached based on the cookies that are forwarded.
*/ inline void SetForwardedCookies(const CookieObject& value) { m_forwardedCookiesHasBeenSet = true; m_forwardedCookies = value; } /** *An object that describes the cookies that are forwarded to the origin. Your * content is cached based on the cookies that are forwarded.
*/ inline void SetForwardedCookies(CookieObject&& value) { m_forwardedCookiesHasBeenSet = true; m_forwardedCookies = std::move(value); } /** *An object that describes the cookies that are forwarded to the origin. Your * content is cached based on the cookies that are forwarded.
*/ inline CacheSettings& WithForwardedCookies(const CookieObject& value) { SetForwardedCookies(value); return *this;} /** *An object that describes the cookies that are forwarded to the origin. Your * content is cached based on the cookies that are forwarded.
*/ inline CacheSettings& WithForwardedCookies(CookieObject&& value) { SetForwardedCookies(std::move(value)); return *this;} /** *An object that describes the headers that are forwarded to the origin. Your * content is cached based on the headers that are forwarded.
*/ inline const HeaderObject& GetForwardedHeaders() const{ return m_forwardedHeaders; } /** *An object that describes the headers that are forwarded to the origin. Your * content is cached based on the headers that are forwarded.
*/ inline bool ForwardedHeadersHasBeenSet() const { return m_forwardedHeadersHasBeenSet; } /** *An object that describes the headers that are forwarded to the origin. Your * content is cached based on the headers that are forwarded.
*/ inline void SetForwardedHeaders(const HeaderObject& value) { m_forwardedHeadersHasBeenSet = true; m_forwardedHeaders = value; } /** *An object that describes the headers that are forwarded to the origin. Your * content is cached based on the headers that are forwarded.
*/ inline void SetForwardedHeaders(HeaderObject&& value) { m_forwardedHeadersHasBeenSet = true; m_forwardedHeaders = std::move(value); } /** *An object that describes the headers that are forwarded to the origin. Your * content is cached based on the headers that are forwarded.
*/ inline CacheSettings& WithForwardedHeaders(const HeaderObject& value) { SetForwardedHeaders(value); return *this;} /** *An object that describes the headers that are forwarded to the origin. Your * content is cached based on the headers that are forwarded.
*/ inline CacheSettings& WithForwardedHeaders(HeaderObject&& value) { SetForwardedHeaders(std::move(value)); return *this;} /** *An object that describes the query strings that are forwarded to the origin. * Your content is cached based on the query strings that are forwarded.
*/ inline const QueryStringObject& GetForwardedQueryStrings() const{ return m_forwardedQueryStrings; } /** *An object that describes the query strings that are forwarded to the origin. * Your content is cached based on the query strings that are forwarded.
*/ inline bool ForwardedQueryStringsHasBeenSet() const { return m_forwardedQueryStringsHasBeenSet; } /** *An object that describes the query strings that are forwarded to the origin. * Your content is cached based on the query strings that are forwarded.
*/ inline void SetForwardedQueryStrings(const QueryStringObject& value) { m_forwardedQueryStringsHasBeenSet = true; m_forwardedQueryStrings = value; } /** *An object that describes the query strings that are forwarded to the origin. * Your content is cached based on the query strings that are forwarded.
*/ inline void SetForwardedQueryStrings(QueryStringObject&& value) { m_forwardedQueryStringsHasBeenSet = true; m_forwardedQueryStrings = std::move(value); } /** *An object that describes the query strings that are forwarded to the origin. * Your content is cached based on the query strings that are forwarded.
*/ inline CacheSettings& WithForwardedQueryStrings(const QueryStringObject& value) { SetForwardedQueryStrings(value); return *this;} /** *An object that describes the query strings that are forwarded to the origin. * Your content is cached based on the query strings that are forwarded.
*/ inline CacheSettings& WithForwardedQueryStrings(QueryStringObject&& value) { SetForwardedQueryStrings(std::move(value)); return *this;} private: long long m_defaultTTL; bool m_defaultTTLHasBeenSet = false; long long m_minimumTTL; bool m_minimumTTLHasBeenSet = false; long long m_maximumTTL; bool m_maximumTTLHasBeenSet = false; Aws::String m_allowedHTTPMethods; bool m_allowedHTTPMethodsHasBeenSet = false; Aws::String m_cachedHTTPMethods; bool m_cachedHTTPMethodsHasBeenSet = false; CookieObject m_forwardedCookies; bool m_forwardedCookiesHasBeenSet = false; HeaderObject m_forwardedHeaders; bool m_forwardedHeadersHasBeenSet = false; QueryStringObject m_forwardedQueryStrings; bool m_forwardedQueryStringsHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws