pub struct CreateWebACLFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to CreateWebACL.
This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.
Creates a WebACL, which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. AWS WAF evaluates Rules in order based on the value of Priority for each Rule.
You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match any of the Rules in a WebACL, AWS WAF responds to the request with the default action.
To create and configure a WebACL, perform the following steps:
-
Create and update the
ByteMatchSetobjects and other predicates that you want to include inRules. For more information, seeCreateByteMatchSet,UpdateByteMatchSet,CreateIPSet,UpdateIPSet,CreateSqlInjectionMatchSet, andUpdateSqlInjectionMatchSet. -
Create and update the
Rulesthat you want to include in theWebACL. For more information, seeCreateRuleandUpdateRule. -
Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of aCreateWebACLrequest. -
Submit a
CreateWebACLrequest. -
Use
GetChangeTokento get the change token that you provide in theChangeTokenparameter of anUpdateWebACLrequest. -
Submit an
UpdateWebACLrequest to specify theRulesthat you want to include in theWebACL, to specify the default action, and to associate theWebACLwith a CloudFront distribution.
For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide.
Implementations§
source§impl CreateWebACLFluentBuilder
impl CreateWebACLFluentBuilder
sourcepub fn as_input(&self) -> &CreateWebAclInputBuilder
pub fn as_input(&self) -> &CreateWebAclInputBuilder
Access the CreateWebACL as a reference.
sourcepub async fn send(
self
) -> Result<CreateWebAclOutput, SdkError<CreateWebACLError, HttpResponse>>
pub async fn send( self ) -> Result<CreateWebAclOutput, SdkError<CreateWebACLError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateWebAclOutput, CreateWebACLError>, SdkError<CreateWebACLError>>
pub async fn customize( self ) -> Result<CustomizableOperation<CreateWebAclOutput, CreateWebACLError>, SdkError<CreateWebACLError>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
A friendly name or description of the WebACL. You can't change Name after you create the WebACL.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
A friendly name or description of the WebACL. You can't change Name after you create the WebACL.
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
A friendly name or description of the WebACL. You can't change Name after you create the WebACL.
sourcepub fn metric_name(self, input: impl Into<String>) -> Self
pub fn metric_name(self, input: impl Into<String>) -> Self
A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.
sourcepub fn set_metric_name(self, input: Option<String>) -> Self
pub fn set_metric_name(self, input: Option<String>) -> Self
A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.
sourcepub fn get_metric_name(&self) -> &Option<String>
pub fn get_metric_name(&self) -> &Option<String>
A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.
sourcepub fn default_action(self, input: WafAction) -> Self
pub fn default_action(self, input: WafAction) -> Self
The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule objects that are associated with the WebACL.
sourcepub fn set_default_action(self, input: Option<WafAction>) -> Self
pub fn set_default_action(self, input: Option<WafAction>) -> Self
The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule objects that are associated with the WebACL.
sourcepub fn get_default_action(&self) -> &Option<WafAction>
pub fn get_default_action(&self) -> &Option<WafAction>
The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule objects that are associated with the WebACL.
sourcepub fn change_token(self, input: impl Into<String>) -> Self
pub fn change_token(self, input: impl Into<String>) -> Self
The value returned by the most recent call to GetChangeToken.
sourcepub fn set_change_token(self, input: Option<String>) -> Self
pub fn set_change_token(self, input: Option<String>) -> Self
The value returned by the most recent call to GetChangeToken.
sourcepub fn get_change_token(&self) -> &Option<String>
pub fn get_change_token(&self) -> &Option<String>
The value returned by the most recent call to GetChangeToken.
Appends an item to Tags.
To override the contents of this collection use set_tags.
Trait Implementations§
source§impl Clone for CreateWebACLFluentBuilder
impl Clone for CreateWebACLFluentBuilder
source§fn clone(&self) -> CreateWebACLFluentBuilder
fn clone(&self) -> CreateWebACLFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more