Struct aws_sdk_lightsail::types::builders::CacheSettingsBuilder
source · #[non_exhaustive]pub struct CacheSettingsBuilder { /* private fields */ }
Expand description
A builder for CacheSettings
.
Implementations§
source§impl CacheSettingsBuilder
impl CacheSettingsBuilder
sourcepub fn default_ttl(self, input: i64) -> Self
pub fn default_ttl(self, input: i64) -> Self
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.
sourcepub fn set_default_ttl(self, input: Option<i64>) -> Self
pub fn set_default_ttl(self, input: Option<i64>) -> Self
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.
sourcepub fn get_default_ttl(&self) -> &Option<i64>
pub fn get_default_ttl(&self) -> &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.
sourcepub fn minimum_ttl(self, input: i64) -> Self
pub fn minimum_ttl(self, input: i64) -> Self
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.
sourcepub fn set_minimum_ttl(self, input: Option<i64>) -> Self
pub fn set_minimum_ttl(self, input: Option<i64>) -> Self
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.
sourcepub fn get_minimum_ttl(&self) -> &Option<i64>
pub fn get_minimum_ttl(&self) -> &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.
sourcepub fn maximum_ttl(self, input: i64) -> Self
pub fn maximum_ttl(self, input: i64) -> Self
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.
sourcepub fn set_maximum_ttl(self, input: Option<i64>) -> Self
pub fn set_maximum_ttl(self, input: Option<i64>) -> Self
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.
sourcepub fn get_maximum_ttl(&self) -> &Option<i64>
pub fn get_maximum_ttl(&self) -> &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.
sourcepub fn allowed_http_methods(self, input: impl Into<String>) -> Self
pub fn allowed_http_methods(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_allowed_http_methods(self, input: Option<String>) -> Self
pub fn set_allowed_http_methods(self, input: Option<String>) -> Self
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.
sourcepub fn get_allowed_http_methods(&self) -> &Option<String>
pub fn get_allowed_http_methods(&self) -> &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.
sourcepub fn cached_http_methods(self, input: impl Into<String>) -> Self
pub fn cached_http_methods(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_cached_http_methods(self, input: Option<String>) -> Self
pub fn set_cached_http_methods(self, input: Option<String>) -> Self
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.
sourcepub fn get_cached_http_methods(&self) -> &Option<String>
pub fn get_cached_http_methods(&self) -> &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.
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 cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
sourcepub fn forwarded_headers(self, input: HeaderObject) -> Self
pub fn forwarded_headers(self, input: HeaderObject) -> Self
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
sourcepub fn set_forwarded_headers(self, input: Option<HeaderObject>) -> Self
pub fn set_forwarded_headers(self, input: Option<HeaderObject>) -> Self
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
sourcepub fn get_forwarded_headers(&self) -> &Option<HeaderObject>
pub fn get_forwarded_headers(&self) -> &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.
sourcepub fn forwarded_query_strings(self, input: QueryStringObject) -> Self
pub fn forwarded_query_strings(self, input: QueryStringObject) -> Self
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.
sourcepub fn set_forwarded_query_strings(
self,
input: Option<QueryStringObject>
) -> Self
pub fn set_forwarded_query_strings( self, input: Option<QueryStringObject> ) -> Self
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.
sourcepub fn get_forwarded_query_strings(&self) -> &Option<QueryStringObject>
pub fn get_forwarded_query_strings(&self) -> &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.
sourcepub fn build(self) -> CacheSettings
pub fn build(self) -> CacheSettings
Consumes the builder and constructs a CacheSettings
.
Trait Implementations§
source§impl Clone for CacheSettingsBuilder
impl Clone for CacheSettingsBuilder
source§fn clone(&self) -> CacheSettingsBuilder
fn clone(&self) -> CacheSettingsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CacheSettingsBuilder
impl Debug for CacheSettingsBuilder
source§impl Default for CacheSettingsBuilder
impl Default for CacheSettingsBuilder
source§fn default() -> CacheSettingsBuilder
fn default() -> CacheSettingsBuilder
source§impl PartialEq for CacheSettingsBuilder
impl PartialEq for CacheSettingsBuilder
source§fn eq(&self, other: &CacheSettingsBuilder) -> bool
fn eq(&self, other: &CacheSettingsBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CacheSettingsBuilder
Auto Trait Implementations§
impl Freeze for CacheSettingsBuilder
impl RefUnwindSafe for CacheSettingsBuilder
impl Send for CacheSettingsBuilder
impl Sync for CacheSettingsBuilder
impl Unpin for CacheSettingsBuilder
impl UnwindSafe for CacheSettingsBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more