Skip to main content

aws_sdk_networksecuritymanager/client/
update_policy.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 [`UpdatePolicy`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`policy_identifier(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_identifier) / [`set_policy_identifier(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_identifier):<br>required: **true**<br><p>The identifier of the policy. This is the policy's Amazon Resource Name (ARN).</p><br>
7    ///   - [`update_token(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::update_token) / [`set_update_token(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::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    ///   - [`policy_description(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_description) / [`set_policy_description(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_description):<br>required: **false**<br><p>A description of the policy.</p><br>
9    ///   - [`priority(i32)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::priority) / [`set_priority(Option<i32>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_priority):<br>required: **false**<br><p>The priority of the resource. A lower number indicates a higher priority.</p><br>
10    ///   - [`associated_template_and_rule_list(TemplateOrRuleReference)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::associated_template_and_rule_list) / [`set_associated_template_and_rule_list(Option<Vec::<TemplateOrRuleReference>>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_associated_template_and_rule_list):<br>required: **false**<br><p>The templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.</p><br>
11    ///   - [`policy_configuration(PolicyConfiguration)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_configuration) / [`set_policy_configuration(Option<PolicyConfiguration>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_configuration):<br>required: **false**<br><p>The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.</p><br>
12    ///   - [`is_published(bool)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::is_published) / [`set_is_published(Option<bool>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::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>
13    ///   - [`client_token(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::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>
14    /// - On success, responds with [`UpdatePolicyOutput`](crate::operation::update_policy::UpdatePolicyOutput) with field(s):
15    ///   - [`policy_id(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_id): <p>The service-generated id of the policy.</p>
16    ///   - [`policy_arn(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_arn): <p>The Amazon Resource Name (ARN) of the policy.</p>
17    ///   - [`policy_name(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_name): <p>The name of the policy.</p>
18    ///   - [`policy_description(Option<String>)`](crate::operation::update_policy::UpdatePolicyOutput::policy_description): <p>A description of the policy.</p>
19    ///   - [`status(EntityStatus)`](crate::operation::update_policy::UpdatePolicyOutput::status): <p>The current status of the resource: <code>DRAFT</code> (unpublished, editable) or <code>ACTIVE</code> (published, in use).</p>
20    ///   - [`priority(i32)`](crate::operation::update_policy::UpdatePolicyOutput::priority): <p>The priority of the resource. A lower number indicates a higher priority.</p>
21    ///   - [`associated_template_and_rule_list(Vec::<AssociatedTemplateOrRule>)`](crate::operation::update_policy::UpdatePolicyOutput::associated_template_and_rule_list): <p>The templates and rules associated with the policy. For AWS WAF policies, this list contains 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list is empty.</p>
22    ///   - [`version(String)`](crate::operation::update_policy::UpdatePolicyOutput::version): <p>The version of the resource.</p>
23    ///   - [`update_token(Option<String>)`](crate::operation::update_policy::UpdatePolicyOutput::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_policy::UpdatePolicyOutput::is_snapshot): <p>Specifies whether the resource is a snapshot of a published version.</p>
25    ///   - [`has_published_version(Option<bool>)`](crate::operation::update_policy::UpdatePolicyOutput::has_published_version): <p>Specifies whether a published version of the resource exists.</p>
26    ///   - [`firewall_type(PolicyFirewallType)`](crate::operation::update_policy::UpdatePolicyOutput::firewall_type): <p>The firewall type associated with the resource.</p>
27    ///   - [`policy_configuration(Option<PolicyConfiguration>)`](crate::operation::update_policy::UpdatePolicyOutput::policy_configuration): <p>The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.</p>
28    ///   - [`updated_at(Option<DateTime>)`](crate::operation::update_policy::UpdatePolicyOutput::updated_at): <p>The time when the resource was last updated.</p>
29    /// - On failure, responds with [`SdkError<UpdatePolicyError>`](crate::operation::update_policy::UpdatePolicyError)
30    pub fn update_policy(&self) -> crate::operation::update_policy::builders::UpdatePolicyFluentBuilder {
31        crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::new(self.handle.clone())
32    }
33}