aws-sdk-wafv2 1.130.0

AWS SDK for AWS WAFV2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Inspect the body of the web request. The body immediately follows the request headers.</p>
/// <p>This is used to indicate the web request component to inspect, in the <code>FieldToMatch</code> specification.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Body {
    /// <p>What WAF should do if the body is larger than WAF can inspect.</p>
    /// <p>WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.</p>
    /// <ul>
    /// <li>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p></li>
    /// <li>
    /// <p>For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL <code>AssociationConfig</code>, for additional processing fees.</p></li>
    /// <li>
    /// <p>For Amplify, use the CloudFront limit.</p></li>
    /// </ul>
    /// <p>The options for oversize handling are the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Inspect the available body contents normally, according to the rule inspection criteria.</p></li>
    /// <li>
    /// <p><code>MATCH</code> - Treat the web request as matching the rule statement. WAF applies the rule action to the request.</p></li>
    /// <li>
    /// <p><code>NO_MATCH</code> - Treat the web request as not matching the rule statement.</p></li>
    /// </ul>
    /// <p>You can combine the <code>MATCH</code> or <code>NO_MATCH</code> settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.</p>
    /// <p>Default: <code>CONTINUE</code></p>
    pub oversize_handling: ::std::option::Option<crate::types::OversizeHandling>,
}
impl Body {
    /// <p>What WAF should do if the body is larger than WAF can inspect.</p>
    /// <p>WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.</p>
    /// <ul>
    /// <li>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p></li>
    /// <li>
    /// <p>For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL <code>AssociationConfig</code>, for additional processing fees.</p></li>
    /// <li>
    /// <p>For Amplify, use the CloudFront limit.</p></li>
    /// </ul>
    /// <p>The options for oversize handling are the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Inspect the available body contents normally, according to the rule inspection criteria.</p></li>
    /// <li>
    /// <p><code>MATCH</code> - Treat the web request as matching the rule statement. WAF applies the rule action to the request.</p></li>
    /// <li>
    /// <p><code>NO_MATCH</code> - Treat the web request as not matching the rule statement.</p></li>
    /// </ul>
    /// <p>You can combine the <code>MATCH</code> or <code>NO_MATCH</code> settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.</p>
    /// <p>Default: <code>CONTINUE</code></p>
    pub fn oversize_handling(&self) -> ::std::option::Option<&crate::types::OversizeHandling> {
        self.oversize_handling.as_ref()
    }
}
impl Body {
    /// Creates a new builder-style object to manufacture [`Body`](crate::types::Body).
    pub fn builder() -> crate::types::builders::BodyBuilder {
        crate::types::builders::BodyBuilder::default()
    }
}

/// A builder for [`Body`](crate::types::Body).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BodyBuilder {
    pub(crate) oversize_handling: ::std::option::Option<crate::types::OversizeHandling>,
}
impl BodyBuilder {
    /// <p>What WAF should do if the body is larger than WAF can inspect.</p>
    /// <p>WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.</p>
    /// <ul>
    /// <li>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p></li>
    /// <li>
    /// <p>For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL <code>AssociationConfig</code>, for additional processing fees.</p></li>
    /// <li>
    /// <p>For Amplify, use the CloudFront limit.</p></li>
    /// </ul>
    /// <p>The options for oversize handling are the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Inspect the available body contents normally, according to the rule inspection criteria.</p></li>
    /// <li>
    /// <p><code>MATCH</code> - Treat the web request as matching the rule statement. WAF applies the rule action to the request.</p></li>
    /// <li>
    /// <p><code>NO_MATCH</code> - Treat the web request as not matching the rule statement.</p></li>
    /// </ul>
    /// <p>You can combine the <code>MATCH</code> or <code>NO_MATCH</code> settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.</p>
    /// <p>Default: <code>CONTINUE</code></p>
    pub fn oversize_handling(mut self, input: crate::types::OversizeHandling) -> Self {
        self.oversize_handling = ::std::option::Option::Some(input);
        self
    }
    /// <p>What WAF should do if the body is larger than WAF can inspect.</p>
    /// <p>WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.</p>
    /// <ul>
    /// <li>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p></li>
    /// <li>
    /// <p>For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL <code>AssociationConfig</code>, for additional processing fees.</p></li>
    /// <li>
    /// <p>For Amplify, use the CloudFront limit.</p></li>
    /// </ul>
    /// <p>The options for oversize handling are the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Inspect the available body contents normally, according to the rule inspection criteria.</p></li>
    /// <li>
    /// <p><code>MATCH</code> - Treat the web request as matching the rule statement. WAF applies the rule action to the request.</p></li>
    /// <li>
    /// <p><code>NO_MATCH</code> - Treat the web request as not matching the rule statement.</p></li>
    /// </ul>
    /// <p>You can combine the <code>MATCH</code> or <code>NO_MATCH</code> settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.</p>
    /// <p>Default: <code>CONTINUE</code></p>
    pub fn set_oversize_handling(mut self, input: ::std::option::Option<crate::types::OversizeHandling>) -> Self {
        self.oversize_handling = input;
        self
    }
    /// <p>What WAF should do if the body is larger than WAF can inspect.</p>
    /// <p>WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.</p>
    /// <ul>
    /// <li>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p></li>
    /// <li>
    /// <p>For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL <code>AssociationConfig</code>, for additional processing fees.</p></li>
    /// <li>
    /// <p>For Amplify, use the CloudFront limit.</p></li>
    /// </ul>
    /// <p>The options for oversize handling are the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Inspect the available body contents normally, according to the rule inspection criteria.</p></li>
    /// <li>
    /// <p><code>MATCH</code> - Treat the web request as matching the rule statement. WAF applies the rule action to the request.</p></li>
    /// <li>
    /// <p><code>NO_MATCH</code> - Treat the web request as not matching the rule statement.</p></li>
    /// </ul>
    /// <p>You can combine the <code>MATCH</code> or <code>NO_MATCH</code> settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit.</p>
    /// <p>Default: <code>CONTINUE</code></p>
    pub fn get_oversize_handling(&self) -> &::std::option::Option<crate::types::OversizeHandling> {
        &self.oversize_handling
    }
    /// Consumes the builder and constructs a [`Body`](crate::types::Body).
    pub fn build(self) -> crate::types::Body {
        crate::types::Body {
            oversize_handling: self.oversize_handling,
        }
    }
}