aws_sdk_wafregional/client/create_rate_based_rule.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateRateBasedRule`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::set_name):<br>required: **true**<br><p>A friendly name or description of the <code>RateBasedRule</code>. You can't change the name of a <code>RateBasedRule</code> after you create it.</p><br>
/// - [`metric_name(impl Into<String>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::metric_name) / [`set_metric_name(Option<String>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::set_metric_name):<br>required: **true**<br><p>A friendly name or description for the metrics for this <code>RateBasedRule</code>. 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 the name of the metric after you create the <code>RateBasedRule</code>.</p><br>
/// - [`rate_key(RateKey)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::rate_key) / [`set_rate_key(Option<RateKey>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::set_rate_key):<br>required: **true**<br><p>The field that AWS WAF uses to determine if requests are likely arriving from a single source and thus subject to rate monitoring. The only valid value for <code>RateKey</code> is <code>IP</code>. <code>IP</code> indicates that requests that arrive from the same IP address are subject to the <code>RateLimit</code> that is specified in the <code>RateBasedRule</code>.</p><br>
/// - [`rate_limit(i64)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::rate_limit) / [`set_rate_limit(Option<i64>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::set_rate_limit):<br>required: **true**<br><p>The maximum number of requests, which have an identical value in the field that is specified by <code>RateKey</code>, allowed in a five-minute period. If the number of requests exceeds the <code>RateLimit</code> and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule.</p><br>
/// - [`change_token(impl Into<String>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::change_token) / [`set_change_token(Option<String>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::set_change_token):<br>required: **true**<br><p>The <code>ChangeToken</code> that you used to submit the <code>CreateRateBasedRule</code> request. You can also use this value to query the status of the request. For more information, see <code>GetChangeTokenStatus</code>.</p><br>
/// - [`tags(Tag)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::set_tags):<br>required: **false**<br><p></p><br>
/// - On success, responds with [`CreateRateBasedRuleOutput`](crate::operation::create_rate_based_rule::CreateRateBasedRuleOutput) with field(s):
/// - [`rule(Option<RateBasedRule>)`](crate::operation::create_rate_based_rule::CreateRateBasedRuleOutput::rule): <p>The <code>RateBasedRule</code> that is returned in the <code>CreateRateBasedRule</code> response.</p>
/// - [`change_token(Option<String>)`](crate::operation::create_rate_based_rule::CreateRateBasedRuleOutput::change_token): <p>The <code>ChangeToken</code> that you used to submit the <code>CreateRateBasedRule</code> request. You can also use this value to query the status of the request. For more information, see <code>GetChangeTokenStatus</code>.</p>
/// - On failure, responds with [`SdkError<CreateRateBasedRuleError>`](crate::operation::create_rate_based_rule::CreateRateBasedRuleError)
pub fn create_rate_based_rule(&self) -> crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder {
crate::operation::create_rate_based_rule::builders::CreateRateBasedRuleFluentBuilder::new(self.handle.clone())
}
}