pub struct Builder { /* private fields */ }
Expand description
A builder for AwsWafv2CustomResponseDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn custom_response_body_key(self, input: impl Into<String>) -> Self
pub fn custom_response_body_key(self, input: impl Into<String>) -> Self
References the response body that you want WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block.
sourcepub fn set_custom_response_body_key(self, input: Option<String>) -> Self
pub fn set_custom_response_body_key(self, input: Option<String>) -> Self
References the response body that you want WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block.
sourcepub fn response_code(self, input: i32) -> Self
pub fn response_code(self, input: i32) -> Self
The HTTP status code to return to the client. For a list of status codes that you can use in your custom responses, see Supported status codes for custom response in the WAF Developer Guide.
sourcepub fn set_response_code(self, input: Option<i32>) -> Self
pub fn set_response_code(self, input: Option<i32>) -> Self
The HTTP status code to return to the client. For a list of status codes that you can use in your custom responses, see Supported status codes for custom response in the WAF Developer Guide.
sourcepub fn response_headers(self, input: AwsWafv2CustomHttpHeader) -> Self
pub fn response_headers(self, input: AwsWafv2CustomHttpHeader) -> Self
Appends an item to response_headers
.
To override the contents of this collection use set_response_headers
.
The HTTP headers to use in the response.
sourcepub fn set_response_headers(
self,
input: Option<Vec<AwsWafv2CustomHttpHeader>>
) -> Self
pub fn set_response_headers(
self,
input: Option<Vec<AwsWafv2CustomHttpHeader>>
) -> Self
The HTTP headers to use in the response.
sourcepub fn build(self) -> AwsWafv2CustomResponseDetails
pub fn build(self) -> AwsWafv2CustomResponseDetails
Consumes the builder and constructs a AwsWafv2CustomResponseDetails
.