@Stability(value=Stable)
public static interface CfnDistribution.CacheSettingsProperty
extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnDistribution.CacheSettingsProperty.Builder
A builder for
CfnDistribution.CacheSettingsProperty |
static class |
CfnDistribution.CacheSettingsProperty.Jsii$Proxy
An implementation for
CfnDistribution.CacheSettingsProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnDistribution.CacheSettingsProperty.Builder |
builder() |
default String |
getAllowedHttpMethods()
The HTTP methods that are processed and forwarded to the distribution's origin.
|
default String |
getCachedHttpMethods()
The HTTP method responses that are cached by your distribution.
|
default Number |
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.
|
default Object |
getForwardedCookies()
An object that describes the cookies that are forwarded to the origin.
|
default Object |
getForwardedHeaders()
An object that describes the headers that are forwarded to the origin.
|
default Object |
getForwardedQueryStrings()
An object that describes the query strings that are forwarded to the origin.
|
default Number |
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.
|
default Number |
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.
|
@Stability(value=Stable) @Nullable default String getAllowedHttpMethods()
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 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.
@Stability(value=Stable) @Nullable default String getCachedHttpMethods()
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.@Stability(value=Stable) @Nullable default Number getDefaultTtl()
The value specified applies only when the origin does not add HTTP headers such as
Cache-Control max-age,Cache-Control s-maxage, andExpiresto objects.
@Stability(value=Stable) @Nullable default Object getForwardedCookies()
Your content is cached based on the cookies that are forwarded.
@Stability(value=Stable) @Nullable default Object getForwardedHeaders()
Your content is cached based on the headers that are forwarded.
@Stability(value=Stable) @Nullable default Object getForwardedQueryStrings()
Your content is cached based on the query strings that are forwarded.
@Stability(value=Stable) @Nullable default Number getMaximumTtl()
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.
@Stability(value=Stable) @Nullable default Number getMinimumTtl()
A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.
@Stability(value=Stable) static CfnDistribution.CacheSettingsProperty.Builder builder()
Copyright © 2022. All rights reserved.