1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies custom configurations for the associations between the web ACL and protected resources.</p>
/// <p>Use this to customize the maximum size of the request body that your protected resources forward to WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).</p><note>
/// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
/// </note>
/// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociationConfig {
    /// <p>Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types.</p><note>
    /// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
    /// </note>
    /// <p>Example JSON: <code> { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" }</code></p>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
    pub request_body: ::std::option::Option<
        ::std::collections::HashMap<crate::types::AssociatedResourceType, crate::types::RequestBodyAssociatedResourceTypeConfig>,
    >,
}
impl AssociationConfig {
    /// <p>Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types.</p><note>
    /// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
    /// </note>
    /// <p>Example JSON: <code> { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" }</code></p>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
    pub fn request_body(
        &self,
    ) -> ::std::option::Option<
        &::std::collections::HashMap<crate::types::AssociatedResourceType, crate::types::RequestBodyAssociatedResourceTypeConfig>,
    > {
        self.request_body.as_ref()
    }
}
impl AssociationConfig {
    /// Creates a new builder-style object to manufacture [`AssociationConfig`](crate::types::AssociationConfig).
    pub fn builder() -> crate::types::builders::AssociationConfigBuilder {
        crate::types::builders::AssociationConfigBuilder::default()
    }
}

/// A builder for [`AssociationConfig`](crate::types::AssociationConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssociationConfigBuilder {
    pub(crate) request_body: ::std::option::Option<
        ::std::collections::HashMap<crate::types::AssociatedResourceType, crate::types::RequestBodyAssociatedResourceTypeConfig>,
    >,
}
impl AssociationConfigBuilder {
    /// Adds a key-value pair to `request_body`.
    ///
    /// To override the contents of this collection use [`set_request_body`](Self::set_request_body).
    ///
    /// <p>Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types.</p><note>
    /// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
    /// </note>
    /// <p>Example JSON: <code> { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" }</code></p>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
    pub fn request_body(mut self, k: crate::types::AssociatedResourceType, v: crate::types::RequestBodyAssociatedResourceTypeConfig) -> Self {
        let mut hash_map = self.request_body.unwrap_or_default();
        hash_map.insert(k, v);
        self.request_body = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types.</p><note>
    /// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
    /// </note>
    /// <p>Example JSON: <code> { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" }</code></p>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
    pub fn set_request_body(
        mut self,
        input: ::std::option::Option<
            ::std::collections::HashMap<crate::types::AssociatedResourceType, crate::types::RequestBodyAssociatedResourceTypeConfig>,
        >,
    ) -> Self {
        self.request_body = input;
        self
    }
    /// <p>Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types.</p><note>
    /// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
    /// </note>
    /// <p>Example JSON: <code> { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" }</code></p>
    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
    pub fn get_request_body(
        &self,
    ) -> &::std::option::Option<
        ::std::collections::HashMap<crate::types::AssociatedResourceType, crate::types::RequestBodyAssociatedResourceTypeConfig>,
    > {
        &self.request_body
    }
    /// Consumes the builder and constructs a [`AssociationConfig`](crate::types::AssociationConfig).
    pub fn build(self) -> crate::types::AssociationConfig {
        crate::types::AssociationConfig {
            request_body: self.request_body,
        }
    }
}