Struct aws_sdk_cloudfront::types::builders::ResponseHeadersPolicyServerTimingHeadersConfigBuilder
source · #[non_exhaustive]pub struct ResponseHeadersPolicyServerTimingHeadersConfigBuilder { /* private fields */ }
Expand description
A builder for ResponseHeadersPolicyServerTimingHeadersConfig
.
Implementations§
source§impl ResponseHeadersPolicyServerTimingHeadersConfigBuilder
impl ResponseHeadersPolicyServerTimingHeadersConfigBuilder
sourcepub fn enabled(self, input: bool) -> Self
pub fn enabled(self, input: bool) -> Self
A Boolean that determines whether CloudFront adds the Server-Timing
header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.
sourcepub fn set_enabled(self, input: Option<bool>) -> Self
pub fn set_enabled(self, input: Option<bool>) -> Self
A Boolean that determines whether CloudFront adds the Server-Timing
header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.
sourcepub fn get_enabled(&self) -> &Option<bool>
pub fn get_enabled(&self) -> &Option<bool>
A Boolean that determines whether CloudFront adds the Server-Timing
header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.
sourcepub fn sampling_rate(self, input: f64) -> Self
pub fn sampling_rate(self, input: f64) -> Self
A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing
header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing
header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.
sourcepub fn set_sampling_rate(self, input: Option<f64>) -> Self
pub fn set_sampling_rate(self, input: Option<f64>) -> Self
A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing
header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing
header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.
sourcepub fn get_sampling_rate(&self) -> &Option<f64>
pub fn get_sampling_rate(&self) -> &Option<f64>
A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing
header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing
header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.
sourcepub fn build(
self
) -> Result<ResponseHeadersPolicyServerTimingHeadersConfig, BuildError>
pub fn build( self ) -> Result<ResponseHeadersPolicyServerTimingHeadersConfig, BuildError>
Consumes the builder and constructs a ResponseHeadersPolicyServerTimingHeadersConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ResponseHeadersPolicyServerTimingHeadersConfigBuilder
impl Clone for ResponseHeadersPolicyServerTimingHeadersConfigBuilder
source§fn clone(&self) -> ResponseHeadersPolicyServerTimingHeadersConfigBuilder
fn clone(&self) -> ResponseHeadersPolicyServerTimingHeadersConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for ResponseHeadersPolicyServerTimingHeadersConfigBuilder
impl Default for ResponseHeadersPolicyServerTimingHeadersConfigBuilder
source§fn default() -> ResponseHeadersPolicyServerTimingHeadersConfigBuilder
fn default() -> ResponseHeadersPolicyServerTimingHeadersConfigBuilder
source§impl PartialEq for ResponseHeadersPolicyServerTimingHeadersConfigBuilder
impl PartialEq for ResponseHeadersPolicyServerTimingHeadersConfigBuilder
source§fn eq(
&self,
other: &ResponseHeadersPolicyServerTimingHeadersConfigBuilder
) -> bool
fn eq( &self, other: &ResponseHeadersPolicyServerTimingHeadersConfigBuilder ) -> bool
self
and other
values to be equal, and is used
by ==
.