aws_sdk_networkfirewall/operation/update_logging_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_logging_configuration::_update_logging_configuration_output::UpdateLoggingConfigurationOutputBuilder;
3
4pub use crate::operation::update_logging_configuration::_update_logging_configuration_input::UpdateLoggingConfigurationInputBuilder;
5
6impl crate::operation::update_logging_configuration::builders::UpdateLoggingConfigurationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_logging_configuration::UpdateLoggingConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_logging_configuration::UpdateLoggingConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_logging_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateLoggingConfiguration`.
24///
25/// <p>Sets the logging configuration for the specified firewall.</p>
26/// <p>To change the logging configuration, retrieve the <code>LoggingConfiguration</code> by calling <code>DescribeLoggingConfiguration</code>, then change it and provide the modified object to this update call. You must change the logging configuration one <code>LogDestinationConfig</code> at a time inside the retrieved <code>LoggingConfiguration</code> object.</p>
27/// <p>You can perform only one of the following actions in any call to <code>UpdateLoggingConfiguration</code>:</p>
28/// <ul>
29/// <li>
30/// <p>Create a new log destination object by adding a single <code>LogDestinationConfig</code> array element to <code>LogDestinationConfigs</code>.</p></li>
31/// <li>
32/// <p>Delete a log destination object by removing a single <code>LogDestinationConfig</code> array element from <code>LogDestinationConfigs</code>.</p></li>
33/// <li>
34/// <p>Change the <code>LogDestination</code> setting in a single <code>LogDestinationConfig</code> array element.</p></li>
35/// </ul>
36/// <p>You can't change the <code>LogDestinationType</code> or <code>LogType</code> in a <code>LogDestinationConfig</code>. To change these settings, delete the existing <code>LogDestinationConfig</code> object and create a new one, using two separate calls to this update operation.</p>
37#[derive(::std::clone::Clone, ::std::fmt::Debug)]
38pub struct UpdateLoggingConfigurationFluentBuilder {
39    handle: ::std::sync::Arc<crate::client::Handle>,
40    inner: crate::operation::update_logging_configuration::builders::UpdateLoggingConfigurationInputBuilder,
41    config_override: ::std::option::Option<crate::config::Builder>,
42}
43impl
44    crate::client::customize::internal::CustomizableSend<
45        crate::operation::update_logging_configuration::UpdateLoggingConfigurationOutput,
46        crate::operation::update_logging_configuration::UpdateLoggingConfigurationError,
47    > for UpdateLoggingConfigurationFluentBuilder
48{
49    fn send(
50        self,
51        config_override: crate::config::Builder,
52    ) -> crate::client::customize::internal::BoxFuture<
53        crate::client::customize::internal::SendResult<
54            crate::operation::update_logging_configuration::UpdateLoggingConfigurationOutput,
55            crate::operation::update_logging_configuration::UpdateLoggingConfigurationError,
56        >,
57    > {
58        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59    }
60}
61impl UpdateLoggingConfigurationFluentBuilder {
62    /// Creates a new `UpdateLoggingConfigurationFluentBuilder`.
63    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
64        Self {
65            handle,
66            inner: ::std::default::Default::default(),
67            config_override: ::std::option::Option::None,
68        }
69    }
70    /// Access the UpdateLoggingConfiguration as a reference.
71    pub fn as_input(&self) -> &crate::operation::update_logging_configuration::builders::UpdateLoggingConfigurationInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::update_logging_configuration::UpdateLoggingConfigurationOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::update_logging_configuration::UpdateLoggingConfigurationError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins = crate::operation::update_logging_configuration::UpdateLoggingConfiguration::operation_runtime_plugins(
96            self.handle.runtime_plugins.clone(),
97            &self.handle.conf,
98            self.config_override,
99        );
100        crate::operation::update_logging_configuration::UpdateLoggingConfiguration::orchestrate(&runtime_plugins, input).await
101    }
102
103    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104    pub fn customize(
105        self,
106    ) -> crate::client::customize::CustomizableOperation<
107        crate::operation::update_logging_configuration::UpdateLoggingConfigurationOutput,
108        crate::operation::update_logging_configuration::UpdateLoggingConfigurationError,
109        Self,
110    > {
111        crate::client::customize::CustomizableOperation::new(self)
112    }
113    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114        self.set_config_override(::std::option::Option::Some(config_override.into()));
115        self
116    }
117
118    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119        self.config_override = config_override;
120        self
121    }
122    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
123    /// <p>You must specify the ARN or the name, and you can specify both.</p>
124    pub fn firewall_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.inner = self.inner.firewall_arn(input.into());
126        self
127    }
128    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
129    /// <p>You must specify the ARN or the name, and you can specify both.</p>
130    pub fn set_firewall_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_firewall_arn(input);
132        self
133    }
134    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
135    /// <p>You must specify the ARN or the name, and you can specify both.</p>
136    pub fn get_firewall_arn(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_firewall_arn()
138    }
139    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
140    /// <p>You must specify the ARN or the name, and you can specify both.</p>
141    pub fn firewall_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.inner = self.inner.firewall_name(input.into());
143        self
144    }
145    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
146    /// <p>You must specify the ARN or the name, and you can specify both.</p>
147    pub fn set_firewall_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.inner = self.inner.set_firewall_name(input);
149        self
150    }
151    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
152    /// <p>You must specify the ARN or the name, and you can specify both.</p>
153    pub fn get_firewall_name(&self) -> &::std::option::Option<::std::string::String> {
154        self.inner.get_firewall_name()
155    }
156    /// <p>Defines how Network Firewall performs logging for a firewall. If you omit this setting, Network Firewall disables logging for the firewall.</p>
157    pub fn logging_configuration(mut self, input: crate::types::LoggingConfiguration) -> Self {
158        self.inner = self.inner.logging_configuration(input);
159        self
160    }
161    /// <p>Defines how Network Firewall performs logging for a firewall. If you omit this setting, Network Firewall disables logging for the firewall.</p>
162    pub fn set_logging_configuration(mut self, input: ::std::option::Option<crate::types::LoggingConfiguration>) -> Self {
163        self.inner = self.inner.set_logging_configuration(input);
164        self
165    }
166    /// <p>Defines how Network Firewall performs logging for a firewall. If you omit this setting, Network Firewall disables logging for the firewall.</p>
167    pub fn get_logging_configuration(&self) -> &::std::option::Option<crate::types::LoggingConfiguration> {
168        self.inner.get_logging_configuration()
169    }
170    /// <p>A boolean that lets you enable or disable the detailed firewall monitoring dashboard on the firewall.</p>
171    /// <p>The monitoring dashboard provides comprehensive visibility into your firewall's flow logs and alert logs. After you enable detailed monitoring, you can access these dashboards directly from the <b>Monitoring</b> page of the Network Firewall console.</p>
172    /// <p>Specify <code>TRUE</code> to enable the the detailed monitoring dashboard on the firewall. Specify <code>FALSE</code> to disable the the detailed monitoring dashboard on the firewall.</p>
173    pub fn enable_monitoring_dashboard(mut self, input: bool) -> Self {
174        self.inner = self.inner.enable_monitoring_dashboard(input);
175        self
176    }
177    /// <p>A boolean that lets you enable or disable the detailed firewall monitoring dashboard on the firewall.</p>
178    /// <p>The monitoring dashboard provides comprehensive visibility into your firewall's flow logs and alert logs. After you enable detailed monitoring, you can access these dashboards directly from the <b>Monitoring</b> page of the Network Firewall console.</p>
179    /// <p>Specify <code>TRUE</code> to enable the the detailed monitoring dashboard on the firewall. Specify <code>FALSE</code> to disable the the detailed monitoring dashboard on the firewall.</p>
180    pub fn set_enable_monitoring_dashboard(mut self, input: ::std::option::Option<bool>) -> Self {
181        self.inner = self.inner.set_enable_monitoring_dashboard(input);
182        self
183    }
184    /// <p>A boolean that lets you enable or disable the detailed firewall monitoring dashboard on the firewall.</p>
185    /// <p>The monitoring dashboard provides comprehensive visibility into your firewall's flow logs and alert logs. After you enable detailed monitoring, you can access these dashboards directly from the <b>Monitoring</b> page of the Network Firewall console.</p>
186    /// <p>Specify <code>TRUE</code> to enable the the detailed monitoring dashboard on the firewall. Specify <code>FALSE</code> to disable the the detailed monitoring dashboard on the firewall.</p>
187    pub fn get_enable_monitoring_dashboard(&self) -> &::std::option::Option<bool> {
188        self.inner.get_enable_monitoring_dashboard()
189    }
190}