Skip to main content

aws_sdk_networksecuritymanager/client/
update_rule.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 [`UpdateRule`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`rule_identifier(impl Into<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::rule_identifier) / [`set_rule_identifier(Option<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::set_rule_identifier):<br>required: **true**<br><p>The identifier of the rule. This is the rule's Amazon Resource Name (ARN).</p><br>
7    ///   - [`update_token(impl Into<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::update_token) / [`set_update_token(Option<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::set_update_token):<br>required: **true**<br><p>A token used for optimistic concurrency control. Each read and write returns an <code>updateToken</code>. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.</p><br>
8    ///   - [`rule_type(RuleType)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::rule_type) / [`set_rule_type(Option<RuleType>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::set_rule_type):<br>required: **false**<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    ///   - [`rule_description(impl Into<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::rule_description) / [`set_rule_description(Option<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::set_rule_description):<br>required: **false**<br><p>A description of the rule.</p><br>
10    ///   - [`configuration(Document)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::configuration) / [`set_configuration(Option<Document>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::set_configuration):<br>required: **false**<br><p>The firewall configuration for the rule, as a JSON document. The structure depends on the rule's firewall type and rule type. For an AWS WAF <code>INSPECTION</code> rule, provide an AWS WAF rule group. For an AWS WAF <code>CONFIGURATION</code> rule, provide a single web ACL setting, such as <code>DefaultAction</code> or <code>VisibilityConfig</code>; use <code>wafConfigDataType</code> to declare which setting the document contains. For the schema of each setting and complete examples, see <a href="https://docs.aws.amazon.com/network-security-manager/latest/devguide/what-is.html">Writing rule configurations</a> in the <i>AWS Network Security Manager Developer Guide</i>.</p><br>
11    ///   - [`is_published(bool)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::is_published) / [`set_is_published(Option<bool>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::set_is_published):<br>required: **true**<br><p>Specifies whether to publish the resource. When <code>true</code>, the resource is saved in published (<code>ACTIVE</code>) state. When <code>false</code>, it is saved as a draft (<code>DRAFT</code>).</p><br>
12    ///   - [`client_token(impl Into<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::update_rule::builders::UpdateRuleFluentBuilder::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>
13    /// - On success, responds with [`UpdateRuleOutput`](crate::operation::update_rule::UpdateRuleOutput) with field(s):
14    ///   - [`rule_id(String)`](crate::operation::update_rule::UpdateRuleOutput::rule_id): <p>The service-generated id of the rule.</p>
15    ///   - [`rule_arn(String)`](crate::operation::update_rule::UpdateRuleOutput::rule_arn): <p>The Amazon Resource Name (ARN) of the rule.</p>
16    ///   - [`rule_name(String)`](crate::operation::update_rule::UpdateRuleOutput::rule_name): <p>The name of the rule.</p>
17    ///   - [`firewall_type(RuleFirewallType)`](crate::operation::update_rule::UpdateRuleOutput::firewall_type): <p>The firewall type associated with the resource.</p>
18    ///   - [`rule_type(Option<RuleType>)`](crate::operation::update_rule::UpdateRuleOutput::rule_type): <p>The type of the rule. <code>CONFIGURATION</code> rules contain firewall settings, and <code>INSPECTION</code> rules contain rule groups.</p>
19    ///   - [`rule_description(Option<String>)`](crate::operation::update_rule::UpdateRuleOutput::rule_description): <p>A description of the rule.</p>
20    ///   - [`configuration(Document)`](crate::operation::update_rule::UpdateRuleOutput::configuration): <p>The firewall configuration for the rule, as a JSON document. The structure depends on the rule's firewall type and rule type.</p>
21    ///   - [`status(EntityStatus)`](crate::operation::update_rule::UpdateRuleOutput::status): <p>The current status of the resource: <code>DRAFT</code> (unpublished, editable) or <code>ACTIVE</code> (published, in use).</p>
22    ///   - [`version(String)`](crate::operation::update_rule::UpdateRuleOutput::version): <p>The version of the resource.</p>
23    ///   - [`update_token(Option<String>)`](crate::operation::update_rule::UpdateRuleOutput::update_token): <p>A token used for optimistic concurrency control. Each read and write returns an <code>updateToken</code>. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.</p>
24    ///   - [`is_snapshot(Option<bool>)`](crate::operation::update_rule::UpdateRuleOutput::is_snapshot): <p>Specifies whether the resource is a snapshot of a published version.</p>
25    ///   - [`has_published_version(Option<bool>)`](crate::operation::update_rule::UpdateRuleOutput::has_published_version): <p>Specifies whether a published version of the resource exists.</p>
26    ///   - [`updated_at(Option<DateTime>)`](crate::operation::update_rule::UpdateRuleOutput::updated_at): <p>The time when the resource was last updated.</p>
27    /// - On failure, responds with [`SdkError<UpdateRuleError>`](crate::operation::update_rule::UpdateRuleError)
28    pub fn update_rule(&self) -> crate::operation::update_rule::builders::UpdateRuleFluentBuilder {
29        crate::operation::update_rule::builders::UpdateRuleFluentBuilder::new(self.handle.clone())
30    }
31}