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 [`CreateRuleGroup`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`rule_group_name(impl Into<String>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::rule_group_name) / [`set_rule_group_name(Option<String>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_rule_group_name):<br>required: **true**<br><p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p><br>
    ///   - [`rule_group(RuleGroup)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::rule_group) / [`set_rule_group(Option<RuleGroup>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_rule_group):<br>required: **false**<br><p>An object that defines the rule group rules.</p><note>  <p>You must provide either this rule group setting or a <code>Rules</code> setting, but not both.</p> </note><br>
    ///   - [`rules(impl Into<String>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::rules) / [`set_rules(Option<String>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_rules):<br>required: **false**<br><p>A string containing stateful rule group rules specifications in Suricata flat format, with one rule per line. Use this to import your existing Suricata compatible rule groups.</p><note>  <p>You must provide either this rules setting or a populated <code>RuleGroup</code> setting, but not both.</p> </note> <p>You can provide your rule group specification in Suricata flat format through this setting when you create or update your rule group. The call response returns a <code>RuleGroup</code> object that Network Firewall has populated from your string.</p><br>
    ///   - [`r#type(RuleGroupType)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::type) / [`set_type(Option<RuleGroupType>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_type):<br>required: **true**<br><p>Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless rules. If it is stateful, it contains stateful rules.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_description):<br>required: **false**<br><p>A description of the rule group.</p><br>
    ///   - [`capacity(i32)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::capacity) / [`set_capacity(Option<i32>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_capacity):<br>required: **true**<br><p>The maximum operating resources that this rule group can use. Rule group capacity is fixed at creation. When you update a rule group, you are limited to this capacity. When you reference a rule group from a firewall policy, Network Firewall reserves this capacity for the rule group.</p> <p>You can retrieve the capacity that would be required for a rule group before you create the rule group by calling <code>CreateRuleGroup</code> with <code>DryRun</code> set to <code>TRUE</code>.</p><note>  <p>You can't change or exceed this capacity when you update the rule group, so leave room for your rule group to grow.</p> </note> <p><b>Capacity for a stateless rule group</b></p> <p>For a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules that you expect to have in the rule group.</p> <p>To calculate the capacity requirement of a single rule, multiply the capacity requirement values of each of the rule's match settings:</p> <ul>  <li>   <p>A match setting with no criteria specified has a value of 1.</p></li>  <li>   <p>A match setting with <code>Any</code> specified has a value of 1.</p></li>  <li>   <p>All other match settings have a value equal to the number of elements provided in the setting. For example, a protocol setting ["UDP"] and a source setting ["10.0.0.0/24"] each have a value of 1. A protocol setting ["UDP","TCP"] has a value of 2. A source setting ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"] has a value of 3.</p></li> </ul> <p>A rule with no criteria specified in any of its match settings has a capacity requirement of 1. A rule with protocol setting ["UDP","TCP"], source setting ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"], and a single specification or no specification for each of the other match settings has a capacity requirement of 6.</p> <p><b>Capacity for a stateful rule group</b></p> <p>For a stateful rule group, the minimum capacity required is the number of individual rules that you expect to have in the rule group.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_tags):<br>required: **false**<br><p>The key:value pairs to associate with the resource.</p><br>
    ///   - [`dry_run(bool)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_dry_run):<br>required: **false**<br><p>Indicates whether you want Network Firewall to just check the validity of the request, rather than run the request.</p> <p>If set to <code>TRUE</code>, Network Firewall checks whether the request can run successfully, but doesn't actually make the requested changes. The call returns the value that the request would return if you ran it with dry run set to <code>FALSE</code>, but doesn't make additions or changes to your resources. This option allows you to make sure that you have the required permissions to run the request and that your request parameters are valid.</p> <p>If set to <code>FALSE</code>, Network Firewall makes the requested changes to your resources.</p><br>
    ///   - [`encryption_configuration(EncryptionConfiguration)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::encryption_configuration) / [`set_encryption_configuration(Option<EncryptionConfiguration>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_encryption_configuration):<br>required: **false**<br><p>A complex type that contains settings for encryption of your rule group resources.</p><br>
    ///   - [`source_metadata(SourceMetadata)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::source_metadata) / [`set_source_metadata(Option<SourceMetadata>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_source_metadata):<br>required: **false**<br><p>A complex type that contains metadata about the rule group that your own rule group is copied from. You can use the metadata to keep track of updates made to the originating rule group.</p><br>
    ///   - [`analyze_rule_group(bool)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::analyze_rule_group) / [`set_analyze_rule_group(Option<bool>)`](crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::set_analyze_rule_group):<br>required: **false**<br><p>Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior such as asymmetric routing. If set to <code>TRUE</code>, Network Firewall runs the analysis and then creates the rule group for you. To run the stateless rule group analyzer without creating the rule group, set <code>DryRun</code> to <code>TRUE</code>.</p><br>
    /// - On success, responds with [`CreateRuleGroupOutput`](crate::operation::create_rule_group::CreateRuleGroupOutput) with field(s):
    ///   - [`update_token(String)`](crate::operation::create_rule_group::CreateRuleGroupOutput::update_token): <p>A token used for optimistic locking. Network Firewall returns a token to your requests that access the rule group. The token marks the state of the rule group resource at the time of the request.</p> <p>To make changes to the rule group, you provide the token in your request. Network Firewall uses the token to ensure that the rule group hasn't changed since you last retrieved it. If it has changed, the operation fails with an <code>InvalidTokenException</code>. If this happens, retrieve the rule group again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.</p>
    ///   - [`rule_group_response(Option<RuleGroupResponse>)`](crate::operation::create_rule_group::CreateRuleGroupOutput::rule_group_response): <p>The high-level properties of a rule group. This, along with the <code>RuleGroup</code>, define the rule group. You can retrieve all objects for a rule group by calling <code>DescribeRuleGroup</code>.</p>
    /// - On failure, responds with [`SdkError<CreateRuleGroupError>`](crate::operation::create_rule_group::CreateRuleGroupError)
    pub fn create_rule_group(&self) -> crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder {
        crate::operation::create_rule_group::builders::CreateRuleGroupFluentBuilder::new(self.handle.clone())
    }
}