Struct rusoto_lightsail::CacheSettings
source · [−]pub struct CacheSettings {
pub allowed_http_methods: Option<String>,
pub cached_http_methods: Option<String>,
pub default_ttl: Option<i64>,
pub forwarded_cookies: Option<CookieObject>,
pub forwarded_headers: Option<HeaderObject>,
pub forwarded_query_strings: Option<QueryStringObject>,
pub maximum_ttl: Option<i64>,
pub minimum_ttl: Option<i64>,
}
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
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.
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.
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.
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.
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.
Trait Implementations
sourceimpl Clone for CacheSettings
impl Clone for CacheSettings
sourcefn clone(&self) -> CacheSettings
fn clone(&self) -> CacheSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CacheSettings
impl Debug for CacheSettings
sourceimpl Default for CacheSettings
impl Default for CacheSettings
sourcefn default() -> CacheSettings
fn default() -> CacheSettings
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CacheSettings
impl<'de> Deserialize<'de> for CacheSettings
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<CacheSettings> for CacheSettings
impl PartialEq<CacheSettings> for CacheSettings
sourcefn eq(&self, other: &CacheSettings) -> bool
fn eq(&self, other: &CacheSettings) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CacheSettings) -> bool
fn ne(&self, other: &CacheSettings) -> bool
This method tests for !=
.
sourceimpl Serialize for CacheSettings
impl Serialize for CacheSettings
impl StructuralPartialEq for CacheSettings
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more