Class CacheSettings
- java.lang.Object
-
- software.amazon.awssdk.services.lightsail.model.CacheSettings
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<CacheSettings.Builder,CacheSettings>
@Generated("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 thedefaultCacheBehavior) that have abehaviorofcache.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCacheSettings.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringallowedHTTPMethods()The HTTP methods that are processed and forwarded to the distribution's origin.static CacheSettings.Builderbuilder()StringcachedHTTPMethods()The HTTP method responses that are cached by your distribution.LongdefaultTTL()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.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)CookieObjectforwardedCookies()An object that describes the cookies that are forwarded to the origin.HeaderObjectforwardedHeaders()An object that describes the headers that are forwarded to the origin.QueryStringObjectforwardedQueryStrings()An object that describes the query strings that are forwarded to the origin.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()LongmaximumTTL()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.LongminimumTTL()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.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
defaultTTL
public 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, andExpiresto objects.- Returns:
- 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, andExpiresto objects.
-
minimumTTL
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
0must be specified forminimumTTLif the distribution is configured to forward all headers to the origin.- Returns:
- 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
0must be specified forminimumTTLif the distribution is configured to forward all headers to the origin.
-
maximumTTL
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, andExpiresto objects.- Returns:
- 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, andExpiresto objects.
-
allowedHTTPMethods
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 theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution forwards theGET,HEAD, andOPTIONSmethods. -
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE- The distribution forwards theGET,HEAD,OPTIONS,PUT,PATCH,POST, andDELETEmethods.
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.
- Returns:
- The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
-
GET,HEAD- The distribution forwards theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution forwards theGET,HEAD, andOPTIONSmethods. -
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE- The distribution forwards theGET,HEAD,OPTIONS,PUT,PATCH,POST, andDELETEmethods.
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.
-
-
-
cachedHTTPMethods
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 theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution caches responses to theGET,HEAD, andOPTIONSmethods.
- Returns:
- The HTTP method responses that are cached by your distribution.
You can specify the following options:
-
GET,HEAD- The distribution caches responses to theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution caches responses to theGET,HEAD, andOPTIONSmethods.
-
-
-
forwardedCookies
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.
- Returns:
- An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
-
forwardedHeaders
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.
- Returns:
- An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
-
forwardedQueryStrings
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.
- Returns:
- 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.
-
toBuilder
public CacheSettings.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CacheSettings.Builder,CacheSettings>
-
builder
public static CacheSettings.Builder builder()
-
serializableBuilderClass
public static Class<? extends CacheSettings.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-