#[non_exhaustive]pub struct ResponseHeadersPolicyConfigBuilder { /* private fields */ }
Expand description
A builder for ResponseHeadersPolicyConfig
.
Implementations§
source§impl ResponseHeadersPolicyConfigBuilder
impl ResponseHeadersPolicyConfigBuilder
sourcepub fn comment(self, input: impl Into<String>) -> Self
pub fn comment(self, input: impl Into<String>) -> Self
A comment to describe the response headers policy.
The comment cannot be longer than 128 characters.
sourcepub fn set_comment(self, input: Option<String>) -> Self
pub fn set_comment(self, input: Option<String>) -> Self
A comment to describe the response headers policy.
The comment cannot be longer than 128 characters.
sourcepub fn get_comment(&self) -> &Option<String>
pub fn get_comment(&self) -> &Option<String>
A comment to describe the response headers policy.
The comment cannot be longer than 128 characters.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
A name to identify the response headers policy.
The name must be unique for response headers policies in this Amazon Web Services account.
This field is required.sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
A name to identify the response headers policy.
The name must be unique for response headers policies in this Amazon Web Services account.
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
A name to identify the response headers policy.
The name must be unique for response headers policies in this Amazon Web Services account.
sourcepub fn cors_config(self, input: ResponseHeadersPolicyCorsConfig) -> Self
pub fn cors_config(self, input: ResponseHeadersPolicyCorsConfig) -> Self
A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).
sourcepub fn set_cors_config(
self,
input: Option<ResponseHeadersPolicyCorsConfig>
) -> Self
pub fn set_cors_config( self, input: Option<ResponseHeadersPolicyCorsConfig> ) -> Self
A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).
sourcepub fn get_cors_config(&self) -> &Option<ResponseHeadersPolicyCorsConfig>
pub fn get_cors_config(&self) -> &Option<ResponseHeadersPolicyCorsConfig>
A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).
sourcepub fn security_headers_config(
self,
input: ResponseHeadersPolicySecurityHeadersConfig
) -> Self
pub fn security_headers_config( self, input: ResponseHeadersPolicySecurityHeadersConfig ) -> Self
A configuration for a set of security-related HTTP response headers.
sourcepub fn set_security_headers_config(
self,
input: Option<ResponseHeadersPolicySecurityHeadersConfig>
) -> Self
pub fn set_security_headers_config( self, input: Option<ResponseHeadersPolicySecurityHeadersConfig> ) -> Self
A configuration for a set of security-related HTTP response headers.
sourcepub fn get_security_headers_config(
&self
) -> &Option<ResponseHeadersPolicySecurityHeadersConfig>
pub fn get_security_headers_config( &self ) -> &Option<ResponseHeadersPolicySecurityHeadersConfig>
A configuration for a set of security-related HTTP response headers.
sourcepub fn server_timing_headers_config(
self,
input: ResponseHeadersPolicyServerTimingHeadersConfig
) -> Self
pub fn server_timing_headers_config( self, input: ResponseHeadersPolicyServerTimingHeadersConfig ) -> Self
A configuration for enabling the Server-Timing
header in HTTP responses sent from CloudFront.
sourcepub fn set_server_timing_headers_config(
self,
input: Option<ResponseHeadersPolicyServerTimingHeadersConfig>
) -> Self
pub fn set_server_timing_headers_config( self, input: Option<ResponseHeadersPolicyServerTimingHeadersConfig> ) -> Self
A configuration for enabling the Server-Timing
header in HTTP responses sent from CloudFront.
sourcepub fn get_server_timing_headers_config(
&self
) -> &Option<ResponseHeadersPolicyServerTimingHeadersConfig>
pub fn get_server_timing_headers_config( &self ) -> &Option<ResponseHeadersPolicyServerTimingHeadersConfig>
A configuration for enabling the Server-Timing
header in HTTP responses sent from CloudFront.
sourcepub fn custom_headers_config(
self,
input: ResponseHeadersPolicyCustomHeadersConfig
) -> Self
pub fn custom_headers_config( self, input: ResponseHeadersPolicyCustomHeadersConfig ) -> Self
A configuration for a set of custom HTTP response headers.
sourcepub fn set_custom_headers_config(
self,
input: Option<ResponseHeadersPolicyCustomHeadersConfig>
) -> Self
pub fn set_custom_headers_config( self, input: Option<ResponseHeadersPolicyCustomHeadersConfig> ) -> Self
A configuration for a set of custom HTTP response headers.
sourcepub fn get_custom_headers_config(
&self
) -> &Option<ResponseHeadersPolicyCustomHeadersConfig>
pub fn get_custom_headers_config( &self ) -> &Option<ResponseHeadersPolicyCustomHeadersConfig>
A configuration for a set of custom HTTP response headers.
sourcepub fn remove_headers_config(
self,
input: ResponseHeadersPolicyRemoveHeadersConfig
) -> Self
pub fn remove_headers_config( self, input: ResponseHeadersPolicyRemoveHeadersConfig ) -> Self
A configuration for a set of HTTP headers to remove from the HTTP response.
sourcepub fn set_remove_headers_config(
self,
input: Option<ResponseHeadersPolicyRemoveHeadersConfig>
) -> Self
pub fn set_remove_headers_config( self, input: Option<ResponseHeadersPolicyRemoveHeadersConfig> ) -> Self
A configuration for a set of HTTP headers to remove from the HTTP response.
sourcepub fn get_remove_headers_config(
&self
) -> &Option<ResponseHeadersPolicyRemoveHeadersConfig>
pub fn get_remove_headers_config( &self ) -> &Option<ResponseHeadersPolicyRemoveHeadersConfig>
A configuration for a set of HTTP headers to remove from the HTTP response.
sourcepub fn build(self) -> Result<ResponseHeadersPolicyConfig, BuildError>
pub fn build(self) -> Result<ResponseHeadersPolicyConfig, BuildError>
Consumes the builder and constructs a ResponseHeadersPolicyConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ResponseHeadersPolicyConfigBuilder
impl Clone for ResponseHeadersPolicyConfigBuilder
source§fn clone(&self) -> ResponseHeadersPolicyConfigBuilder
fn clone(&self) -> ResponseHeadersPolicyConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for ResponseHeadersPolicyConfigBuilder
impl Default for ResponseHeadersPolicyConfigBuilder
source§fn default() -> ResponseHeadersPolicyConfigBuilder
fn default() -> ResponseHeadersPolicyConfigBuilder
source§impl PartialEq for ResponseHeadersPolicyConfigBuilder
impl PartialEq for ResponseHeadersPolicyConfigBuilder
source§fn eq(&self, other: &ResponseHeadersPolicyConfigBuilder) -> bool
fn eq(&self, other: &ResponseHeadersPolicyConfigBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.