aws_sdk_wafregional/client/
create_rule.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateRule`](crate::operation::create_rule::builders::CreateRuleFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_name):<br>required: **true**<br><p>A friendly name or description of the <code>Rule</code>. You can't change the name of a <code>Rule</code> after you create it.</p><br>
    ///   - [`metric_name(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::metric_name) / [`set_metric_name(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_metric_name):<br>required: **true**<br><p>A friendly name or description for the metrics for this <code>Rule</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>Rule</code>.</p><br>
    ///   - [`change_token(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::change_token) / [`set_change_token(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_change_token):<br>required: **true**<br><p>The value returned by the most recent call to <code>GetChangeToken</code>.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_tags):<br>required: **false**<br><p></p><br>
    /// - On success, responds with [`CreateRuleOutput`](crate::operation::create_rule::CreateRuleOutput) with field(s):
    ///   - [`rule(Option<Rule>)`](crate::operation::create_rule::CreateRuleOutput::rule): <p>The <code>Rule</code> returned in the <code>CreateRule</code> response.</p>
    ///   - [`change_token(Option<String>)`](crate::operation::create_rule::CreateRuleOutput::change_token): <p>The <code>ChangeToken</code> that you used to submit the <code>CreateRule</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<CreateRuleError>`](crate::operation::create_rule::CreateRuleError)
    pub fn create_rule(&self) -> crate::operation::create_rule::builders::CreateRuleFluentBuilder {
        crate::operation::create_rule::builders::CreateRuleFluentBuilder::new(self.handle.clone())
    }
}