@Generated(value="software.amazon.awssdk:codegen") public final class CacheSettings extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CacheSettings.Builder,CacheSettings>
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.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CacheSettings.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
allowedHTTPMethods()
The HTTP methods that are processed and forwarded to the distribution's origin.
|
static CacheSettings.Builder |
builder() |
String |
cachedHTTPMethods()
The HTTP method responses that are cached by your distribution.
|
Long |
defaultTTL()
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.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
CookieObject |
forwardedCookies()
An object that describes the cookies that are forwarded to the origin.
|
HeaderObject |
forwardedHeaders()
An object that describes the headers that are forwarded to the origin.
|
QueryStringObject |
forwardedQueryStrings()
An object that describes the query strings that are forwarded to the origin.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
Long |
maximumTTL()
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.
|
Long |
minimumTTL()
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.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends CacheSettings.Builder> |
serializableBuilderClass() |
CacheSettings.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final Long defaultTTL()
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 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.
public final Long minimumTTL()
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.
A value of 0 must be specified for minimumTTL if the distribution is configured
to forward all headers to the origin.
public final Long maximumTTL()
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 value specified applies only when the origin adds HTTP headers such as
Cache-Control max-age, Cache-Control s-maxage, and Expires to
objects.
public final String 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.
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.
public final String cachedHTTPMethods()
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.
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.
public final CookieObject forwardedCookies()
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
public final HeaderObject forwardedHeaders()
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
public final QueryStringObject 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.
public CacheSettings.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CacheSettings.Builder,CacheSettings>public static CacheSettings.Builder builder()
public static Class<? extends CacheSettings.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.