Interface CfnDistribution.CacheSettingsProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnDistribution.CacheSettingsProperty.Jsii$Proxy
- Enclosing class:
CfnDistribution
CacheSettings
is a property of the AWS::Lightsail::Distribution resource. It describes the cache settings of an Amazon Lightsail content delivery network (CDN) distribution.
These settings apply only to your distribution’s CacheBehaviors
that have a Behavior
of cache
. This includes the DefaultCacheBehavior
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lightsail.*; CacheSettingsProperty cacheSettingsProperty = CacheSettingsProperty.builder() .allowedHttpMethods("allowedHttpMethods") .cachedHttpMethods("cachedHttpMethods") .defaultTtl(123) .forwardedCookies(CookieObjectProperty.builder() .cookiesAllowList(List.of("cookiesAllowList")) .option("option") .build()) .forwardedHeaders(HeaderObjectProperty.builder() .headersAllowList(List.of("headersAllowList")) .option("option") .build()) .forwardedQueryStrings(QueryStringObjectProperty.builder() .option(false) .queryStringsAllowList(List.of("queryStringsAllowList")) .build()) .maximumTtl(123) .minimumTtl(123) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnDistribution.CacheSettingsProperty
static final class
An implementation forCfnDistribution.CacheSettingsProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
The HTTP methods that are processed and forwarded to the distribution's origin.default String
The HTTP method responses that are cached by your distribution.default Number
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.default Object
An object that describes the cookies that are forwarded to the origin.default Object
An object that describes the headers that are forwarded to the origin.default Object
An object that describes the query strings that are forwarded to the origin.default Number
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.default Number
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.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAllowedHttpMethods
The HTTP methods that are processed and forwarded to the distribution's origin.You can specify the following options:
GET,HEAD
- The distribution forwards theGET
andHEAD
methods.GET,HEAD,OPTIONS
- The distribution forwards theGET
,HEAD
, andOPTIONS
methods.GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards theGET
,HEAD
,OPTIONS
,PUT
,PATCH
,POST
, andDELETE
methods.
If you specify
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
, 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.- See Also:
-
getCachedHttpMethods
The HTTP method responses that are cached by your distribution.You can specify the following options:
GET,HEAD
- The distribution caches responses to theGET
andHEAD
methods.GET,HEAD,OPTIONS
- The distribution caches responses to theGET
,HEAD
, andOPTIONS
methods.
- See Also:
-
getDefaultTtl
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
, andExpires
to objects.- See Also:
-
getForwardedCookies
An object that describes the cookies that are forwarded to the origin.Your content is cached based on the cookies that are forwarded.
- See Also:
-
getForwardedHeaders
An object that describes the headers that are forwarded to the origin.Your content is cached based on the headers that are forwarded.
- See Also:
-
getForwardedQueryStrings
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.
- See Also:
-
getMaximumTtl
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
, andExpires
to objects.- See Also:
-
getMinimumTtl
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 forminimumTTL
if the distribution is configured to forward all headers to the origin.- See Also:
-
builder
-