Skip to main content

aws_sdk_networksecuritymanager/client/
generate_rule_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GenerateRuleConfiguration`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`prompt(impl Into<String>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::prompt) / [`set_prompt(Option<String>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::set_prompt):<br>required: **true**<br><p>A natural-language description of the configuration that you want to generate.</p><br>
7    ///   - [`rule_firewall_type(RuleFirewallType)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::rule_firewall_type) / [`set_rule_firewall_type(Option<RuleFirewallType>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::set_rule_firewall_type):<br>required: **true**<br><p>The firewall type of the rule.</p><br>
8    ///   - [`rule_type(RuleType)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::rule_type) / [`set_rule_type(Option<RuleType>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::set_rule_type):<br>required: **true**<br><p>The type of the rule. <code>CONFIGURATION</code> rules contain firewall settings, and <code>INSPECTION</code> rules contain rule groups.</p><br>
9    ///   - [`waf_config_data_type(WafConfigDataType)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::waf_config_data_type) / [`set_waf_config_data_type(Option<WafConfigDataType>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::set_waf_config_data_type):<br>required: **false**<br><p>For AWS WAF configuration rules, the specific AWS WAF configuration variant to generate. This is optional; if you omit it, the service selects the variant.</p><br>
10    ///   - [`current_configuration(impl Into<String>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::current_configuration) / [`set_current_configuration(Option<String>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::set_current_configuration):<br>required: **false**<br><p>An existing configuration to edit, as a JSON string. When you provide this value, the operation edits the configuration. When you omit it, the operation generates a new configuration.</p><br>
11    ///   - [`client_token(impl Into<String>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.</p><br>
12    /// - On success, responds with [`GenerateRuleConfigurationOutput`](crate::operation::generate_rule_configuration::GenerateRuleConfigurationOutput) with field(s):
13    ///   - [`configuration(String)`](crate::operation::generate_rule_configuration::GenerateRuleConfigurationOutput::configuration): <p>The generated configuration, as a JSON string. You can use this value in the <code>configuration</code> field of a rule.</p>
14    ///   - [`description(Option<String>)`](crate::operation::generate_rule_configuration::GenerateRuleConfigurationOutput::description): <p>Reserved for a future human-readable description of the generated configuration. This field is currently not populated.</p>
15    /// - On failure, responds with [`SdkError<GenerateRuleConfigurationError>`](crate::operation::generate_rule_configuration::GenerateRuleConfigurationError)
16    pub fn generate_rule_configuration(&self) -> crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder {
17        crate::operation::generate_rule_configuration::builders::GenerateRuleConfigurationFluentBuilder::new(self.handle.clone())
18    }
19}