aws_sdk_wafv2/operation/update_web_acl/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_web_acl::_update_web_acl_output::UpdateWebAclOutputBuilder;
3
4pub use crate::operation::update_web_acl::_update_web_acl_input::UpdateWebAclInputBuilder;
5
6impl crate::operation::update_web_acl::builders::UpdateWebAclInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_web_acl::UpdateWebAclOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_web_acl::UpdateWebACLError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_web_acl();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateWebACL`.
24///
25/// <p>Updates the specified <code>WebACL</code>. While updating a web ACL, WAF provides continuous coverage to the resources that you have associated with the web ACL.</p><note>
26/// <p>This operation completely replaces the mutable specifications that you already have for the web ACL with the ones that you provide to this call.</p>
27/// <p>To modify a web ACL, do the following:</p>
28/// <ol>
29/// <li>
30/// <p>Retrieve it by calling <code>GetWebACL</code></p></li>
31/// <li>
32/// <p>Update its settings as needed</p></li>
33/// <li>
34/// <p>Provide the complete web ACL specification to this call</p></li>
35/// </ol>
36/// </note>
37/// <p>A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types <code>Rule</code>, <code>RuleGroup</code>, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resource types include Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, Amplify application, and Amazon Web Services Verified Access instance.</p>
38/// <p><b>Temporary inconsistencies during updates</b></p>
39/// <p>When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes.</p>
40/// <p>The following are examples of the temporary inconsistencies that you might notice during change propagation:</p>
41/// <ul>
42/// <li>
43/// <p>After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable.</p></li>
44/// <li>
45/// <p>After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another.</p></li>
46/// <li>
47/// <p>After you change a rule action setting, you might see the old action in some places and the new action in others.</p></li>
48/// <li>
49/// <p>After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.</p></li>
50/// </ul>
51#[derive(::std::clone::Clone, ::std::fmt::Debug)]
52pub struct UpdateWebACLFluentBuilder {
53    handle: ::std::sync::Arc<crate::client::Handle>,
54    inner: crate::operation::update_web_acl::builders::UpdateWebAclInputBuilder,
55    config_override: ::std::option::Option<crate::config::Builder>,
56}
57impl
58    crate::client::customize::internal::CustomizableSend<
59        crate::operation::update_web_acl::UpdateWebAclOutput,
60        crate::operation::update_web_acl::UpdateWebACLError,
61    > for UpdateWebACLFluentBuilder
62{
63    fn send(
64        self,
65        config_override: crate::config::Builder,
66    ) -> crate::client::customize::internal::BoxFuture<
67        crate::client::customize::internal::SendResult<
68            crate::operation::update_web_acl::UpdateWebAclOutput,
69            crate::operation::update_web_acl::UpdateWebACLError,
70        >,
71    > {
72        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
73    }
74}
75impl UpdateWebACLFluentBuilder {
76    /// Creates a new `UpdateWebACLFluentBuilder`.
77    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
78        Self {
79            handle,
80            inner: ::std::default::Default::default(),
81            config_override: ::std::option::Option::None,
82        }
83    }
84    /// Access the UpdateWebACL as a reference.
85    pub fn as_input(&self) -> &crate::operation::update_web_acl::builders::UpdateWebAclInputBuilder {
86        &self.inner
87    }
88    /// Sends the request and returns the response.
89    ///
90    /// If an error occurs, an `SdkError` will be returned with additional details that
91    /// can be matched against.
92    ///
93    /// By default, any retryable failures will be retried twice. Retry behavior
94    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
95    /// set when configuring the client.
96    pub async fn send(
97        self,
98    ) -> ::std::result::Result<
99        crate::operation::update_web_acl::UpdateWebAclOutput,
100        ::aws_smithy_runtime_api::client::result::SdkError<
101            crate::operation::update_web_acl::UpdateWebACLError,
102            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
103        >,
104    > {
105        let input = self
106            .inner
107            .build()
108            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
109        let runtime_plugins = crate::operation::update_web_acl::UpdateWebACL::operation_runtime_plugins(
110            self.handle.runtime_plugins.clone(),
111            &self.handle.conf,
112            self.config_override,
113        );
114        crate::operation::update_web_acl::UpdateWebACL::orchestrate(&runtime_plugins, input).await
115    }
116
117    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
118    pub fn customize(
119        self,
120    ) -> crate::client::customize::CustomizableOperation<
121        crate::operation::update_web_acl::UpdateWebAclOutput,
122        crate::operation::update_web_acl::UpdateWebACLError,
123        Self,
124    > {
125        crate::client::customize::CustomizableOperation::new(self)
126    }
127    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
128        self.set_config_override(::std::option::Option::Some(config_override.into()));
129        self
130    }
131
132    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
133        self.config_override = config_override;
134        self
135    }
136    /// <p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p>
137    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.name(input.into());
139        self
140    }
141    /// <p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p>
142    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.inner = self.inner.set_name(input);
144        self
145    }
146    /// <p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p>
147    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
148        self.inner.get_name()
149    }
150    /// <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p>
151    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
152    /// <ul>
153    /// <li>
154    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
155    /// <li>
156    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
157    /// </ul>
158    pub fn scope(mut self, input: crate::types::Scope) -> Self {
159        self.inner = self.inner.scope(input);
160        self
161    }
162    /// <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p>
163    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
164    /// <ul>
165    /// <li>
166    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
167    /// <li>
168    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
169    /// </ul>
170    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::Scope>) -> Self {
171        self.inner = self.inner.set_scope(input);
172        self
173    }
174    /// <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p>
175    /// <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p>
176    /// <ul>
177    /// <li>
178    /// <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>
179    /// <li>
180    /// <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li>
181    /// </ul>
182    pub fn get_scope(&self) -> &::std::option::Option<crate::types::Scope> {
183        self.inner.get_scope()
184    }
185    /// <p>The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.</p>
186    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.inner = self.inner.id(input.into());
188        self
189    }
190    /// <p>The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.</p>
191    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.inner = self.inner.set_id(input);
193        self
194    }
195    /// <p>The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.</p>
196    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
197        self.inner.get_id()
198    }
199    /// <p>The action to perform if none of the <code>Rules</code> contained in the <code>WebACL</code> match.</p>
200    pub fn default_action(mut self, input: crate::types::DefaultAction) -> Self {
201        self.inner = self.inner.default_action(input);
202        self
203    }
204    /// <p>The action to perform if none of the <code>Rules</code> contained in the <code>WebACL</code> match.</p>
205    pub fn set_default_action(mut self, input: ::std::option::Option<crate::types::DefaultAction>) -> Self {
206        self.inner = self.inner.set_default_action(input);
207        self
208    }
209    /// <p>The action to perform if none of the <code>Rules</code> contained in the <code>WebACL</code> match.</p>
210    pub fn get_default_action(&self) -> &::std::option::Option<crate::types::DefaultAction> {
211        self.inner.get_default_action()
212    }
213    /// <p>A description of the web ACL that helps with identification.</p>
214    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.inner = self.inner.description(input.into());
216        self
217    }
218    /// <p>A description of the web ACL that helps with identification.</p>
219    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.inner = self.inner.set_description(input);
221        self
222    }
223    /// <p>A description of the web ACL that helps with identification.</p>
224    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
225        self.inner.get_description()
226    }
227    ///
228    /// Appends an item to `Rules`.
229    ///
230    /// To override the contents of this collection use [`set_rules`](Self::set_rules).
231    ///
232    /// <p>The <code>Rule</code> statements used to identify the web requests that you want to manage. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.</p>
233    pub fn rules(mut self, input: crate::types::Rule) -> Self {
234        self.inner = self.inner.rules(input);
235        self
236    }
237    /// <p>The <code>Rule</code> statements used to identify the web requests that you want to manage. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.</p>
238    pub fn set_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>) -> Self {
239        self.inner = self.inner.set_rules(input);
240        self
241    }
242    /// <p>The <code>Rule</code> statements used to identify the web requests that you want to manage. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.</p>
243    pub fn get_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Rule>> {
244        self.inner.get_rules()
245    }
246    /// <p>Defines and enables Amazon CloudWatch metrics and web request sample collection.</p>
247    pub fn visibility_config(mut self, input: crate::types::VisibilityConfig) -> Self {
248        self.inner = self.inner.visibility_config(input);
249        self
250    }
251    /// <p>Defines and enables Amazon CloudWatch metrics and web request sample collection.</p>
252    pub fn set_visibility_config(mut self, input: ::std::option::Option<crate::types::VisibilityConfig>) -> Self {
253        self.inner = self.inner.set_visibility_config(input);
254        self
255    }
256    /// <p>Defines and enables Amazon CloudWatch metrics and web request sample collection.</p>
257    pub fn get_visibility_config(&self) -> &::std::option::Option<crate::types::VisibilityConfig> {
258        self.inner.get_visibility_config()
259    }
260    /// <p>Specifies data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option.</p>
261    /// <p>The data protection that you configure for the web ACL alters the data that's available for any other data collection activity, including your WAF logging destinations, web ACL request sampling, and Amazon Security Lake data collection and management. Your other option for data protection is in the logging configuration, which only affects logging.</p>
262    pub fn data_protection_config(mut self, input: crate::types::DataProtectionConfig) -> Self {
263        self.inner = self.inner.data_protection_config(input);
264        self
265    }
266    /// <p>Specifies data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option.</p>
267    /// <p>The data protection that you configure for the web ACL alters the data that's available for any other data collection activity, including your WAF logging destinations, web ACL request sampling, and Amazon Security Lake data collection and management. Your other option for data protection is in the logging configuration, which only affects logging.</p>
268    pub fn set_data_protection_config(mut self, input: ::std::option::Option<crate::types::DataProtectionConfig>) -> Self {
269        self.inner = self.inner.set_data_protection_config(input);
270        self
271    }
272    /// <p>Specifies data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option.</p>
273    /// <p>The data protection that you configure for the web ACL alters the data that's available for any other data collection activity, including your WAF logging destinations, web ACL request sampling, and Amazon Security Lake data collection and management. Your other option for data protection is in the logging configuration, which only affects logging.</p>
274    pub fn get_data_protection_config(&self) -> &::std::option::Option<crate::types::DataProtectionConfig> {
275        self.inner.get_data_protection_config()
276    }
277    /// <p>A token used for optimistic locking. WAF returns a token to your <code>get</code> and <code>list</code> requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like <code>update</code> and <code>delete</code>. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a <code>WAFOptimisticLockException</code>. If this happens, perform another <code>get</code>, and use the new token returned by that operation.</p>
278    pub fn lock_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
279        self.inner = self.inner.lock_token(input.into());
280        self
281    }
282    /// <p>A token used for optimistic locking. WAF returns a token to your <code>get</code> and <code>list</code> requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like <code>update</code> and <code>delete</code>. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a <code>WAFOptimisticLockException</code>. If this happens, perform another <code>get</code>, and use the new token returned by that operation.</p>
283    pub fn set_lock_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
284        self.inner = self.inner.set_lock_token(input);
285        self
286    }
287    /// <p>A token used for optimistic locking. WAF returns a token to your <code>get</code> and <code>list</code> requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like <code>update</code> and <code>delete</code>. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a <code>WAFOptimisticLockException</code>. If this happens, perform another <code>get</code>, and use the new token returned by that operation.</p>
288    pub fn get_lock_token(&self) -> &::std::option::Option<::std::string::String> {
289        self.inner.get_lock_token()
290    }
291    ///
292    /// Adds a key-value pair to `CustomResponseBodies`.
293    ///
294    /// To override the contents of this collection use [`set_custom_response_bodies`](Self::set_custom_response_bodies).
295    ///
296    /// <p>A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.</p>
297    /// <p>For information about customizing web requests and responses, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html">Customizing web requests and responses in WAF</a> in the <i>WAF Developer Guide</i>.</p>
298    /// <p>For information about the limits on count and size for custom request and response settings, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF quotas</a> in the <i>WAF Developer Guide</i>.</p>
299    pub fn custom_response_bodies(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::CustomResponseBody) -> Self {
300        self.inner = self.inner.custom_response_bodies(k.into(), v);
301        self
302    }
303    /// <p>A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.</p>
304    /// <p>For information about customizing web requests and responses, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html">Customizing web requests and responses in WAF</a> in the <i>WAF Developer Guide</i>.</p>
305    /// <p>For information about the limits on count and size for custom request and response settings, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF quotas</a> in the <i>WAF Developer Guide</i>.</p>
306    pub fn set_custom_response_bodies(
307        mut self,
308        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::CustomResponseBody>>,
309    ) -> Self {
310        self.inner = self.inner.set_custom_response_bodies(input);
311        self
312    }
313    /// <p>A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.</p>
314    /// <p>For information about customizing web requests and responses, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html">Customizing web requests and responses in WAF</a> in the <i>WAF Developer Guide</i>.</p>
315    /// <p>For information about the limits on count and size for custom request and response settings, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">WAF quotas</a> in the <i>WAF Developer Guide</i>.</p>
316    pub fn get_custom_response_bodies(
317        &self,
318    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::CustomResponseBody>> {
319        self.inner.get_custom_response_bodies()
320    }
321    /// <p>Specifies how WAF should handle <code>CAPTCHA</code> evaluations for rules that don't have their own <code>CaptchaConfig</code> settings. If you don't specify this, WAF uses its default settings for <code>CaptchaConfig</code>.</p>
322    pub fn captcha_config(mut self, input: crate::types::CaptchaConfig) -> Self {
323        self.inner = self.inner.captcha_config(input);
324        self
325    }
326    /// <p>Specifies how WAF should handle <code>CAPTCHA</code> evaluations for rules that don't have their own <code>CaptchaConfig</code> settings. If you don't specify this, WAF uses its default settings for <code>CaptchaConfig</code>.</p>
327    pub fn set_captcha_config(mut self, input: ::std::option::Option<crate::types::CaptchaConfig>) -> Self {
328        self.inner = self.inner.set_captcha_config(input);
329        self
330    }
331    /// <p>Specifies how WAF should handle <code>CAPTCHA</code> evaluations for rules that don't have their own <code>CaptchaConfig</code> settings. If you don't specify this, WAF uses its default settings for <code>CaptchaConfig</code>.</p>
332    pub fn get_captcha_config(&self) -> &::std::option::Option<crate::types::CaptchaConfig> {
333        self.inner.get_captcha_config()
334    }
335    /// <p>Specifies how WAF should handle challenge evaluations for rules that don't have their own <code>ChallengeConfig</code> settings. If you don't specify this, WAF uses its default settings for <code>ChallengeConfig</code>.</p>
336    pub fn challenge_config(mut self, input: crate::types::ChallengeConfig) -> Self {
337        self.inner = self.inner.challenge_config(input);
338        self
339    }
340    /// <p>Specifies how WAF should handle challenge evaluations for rules that don't have their own <code>ChallengeConfig</code> settings. If you don't specify this, WAF uses its default settings for <code>ChallengeConfig</code>.</p>
341    pub fn set_challenge_config(mut self, input: ::std::option::Option<crate::types::ChallengeConfig>) -> Self {
342        self.inner = self.inner.set_challenge_config(input);
343        self
344    }
345    /// <p>Specifies how WAF should handle challenge evaluations for rules that don't have their own <code>ChallengeConfig</code> settings. If you don't specify this, WAF uses its default settings for <code>ChallengeConfig</code>.</p>
346    pub fn get_challenge_config(&self) -> &::std::option::Option<crate::types::ChallengeConfig> {
347        self.inner.get_challenge_config()
348    }
349    ///
350    /// Appends an item to `TokenDomains`.
351    ///
352    /// To override the contents of this collection use [`set_token_domains`](Self::set_token_domains).
353    ///
354    /// <p>Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.</p>
355    /// <p>Example JSON: <code>"TokenDomains": { "mywebsite.com", "myotherwebsite.com" }</code></p>
356    /// <p>Public suffixes aren't allowed. For example, you can't use <code>gov.au</code> or <code>co.uk</code> as token domains.</p>
357    pub fn token_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
358        self.inner = self.inner.token_domains(input.into());
359        self
360    }
361    /// <p>Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.</p>
362    /// <p>Example JSON: <code>"TokenDomains": { "mywebsite.com", "myotherwebsite.com" }</code></p>
363    /// <p>Public suffixes aren't allowed. For example, you can't use <code>gov.au</code> or <code>co.uk</code> as token domains.</p>
364    pub fn set_token_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
365        self.inner = self.inner.set_token_domains(input);
366        self
367    }
368    /// <p>Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.</p>
369    /// <p>Example JSON: <code>"TokenDomains": { "mywebsite.com", "myotherwebsite.com" }</code></p>
370    /// <p>Public suffixes aren't allowed. For example, you can't use <code>gov.au</code> or <code>co.uk</code> as token domains.</p>
371    pub fn get_token_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
372        self.inner.get_token_domains()
373    }
374    /// <p>Specifies custom configurations for the associations between the web ACL and protected resources.</p>
375    /// <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>
376    /// <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>
377    /// </note>
378    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
379    pub fn association_config(mut self, input: crate::types::AssociationConfig) -> Self {
380        self.inner = self.inner.association_config(input);
381        self
382    }
383    /// <p>Specifies custom configurations for the associations between the web ACL and protected resources.</p>
384    /// <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>
385    /// <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>
386    /// </note>
387    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
388    pub fn set_association_config(mut self, input: ::std::option::Option<crate::types::AssociationConfig>) -> Self {
389        self.inner = self.inner.set_association_config(input);
390        self
391    }
392    /// <p>Specifies custom configurations for the associations between the web ACL and protected resources.</p>
393    /// <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>
394    /// <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>
395    /// </note>
396    /// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
397    pub fn get_association_config(&self) -> &::std::option::Option<crate::types::AssociationConfig> {
398        self.inner.get_association_config()
399    }
400    /// <p>Specifies the type of DDoS protection to apply to web request data for a web ACL. For most scenarios, it is recommended to use the default protection level, <code>ACTIVE_UNDER_DDOS</code>. If a web ACL is associated with multiple Application Load Balancers, the changes you make to DDoS protection in that web ACL will apply to all associated Application Load Balancers.</p>
401    pub fn on_source_d_do_s_protection_config(mut self, input: crate::types::OnSourceDDoSProtectionConfig) -> Self {
402        self.inner = self.inner.on_source_d_do_s_protection_config(input);
403        self
404    }
405    /// <p>Specifies the type of DDoS protection to apply to web request data for a web ACL. For most scenarios, it is recommended to use the default protection level, <code>ACTIVE_UNDER_DDOS</code>. If a web ACL is associated with multiple Application Load Balancers, the changes you make to DDoS protection in that web ACL will apply to all associated Application Load Balancers.</p>
406    pub fn set_on_source_d_do_s_protection_config(mut self, input: ::std::option::Option<crate::types::OnSourceDDoSProtectionConfig>) -> Self {
407        self.inner = self.inner.set_on_source_d_do_s_protection_config(input);
408        self
409    }
410    /// <p>Specifies the type of DDoS protection to apply to web request data for a web ACL. For most scenarios, it is recommended to use the default protection level, <code>ACTIVE_UNDER_DDOS</code>. If a web ACL is associated with multiple Application Load Balancers, the changes you make to DDoS protection in that web ACL will apply to all associated Application Load Balancers.</p>
411    pub fn get_on_source_d_do_s_protection_config(&self) -> &::std::option::Option<crate::types::OnSourceDDoSProtectionConfig> {
412        self.inner.get_on_source_d_do_s_protection_config()
413    }
414    /// <p>Configures the ability for the WAF console to store and retrieve application attributes. Application attributes help WAF give recommendations for protection packs.</p>
415    /// <p>When using <code>UpdateWebACL</code>, <code>ApplicationConfig</code> follows these rules:</p>
416    /// <ul>
417    /// <li>
418    /// <p>If you omit <code>ApplicationConfig</code> from the request, all existing entries in the web ACL are retained.</p></li>
419    /// <li>
420    /// <p>If you include <code>ApplicationConfig</code>, entries must match the existing values exactly. Any attempt to modify existing entries will result in an error.</p></li>
421    /// </ul>
422    pub fn application_config(mut self, input: crate::types::ApplicationConfig) -> Self {
423        self.inner = self.inner.application_config(input);
424        self
425    }
426    /// <p>Configures the ability for the WAF console to store and retrieve application attributes. Application attributes help WAF give recommendations for protection packs.</p>
427    /// <p>When using <code>UpdateWebACL</code>, <code>ApplicationConfig</code> follows these rules:</p>
428    /// <ul>
429    /// <li>
430    /// <p>If you omit <code>ApplicationConfig</code> from the request, all existing entries in the web ACL are retained.</p></li>
431    /// <li>
432    /// <p>If you include <code>ApplicationConfig</code>, entries must match the existing values exactly. Any attempt to modify existing entries will result in an error.</p></li>
433    /// </ul>
434    pub fn set_application_config(mut self, input: ::std::option::Option<crate::types::ApplicationConfig>) -> Self {
435        self.inner = self.inner.set_application_config(input);
436        self
437    }
438    /// <p>Configures the ability for the WAF console to store and retrieve application attributes. Application attributes help WAF give recommendations for protection packs.</p>
439    /// <p>When using <code>UpdateWebACL</code>, <code>ApplicationConfig</code> follows these rules:</p>
440    /// <ul>
441    /// <li>
442    /// <p>If you omit <code>ApplicationConfig</code> from the request, all existing entries in the web ACL are retained.</p></li>
443    /// <li>
444    /// <p>If you include <code>ApplicationConfig</code>, entries must match the existing values exactly. Any attempt to modify existing entries will result in an error.</p></li>
445    /// </ul>
446    pub fn get_application_config(&self) -> &::std::option::Option<crate::types::ApplicationConfig> {
447        self.inner.get_application_config()
448    }
449}