1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateWebACL`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_name):<br>required: **true**<br><p>The name of the web ACL. You cannot change the name of a web ACL after you create it.</p><br>
    ///   - [`scope(Scope)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::scope) / [`set_scope(Option<Scope>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_scope):<br>required: **true**<br><p>Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.</p> <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p> <ul>  <li>   <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>  <li>   <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li> </ul><br>
    ///   - [`default_action(DefaultAction)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::default_action) / [`set_default_action(Option<DefaultAction>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_default_action):<br>required: **true**<br><p>The action to perform if none of the <code>Rules</code> contained in the <code>WebACL</code> match.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_description):<br>required: **false**<br><p>A description of the web ACL that helps with identification.</p><br>
    ///   - [`rules(Rule)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::rules) / [`set_rules(Option<Vec::<Rule>>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_rules):<br>required: **false**<br><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><br>
    ///   - [`visibility_config(VisibilityConfig)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::visibility_config) / [`set_visibility_config(Option<VisibilityConfig>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_visibility_config):<br>required: **true**<br><p>Defines and enables Amazon CloudWatch metrics and web request sample collection.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_tags):<br>required: **false**<br><p>An array of key:value pairs to associate with the resource.</p><br>
    ///   - [`custom_response_bodies(impl Into<String>, CustomResponseBody)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::custom_response_bodies) / [`set_custom_response_bodies(Option<HashMap::<String, CustomResponseBody>>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_custom_response_bodies):<br>required: **false**<br><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> <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> <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><br>
    ///   - [`captcha_config(CaptchaConfig)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::captcha_config) / [`set_captcha_config(Option<CaptchaConfig>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_captcha_config):<br>required: **false**<br><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><br>
    ///   - [`challenge_config(ChallengeConfig)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::challenge_config) / [`set_challenge_config(Option<ChallengeConfig>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_challenge_config):<br>required: **false**<br><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><br>
    ///   - [`token_domains(impl Into<String>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::token_domains) / [`set_token_domains(Option<Vec::<String>>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_token_domains):<br>required: **false**<br><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> <p>Example JSON: <code>"TokenDomains": { "mywebsite.com", "myotherwebsite.com" }</code></p> <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><br>
    ///   - [`association_config(AssociationConfig)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::association_config) / [`set_association_config(Option<AssociationConfig>)`](crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::set_association_config):<br>required: **false**<br><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><br>
    /// - On success, responds with [`CreateWebAclOutput`](crate::operation::create_web_acl::CreateWebAclOutput) with field(s):
    ///   - [`summary(Option<WebAclSummary>)`](crate::operation::create_web_acl::CreateWebAclOutput::summary): <p>High-level information about a <code>WebACL</code>, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a <code>WebACL</code>, and the ARN, that you provide to operations like <code>AssociateWebACL</code>.</p>
    /// - On failure, responds with [`SdkError<CreateWebACLError>`](crate::operation::create_web_acl::CreateWebACLError)
    pub fn create_web_acl(&self) -> crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder {
        crate::operation::create_web_acl::builders::CreateWebACLFluentBuilder::new(self.handle.clone())
    }
}