#[non_exhaustive]pub struct CachePolicyHeadersConfigBuilder { /* private fields */ }
Expand description
A builder for CachePolicyHeadersConfig
.
Implementations§
source§impl CachePolicyHeadersConfigBuilder
impl CachePolicyHeadersConfigBuilder
sourcepub fn header_behavior(self, input: CachePolicyHeaderBehavior) -> Self
pub fn header_behavior(self, input: CachePolicyHeaderBehavior) -> Self
Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:
-
none
– No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests. -
whitelist
– Only the HTTP headers that are listed in theHeaders
type are included in the cache key and in requests that CloudFront sends to the origin.
sourcepub fn set_header_behavior(
self,
input: Option<CachePolicyHeaderBehavior>
) -> Self
pub fn set_header_behavior( self, input: Option<CachePolicyHeaderBehavior> ) -> Self
Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:
-
none
– No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests. -
whitelist
– Only the HTTP headers that are listed in theHeaders
type are included in the cache key and in requests that CloudFront sends to the origin.
sourcepub fn get_header_behavior(&self) -> &Option<CachePolicyHeaderBehavior>
pub fn get_header_behavior(&self) -> &Option<CachePolicyHeaderBehavior>
Determines whether any HTTP headers are included in the cache key and in requests that CloudFront sends to the origin. Valid values are:
-
none
– No HTTP headers are included in the cache key or in requests that CloudFront sends to the origin. Even when this field is set tonone
, any headers that are listed in anOriginRequestPolicy
are included in origin requests. -
whitelist
– Only the HTTP headers that are listed in theHeaders
type are included in the cache key and in requests that CloudFront sends to the origin.
sourcepub fn set_headers(self, input: Option<Headers>) -> Self
pub fn set_headers(self, input: Option<Headers>) -> Self
Contains a list of HTTP header names.
sourcepub fn get_headers(&self) -> &Option<Headers>
pub fn get_headers(&self) -> &Option<Headers>
Contains a list of HTTP header names.
sourcepub fn build(self) -> Result<CachePolicyHeadersConfig, BuildError>
pub fn build(self) -> Result<CachePolicyHeadersConfig, BuildError>
Consumes the builder and constructs a CachePolicyHeadersConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for CachePolicyHeadersConfigBuilder
impl Clone for CachePolicyHeadersConfigBuilder
source§fn clone(&self) -> CachePolicyHeadersConfigBuilder
fn clone(&self) -> CachePolicyHeadersConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for CachePolicyHeadersConfigBuilder
impl Default for CachePolicyHeadersConfigBuilder
source§fn default() -> CachePolicyHeadersConfigBuilder
fn default() -> CachePolicyHeadersConfigBuilder
source§impl PartialEq for CachePolicyHeadersConfigBuilder
impl PartialEq for CachePolicyHeadersConfigBuilder
source§fn eq(&self, other: &CachePolicyHeadersConfigBuilder) -> bool
fn eq(&self, other: &CachePolicyHeadersConfigBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CachePolicyHeadersConfigBuilder
Auto Trait Implementations§
impl Freeze for CachePolicyHeadersConfigBuilder
impl RefUnwindSafe for CachePolicyHeadersConfigBuilder
impl Send for CachePolicyHeadersConfigBuilder
impl Sync for CachePolicyHeadersConfigBuilder
impl Unpin for CachePolicyHeadersConfigBuilder
impl UnwindSafe for CachePolicyHeadersConfigBuilder
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