aws_sdk_networkfirewall/operation/update_firewall_encryption_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_firewall_encryption_configuration::_update_firewall_encryption_configuration_output::UpdateFirewallEncryptionConfigurationOutputBuilder;
3
4pub use crate::operation::update_firewall_encryption_configuration::_update_firewall_encryption_configuration_input::UpdateFirewallEncryptionConfigurationInputBuilder;
5
6impl crate::operation::update_firewall_encryption_configuration::builders::UpdateFirewallEncryptionConfigurationInputBuilder {
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_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_firewall_encryption_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateFirewallEncryptionConfiguration`.
24///
25/// <p>A complex type that contains settings for encryption of your firewall resources.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateFirewallEncryptionConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_firewall_encryption_configuration::builders::UpdateFirewallEncryptionConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationOutput,
35        crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
36    > for UpdateFirewallEncryptionConfigurationFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationOutput,
44            crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateFirewallEncryptionConfigurationFluentBuilder {
51    /// Creates a new `UpdateFirewallEncryptionConfigurationFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the UpdateFirewallEncryptionConfiguration as a reference.
60    pub fn as_input(
61        &self,
62    ) -> &crate::operation::update_firewall_encryption_configuration::builders::UpdateFirewallEncryptionConfigurationInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins =
87            crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfiguration::operation_runtime_plugins(
88                self.handle.runtime_plugins.clone(),
89                &self.handle.conf,
90                self.config_override,
91            );
92        crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfiguration::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationOutput,
100        crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
115    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
116    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new token. Reapply your changes as needed, then try the operation again using the new token.</p>
117    pub fn update_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.inner = self.inner.update_token(input.into());
119        self
120    }
121    /// <p>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
122    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
123    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new token. Reapply your changes as needed, then try the operation again using the new token.</p>
124    pub fn set_update_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_update_token(input);
126        self
127    }
128    /// <p>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
129    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
130    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new token. Reapply your changes as needed, then try the operation again using the new token.</p>
131    pub fn get_update_token(&self) -> &::std::option::Option<::std::string::String> {
132        self.inner.get_update_token()
133    }
134    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
135    pub fn firewall_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.firewall_arn(input.into());
137        self
138    }
139    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
140    pub fn set_firewall_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_firewall_arn(input);
142        self
143    }
144    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
145    pub fn get_firewall_arn(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_firewall_arn()
147    }
148    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
149    pub fn firewall_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.inner = self.inner.firewall_name(input.into());
151        self
152    }
153    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
154    pub fn set_firewall_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.inner = self.inner.set_firewall_name(input);
156        self
157    }
158    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
159    pub fn get_firewall_name(&self) -> &::std::option::Option<::std::string::String> {
160        self.inner.get_firewall_name()
161    }
162    /// <p>A complex type that contains optional Amazon Web Services Key Management Service (KMS) encryption settings for your Network Firewall resources. Your data is encrypted by default with an Amazon Web Services owned key that Amazon Web Services owns and manages for you. You can use either the Amazon Web Services owned key, or provide your own customer managed key. To learn more about KMS encryption of your Network Firewall resources, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html">Encryption at rest with Amazon Web Services Key Managment Service</a> in the <i>Network Firewall Developer Guide</i>.</p>
163    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
164        self.inner = self.inner.encryption_configuration(input);
165        self
166    }
167    /// <p>A complex type that contains optional Amazon Web Services Key Management Service (KMS) encryption settings for your Network Firewall resources. Your data is encrypted by default with an Amazon Web Services owned key that Amazon Web Services owns and manages for you. You can use either the Amazon Web Services owned key, or provide your own customer managed key. To learn more about KMS encryption of your Network Firewall resources, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html">Encryption at rest with Amazon Web Services Key Managment Service</a> in the <i>Network Firewall Developer Guide</i>.</p>
168    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
169        self.inner = self.inner.set_encryption_configuration(input);
170        self
171    }
172    /// <p>A complex type that contains optional Amazon Web Services Key Management Service (KMS) encryption settings for your Network Firewall resources. Your data is encrypted by default with an Amazon Web Services owned key that Amazon Web Services owns and manages for you. You can use either the Amazon Web Services owned key, or provide your own customer managed key. To learn more about KMS encryption of your Network Firewall resources, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html">Encryption at rest with Amazon Web Services Key Managment Service</a> in the <i>Network Firewall Developer Guide</i>.</p>
173    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
174        self.inner.get_encryption_configuration()
175    }
176}