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