Struct aws_sdk_lightsail::model::CacheSettings [−][src]
#[non_exhaustive]pub struct CacheSettings {
pub default_ttl: Option<i64>,
pub minimum_ttl: Option<i64>,
pub maximum_ttl: Option<i64>,
pub allowed_http_methods: Option<String>,
pub cached_http_methods: Option<String>,
pub forwarded_cookies: Option<CookieObject>,
pub forwarded_headers: Option<HeaderObject>,
pub forwarded_query_strings: Option<QueryStringObject>,
}
Expand description
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
.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.default_ttl: Option<i64>
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.
minimum_ttl: Option<i64>
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.
maximum_ttl: Option<i64>
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.
allowed_http_methods: Option<String>
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 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.
cached_http_methods: Option<String>
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.
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
forwarded_headers: Option<HeaderObject>
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
forwarded_query_strings: Option<QueryStringObject>
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.
Implementations
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 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.
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 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 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.
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.
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
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.
Creates a new builder-style object to manufacture CacheSettings
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for CacheSettings
impl Send for CacheSettings
impl Sync for CacheSettings
impl Unpin for CacheSettings
impl UnwindSafe for CacheSettings
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more