aws_sdk_mq/operation/update_broker/_update_broker_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Updates the broker using the specified properties.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateBrokerInput {
7 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
8 pub authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
9 /// <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>
10 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
11 /// </note>
12 pub auto_minor_version_upgrade: ::std::option::Option<bool>,
13 /// <p>The unique ID that Amazon MQ generates for the broker.</p>
14 pub broker_id: ::std::option::Option<::std::string::String>,
15 /// <p>A list of information about the configuration.</p>
16 pub configuration: ::std::option::Option<crate::types::ConfigurationId>,
17 /// <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>
18 /// <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>
19 /// </note>
20 pub engine_version: ::std::option::Option<::std::string::String>,
21 /// <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>
22 pub host_instance_type: ::std::option::Option<::std::string::String>,
23 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
24 pub ldap_server_metadata: ::std::option::Option<crate::types::LdapServerMetadataInput>,
25 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
26 pub logs: ::std::option::Option<crate::types::Logs>,
27 /// <p>The parameters that determine the WeeklyStartTime.</p>
28 pub maintenance_window_start_time: ::std::option::Option<crate::types::WeeklyStartTime>,
29 /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
30 pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
31 /// <p>Defines whether this broker is a part of a data replication pair.</p>
32 pub data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
33}
34impl UpdateBrokerInput {
35 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
36 pub fn authentication_strategy(&self) -> ::std::option::Option<&crate::types::AuthenticationStrategy> {
37 self.authentication_strategy.as_ref()
38 }
39 /// <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>
40 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
41 /// </note>
42 pub fn auto_minor_version_upgrade(&self) -> ::std::option::Option<bool> {
43 self.auto_minor_version_upgrade
44 }
45 /// <p>The unique ID that Amazon MQ generates for the broker.</p>
46 pub fn broker_id(&self) -> ::std::option::Option<&str> {
47 self.broker_id.as_deref()
48 }
49 /// <p>A list of information about the configuration.</p>
50 pub fn configuration(&self) -> ::std::option::Option<&crate::types::ConfigurationId> {
51 self.configuration.as_ref()
52 }
53 /// <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>
54 /// <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>
55 /// </note>
56 pub fn engine_version(&self) -> ::std::option::Option<&str> {
57 self.engine_version.as_deref()
58 }
59 /// <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>
60 pub fn host_instance_type(&self) -> ::std::option::Option<&str> {
61 self.host_instance_type.as_deref()
62 }
63 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
64 pub fn ldap_server_metadata(&self) -> ::std::option::Option<&crate::types::LdapServerMetadataInput> {
65 self.ldap_server_metadata.as_ref()
66 }
67 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
68 pub fn logs(&self) -> ::std::option::Option<&crate::types::Logs> {
69 self.logs.as_ref()
70 }
71 /// <p>The parameters that determine the WeeklyStartTime.</p>
72 pub fn maintenance_window_start_time(&self) -> ::std::option::Option<&crate::types::WeeklyStartTime> {
73 self.maintenance_window_start_time.as_ref()
74 }
75 /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
76 ///
77 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_groups.is_none()`.
78 pub fn security_groups(&self) -> &[::std::string::String] {
79 self.security_groups.as_deref().unwrap_or_default()
80 }
81 /// <p>Defines whether this broker is a part of a data replication pair.</p>
82 pub fn data_replication_mode(&self) -> ::std::option::Option<&crate::types::DataReplicationMode> {
83 self.data_replication_mode.as_ref()
84 }
85}
86impl UpdateBrokerInput {
87 /// Creates a new builder-style object to manufacture [`UpdateBrokerInput`](crate::operation::update_broker::UpdateBrokerInput).
88 pub fn builder() -> crate::operation::update_broker::builders::UpdateBrokerInputBuilder {
89 crate::operation::update_broker::builders::UpdateBrokerInputBuilder::default()
90 }
91}
92
93/// A builder for [`UpdateBrokerInput`](crate::operation::update_broker::UpdateBrokerInput).
94#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
95#[non_exhaustive]
96pub struct UpdateBrokerInputBuilder {
97 pub(crate) authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
98 pub(crate) auto_minor_version_upgrade: ::std::option::Option<bool>,
99 pub(crate) broker_id: ::std::option::Option<::std::string::String>,
100 pub(crate) configuration: ::std::option::Option<crate::types::ConfigurationId>,
101 pub(crate) engine_version: ::std::option::Option<::std::string::String>,
102 pub(crate) host_instance_type: ::std::option::Option<::std::string::String>,
103 pub(crate) ldap_server_metadata: ::std::option::Option<crate::types::LdapServerMetadataInput>,
104 pub(crate) logs: ::std::option::Option<crate::types::Logs>,
105 pub(crate) maintenance_window_start_time: ::std::option::Option<crate::types::WeeklyStartTime>,
106 pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
107 pub(crate) data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
108}
109impl UpdateBrokerInputBuilder {
110 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
111 pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
112 self.authentication_strategy = ::std::option::Option::Some(input);
113 self
114 }
115 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
116 pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
117 self.authentication_strategy = input;
118 self
119 }
120 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
121 pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
122 &self.authentication_strategy
123 }
124 /// <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>
125 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
126 /// </note>
127 pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
128 self.auto_minor_version_upgrade = ::std::option::Option::Some(input);
129 self
130 }
131 /// <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>
132 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
133 /// </note>
134 pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
135 self.auto_minor_version_upgrade = input;
136 self
137 }
138 /// <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>
139 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
140 /// </note>
141 pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
142 &self.auto_minor_version_upgrade
143 }
144 /// <p>The unique ID that Amazon MQ generates for the broker.</p>
145 /// This field is required.
146 pub fn broker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.broker_id = ::std::option::Option::Some(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.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.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.configuration = ::std::option::Option::Some(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.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.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.engine_version = ::std::option::Option::Some(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.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.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.host_instance_type = ::std::option::Option::Some(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.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.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.ldap_server_metadata = ::std::option::Option::Some(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.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.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.logs = ::std::option::Option::Some(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.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.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.maintenance_window_start_time = ::std::option::Option::Some(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.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.maintenance_window_start_time
248 }
249 /// Appends an item to `security_groups`.
250 ///
251 /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
252 ///
253 /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
254 pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255 let mut v = self.security_groups.unwrap_or_default();
256 v.push(input.into());
257 self.security_groups = ::std::option::Option::Some(v);
258 self
259 }
260 /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
261 pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
262 self.security_groups = input;
263 self
264 }
265 /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
266 pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
267 &self.security_groups
268 }
269 /// <p>Defines whether this broker is a part of a data replication pair.</p>
270 pub fn data_replication_mode(mut self, input: crate::types::DataReplicationMode) -> Self {
271 self.data_replication_mode = ::std::option::Option::Some(input);
272 self
273 }
274 /// <p>Defines whether this broker is a part of a data replication pair.</p>
275 pub fn set_data_replication_mode(mut self, input: ::std::option::Option<crate::types::DataReplicationMode>) -> Self {
276 self.data_replication_mode = input;
277 self
278 }
279 /// <p>Defines whether this broker is a part of a data replication pair.</p>
280 pub fn get_data_replication_mode(&self) -> &::std::option::Option<crate::types::DataReplicationMode> {
281 &self.data_replication_mode
282 }
283 /// Consumes the builder and constructs a [`UpdateBrokerInput`](crate::operation::update_broker::UpdateBrokerInput).
284 pub fn build(
285 self,
286 ) -> ::std::result::Result<crate::operation::update_broker::UpdateBrokerInput, ::aws_smithy_types::error::operation::BuildError> {
287 ::std::result::Result::Ok(crate::operation::update_broker::UpdateBrokerInput {
288 authentication_strategy: self.authentication_strategy,
289 auto_minor_version_upgrade: self.auto_minor_version_upgrade,
290 broker_id: self.broker_id,
291 configuration: self.configuration,
292 engine_version: self.engine_version,
293 host_instance_type: self.host_instance_type,
294 ldap_server_metadata: self.ldap_server_metadata,
295 logs: self.logs,
296 maintenance_window_start_time: self.maintenance_window_start_time,
297 security_groups: self.security_groups,
298 data_replication_mode: self.data_replication_mode,
299 })
300 }
301}