@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CacheSettings extends Object implements Serializable, Cloneable, StructuredPojo
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
.
Constructor and Description |
---|
CacheSettings() |
Modifier and Type | Method and Description |
---|---|
CacheSettings |
clone() |
boolean |
equals(Object obj) |
String |
getAllowedHTTPMethods()
The HTTP methods that are processed and forwarded to the distribution's origin.
|
String |
getCachedHTTPMethods()
The HTTP method responses that are cached by your distribution.
|
Long |
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.
|
CookieObject |
getForwardedCookies()
An object that describes the cookies that are forwarded to the origin.
|
HeaderObject |
getForwardedHeaders()
An object that describes the headers that are forwarded to the origin.
|
QueryStringObject |
getForwardedQueryStrings()
An object that describes the query strings that are forwarded to the origin.
|
Long |
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.
|
Long |
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.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAllowedHTTPMethods(String allowedHTTPMethods)
The HTTP methods that are processed and forwarded to the distribution's origin.
|
void |
setCachedHTTPMethods(String cachedHTTPMethods)
The HTTP method responses that are cached by your distribution.
|
void |
setDefaultTTL(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.
|
void |
setForwardedCookies(CookieObject forwardedCookies)
An object that describes the cookies that are forwarded to the origin.
|
void |
setForwardedHeaders(HeaderObject forwardedHeaders)
An object that describes the headers that are forwarded to the origin.
|
void |
setForwardedQueryStrings(QueryStringObject forwardedQueryStrings)
An object that describes the query strings that are forwarded to the origin.
|
void |
setMaximumTTL(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.
|
void |
setMinimumTTL(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.
|
String |
toString()
Returns a string representation of this object.
|
CacheSettings |
withAllowedHTTPMethods(String allowedHTTPMethods)
The HTTP methods that are processed and forwarded to the distribution's origin.
|
CacheSettings |
withCachedHTTPMethods(String cachedHTTPMethods)
The HTTP method responses that are cached by your distribution.
|
CacheSettings |
withDefaultTTL(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.
|
CacheSettings |
withForwardedCookies(CookieObject forwardedCookies)
An object that describes the cookies that are forwarded to the origin.
|
CacheSettings |
withForwardedHeaders(HeaderObject forwardedHeaders)
An object that describes the headers that are forwarded to the origin.
|
CacheSettings |
withForwardedQueryStrings(QueryStringObject forwardedQueryStrings)
An object that describes the query strings that are forwarded to the origin.
|
CacheSettings |
withMaximumTTL(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.
|
CacheSettings |
withMinimumTTL(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.
|
public void setDefaultTTL(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.
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.
public Long 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
, 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 CacheSettings withDefaultTTL(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.
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.
public void setMinimumTTL(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.
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.
public Long 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 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 CacheSettings withMinimumTTL(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.
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.
public void setMaximumTTL(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.
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.
public Long 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
, 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 CacheSettings withMaximumTTL(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.
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.
public void setAllowedHTTPMethods(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.
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.
public String 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 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 CacheSettings withAllowedHTTPMethods(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.
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.
public void setCachedHTTPMethods(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.
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.
public String getCachedHTTPMethods()
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 CacheSettings withCachedHTTPMethods(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.
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.
public void setForwardedCookies(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.
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 CookieObject getForwardedCookies()
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
public CacheSettings withForwardedCookies(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.
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 void setForwardedHeaders(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.
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 HeaderObject getForwardedHeaders()
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
public CacheSettings withForwardedHeaders(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.
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 void setForwardedQueryStrings(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.
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 QueryStringObject 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.
public CacheSettings withForwardedQueryStrings(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.
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 String toString()
toString
in class Object
Object.toString()
public CacheSettings clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.