aws_sdk_mq/operation/update_broker/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_broker::_update_broker_output::UpdateBrokerOutputBuilder;
3
4pub use crate::operation::update_broker::_update_broker_input::UpdateBrokerInputBuilder;
5
6impl crate::operation::update_broker::builders::UpdateBrokerInputBuilder {
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_broker::UpdateBrokerOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_broker::UpdateBrokerError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_broker();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateBroker`.
24///
25/// <p>Adds a pending configuration change to a broker.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateBrokerFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_broker::builders::UpdateBrokerInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_broker::UpdateBrokerOutput,
35        crate::operation::update_broker::UpdateBrokerError,
36    > for UpdateBrokerFluentBuilder
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_broker::UpdateBrokerOutput,
44            crate::operation::update_broker::UpdateBrokerError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateBrokerFluentBuilder {
51    /// Creates a new `UpdateBrokerFluentBuilder`.
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 UpdateBroker as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_broker::builders::UpdateBrokerInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::update_broker::UpdateBrokerOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_broker::UpdateBrokerError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::update_broker::UpdateBroker::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_broker::UpdateBroker::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::update_broker::UpdateBrokerOutput,
97        crate::operation::update_broker::UpdateBrokerError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
112    pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
113        self.inner = self.inner.authentication_strategy(input);
114        self
115    }
116    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
117    pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
118        self.inner = self.inner.set_authentication_strategy(input);
119        self
120    }
121    /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
122    pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
123        self.inner.get_authentication_strategy()
124    }
125    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p><note>
126    /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
127    /// </note>
128    pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
129        self.inner = self.inner.auto_minor_version_upgrade(input);
130        self
131    }
132    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p><note>
133    /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
134    /// </note>
135    pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
136        self.inner = self.inner.set_auto_minor_version_upgrade(input);
137        self
138    }
139    /// <p>Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot.</p><note>
140    /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
141    /// </note>
142    pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
143        self.inner.get_auto_minor_version_upgrade()
144    }
145    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
146    pub fn broker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.broker_id(input.into());
148        self
149    }
150    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
151    pub fn set_broker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.inner = self.inner.set_broker_id(input);
153        self
154    }
155    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
156    pub fn get_broker_id(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_broker_id()
158    }
159    /// <p>A list of information about the configuration.</p>
160    pub fn configuration(mut self, input: crate::types::ConfigurationId) -> Self {
161        self.inner = self.inner.configuration(input);
162        self
163    }
164    /// <p>A list of information about the configuration.</p>
165    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ConfigurationId>) -> Self {
166        self.inner = self.inner.set_configuration(input);
167        self
168    }
169    /// <p>A list of information about the configuration.</p>
170    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ConfigurationId> {
171        self.inner.get_configuration()
172    }
173    /// <p>The broker engine version. For more information, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p><note>
174    /// <p>When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have autoMinorVersionUpgrade set to true for the broker.</p>
175    /// </note>
176    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.inner = self.inner.engine_version(input.into());
178        self
179    }
180    /// <p>The broker engine version. For more information, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p><note>
181    /// <p>When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have autoMinorVersionUpgrade set to true for the broker.</p>
182    /// </note>
183    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.inner = self.inner.set_engine_version(input);
185        self
186    }
187    /// <p>The broker engine version. For more information, see the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/activemq-version-management.html">ActiveMQ version management</a> and the <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/rabbitmq-version-management.html">RabbitMQ version management</a> sections in the Amazon MQ Developer Guide.</p><note>
188    /// <p>When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have autoMinorVersionUpgrade set to true for the broker.</p>
189    /// </note>
190    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
191        self.inner.get_engine_version()
192    }
193    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
194    pub fn host_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.host_instance_type(input.into());
196        self
197    }
198    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
199    pub fn set_host_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.inner = self.inner.set_host_instance_type(input);
201        self
202    }
203    /// <p>The broker's host instance type to upgrade to. For a list of supported instance types, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker.html#broker-instance-types">Broker instance types</a>.</p>
204    pub fn get_host_instance_type(&self) -> &::std::option::Option<::std::string::String> {
205        self.inner.get_host_instance_type()
206    }
207    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
208    pub fn ldap_server_metadata(mut self, input: crate::types::LdapServerMetadataInput) -> Self {
209        self.inner = self.inner.ldap_server_metadata(input);
210        self
211    }
212    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
213    pub fn set_ldap_server_metadata(mut self, input: ::std::option::Option<crate::types::LdapServerMetadataInput>) -> Self {
214        self.inner = self.inner.set_ldap_server_metadata(input);
215        self
216    }
217    /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
218    pub fn get_ldap_server_metadata(&self) -> &::std::option::Option<crate::types::LdapServerMetadataInput> {
219        self.inner.get_ldap_server_metadata()
220    }
221    /// <p>Enables Amazon CloudWatch logging for brokers.</p>
222    pub fn logs(mut self, input: crate::types::Logs) -> Self {
223        self.inner = self.inner.logs(input);
224        self
225    }
226    /// <p>Enables Amazon CloudWatch logging for brokers.</p>
227    pub fn set_logs(mut self, input: ::std::option::Option<crate::types::Logs>) -> Self {
228        self.inner = self.inner.set_logs(input);
229        self
230    }
231    /// <p>Enables Amazon CloudWatch logging for brokers.</p>
232    pub fn get_logs(&self) -> &::std::option::Option<crate::types::Logs> {
233        self.inner.get_logs()
234    }
235    /// <p>The parameters that determine the WeeklyStartTime.</p>
236    pub fn maintenance_window_start_time(mut self, input: crate::types::WeeklyStartTime) -> Self {
237        self.inner = self.inner.maintenance_window_start_time(input);
238        self
239    }
240    /// <p>The parameters that determine the WeeklyStartTime.</p>
241    pub fn set_maintenance_window_start_time(mut self, input: ::std::option::Option<crate::types::WeeklyStartTime>) -> Self {
242        self.inner = self.inner.set_maintenance_window_start_time(input);
243        self
244    }
245    /// <p>The parameters that determine the WeeklyStartTime.</p>
246    pub fn get_maintenance_window_start_time(&self) -> &::std::option::Option<crate::types::WeeklyStartTime> {
247        self.inner.get_maintenance_window_start_time()
248    }
249    ///
250    /// Appends an item to `SecurityGroups`.
251    ///
252    /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
253    ///
254    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
255    pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256        self.inner = self.inner.security_groups(input.into());
257        self
258    }
259    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
260    pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
261        self.inner = self.inner.set_security_groups(input);
262        self
263    }
264    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
265    pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
266        self.inner.get_security_groups()
267    }
268    /// <p>Defines whether this broker is a part of a data replication pair.</p>
269    pub fn data_replication_mode(mut self, input: crate::types::DataReplicationMode) -> Self {
270        self.inner = self.inner.data_replication_mode(input);
271        self
272    }
273    /// <p>Defines whether this broker is a part of a data replication pair.</p>
274    pub fn set_data_replication_mode(mut self, input: ::std::option::Option<crate::types::DataReplicationMode>) -> Self {
275        self.inner = self.inner.set_data_replication_mode(input);
276        self
277    }
278    /// <p>Defines whether this broker is a part of a data replication pair.</p>
279    pub fn get_data_replication_mode(&self) -> &::std::option::Option<crate::types::DataReplicationMode> {
280        self.inner.get_data_replication_mode()
281    }
282}