aws_sdk_mq/operation/create_broker/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_broker::_create_broker_output::CreateBrokerOutputBuilder;
3
4pub use crate::operation::create_broker::_create_broker_input::CreateBrokerInputBuilder;
5
6impl crate::operation::create_broker::builders::CreateBrokerInputBuilder {
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::create_broker::CreateBrokerOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_broker::CreateBrokerError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_broker();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateBroker`.
24///
25/// <p>Creates a broker. Note: This API is asynchronous.</p>
26/// <p>To create a broker, you must either use the AmazonMQFullAccess IAM policy or include the following EC2 permissions in your IAM policy.</p>
27/// <ul>
28/// <li>
29/// <p>ec2:CreateNetworkInterface</p>
30/// <p>This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account.</p></li>
31/// <li>
32/// <p>ec2:CreateNetworkInterfacePermission</p>
33/// <p>This permission is required to attach the ENI to the broker instance.</p></li>
34/// <li>
35/// <p>ec2:DeleteNetworkInterface</p></li>
36/// <li>
37/// <p>ec2:DeleteNetworkInterfacePermission</p></li>
38/// <li>
39/// <p>ec2:DetachNetworkInterface</p></li>
40/// <li>
41/// <p>ec2:DescribeInternetGateways</p></li>
42/// <li>
43/// <p>ec2:DescribeNetworkInterfaces</p></li>
44/// <li>
45/// <p>ec2:DescribeNetworkInterfacePermissions</p></li>
46/// <li>
47/// <p>ec2:DescribeRouteTables</p></li>
48/// <li>
49/// <p>ec2:DescribeSecurityGroups</p></li>
50/// <li>
51/// <p>ec2:DescribeSubnets</p></li>
52/// <li>
53/// <p>ec2:DescribeVpcs</p></li>
54/// </ul>
55/// <p>For more information, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/amazon-mq-setting-up.html#create-iam-user">Create an IAM User and Get Your Amazon Web Services Credentials</a> and <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/connecting-to-amazon-mq.html#never-modify-delete-elastic-network-interface">Never Modify or Delete the Amazon MQ Elastic Network Interface</a> in the <i>Amazon MQ Developer Guide</i>.</p>
56#[derive(::std::clone::Clone, ::std::fmt::Debug)]
57pub struct CreateBrokerFluentBuilder {
58 handle: ::std::sync::Arc<crate::client::Handle>,
59 inner: crate::operation::create_broker::builders::CreateBrokerInputBuilder,
60 config_override: ::std::option::Option<crate::config::Builder>,
61}
62impl
63 crate::client::customize::internal::CustomizableSend<
64 crate::operation::create_broker::CreateBrokerOutput,
65 crate::operation::create_broker::CreateBrokerError,
66 > for CreateBrokerFluentBuilder
67{
68 fn send(
69 self,
70 config_override: crate::config::Builder,
71 ) -> crate::client::customize::internal::BoxFuture<
72 crate::client::customize::internal::SendResult<
73 crate::operation::create_broker::CreateBrokerOutput,
74 crate::operation::create_broker::CreateBrokerError,
75 >,
76 > {
77 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
78 }
79}
80impl CreateBrokerFluentBuilder {
81 /// Creates a new `CreateBrokerFluentBuilder`.
82 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
83 Self {
84 handle,
85 inner: ::std::default::Default::default(),
86 config_override: ::std::option::Option::None,
87 }
88 }
89 /// Access the CreateBroker as a reference.
90 pub fn as_input(&self) -> &crate::operation::create_broker::builders::CreateBrokerInputBuilder {
91 &self.inner
92 }
93 /// Sends the request and returns the response.
94 ///
95 /// If an error occurs, an `SdkError` will be returned with additional details that
96 /// can be matched against.
97 ///
98 /// By default, any retryable failures will be retried twice. Retry behavior
99 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
100 /// set when configuring the client.
101 pub async fn send(
102 self,
103 ) -> ::std::result::Result<
104 crate::operation::create_broker::CreateBrokerOutput,
105 ::aws_smithy_runtime_api::client::result::SdkError<
106 crate::operation::create_broker::CreateBrokerError,
107 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
108 >,
109 > {
110 let input = self
111 .inner
112 .build()
113 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
114 let runtime_plugins = crate::operation::create_broker::CreateBroker::operation_runtime_plugins(
115 self.handle.runtime_plugins.clone(),
116 &self.handle.conf,
117 self.config_override,
118 );
119 crate::operation::create_broker::CreateBroker::orchestrate(&runtime_plugins, input).await
120 }
121
122 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
123 pub fn customize(
124 self,
125 ) -> crate::client::customize::CustomizableOperation<
126 crate::operation::create_broker::CreateBrokerOutput,
127 crate::operation::create_broker::CreateBrokerError,
128 Self,
129 > {
130 crate::client::customize::CustomizableOperation::new(self)
131 }
132 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
133 self.set_config_override(::std::option::Option::Some(config_override.into()));
134 self
135 }
136
137 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
138 self.config_override = config_override;
139 self
140 }
141 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
142 pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
143 self.inner = self.inner.authentication_strategy(input);
144 self
145 }
146 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
147 pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
148 self.inner = self.inner.set_authentication_strategy(input);
149 self
150 }
151 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
152 pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
153 self.inner.get_authentication_strategy()
154 }
155 /// <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. Set to true by default, if no value is specified.</p><note>
156 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
157 /// </note>
158 pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
159 self.inner = self.inner.auto_minor_version_upgrade(input);
160 self
161 }
162 /// <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. Set to true by default, if no value is specified.</p><note>
163 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
164 /// </note>
165 pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
166 self.inner = self.inner.set_auto_minor_version_upgrade(input);
167 self
168 }
169 /// <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. Set to true by default, if no value is specified.</p><note>
170 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
171 /// </note>
172 pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
173 self.inner.get_auto_minor_version_upgrade()
174 }
175 /// <p>Required. The broker's name. This value must be unique in your Amazon Web Services account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters.</p><important>
176 /// <p>Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other Amazon Web Services services, including CloudWatch Logs. Broker names are not intended to be used for private or sensitive data.</p>
177 /// </important>
178 pub fn broker_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.inner = self.inner.broker_name(input.into());
180 self
181 }
182 /// <p>Required. The broker's name. This value must be unique in your Amazon Web Services account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters.</p><important>
183 /// <p>Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other Amazon Web Services services, including CloudWatch Logs. Broker names are not intended to be used for private or sensitive data.</p>
184 /// </important>
185 pub fn set_broker_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_broker_name(input);
187 self
188 }
189 /// <p>Required. The broker's name. This value must be unique in your Amazon Web Services account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters.</p><important>
190 /// <p>Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other Amazon Web Services services, including CloudWatch Logs. Broker names are not intended to be used for private or sensitive data.</p>
191 /// </important>
192 pub fn get_broker_name(&self) -> &::std::option::Option<::std::string::String> {
193 self.inner.get_broker_name()
194 }
195 /// <p>A list of information about the configuration.</p>
196 pub fn configuration(mut self, input: crate::types::ConfigurationId) -> Self {
197 self.inner = self.inner.configuration(input);
198 self
199 }
200 /// <p>A list of information about the configuration.</p>
201 pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ConfigurationId>) -> Self {
202 self.inner = self.inner.set_configuration(input);
203 self
204 }
205 /// <p>A list of information about the configuration.</p>
206 pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ConfigurationId> {
207 self.inner.get_configuration()
208 }
209 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
210 /// <p>We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn't require idempotency.</p>
211 /// </note>
212 pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.inner = self.inner.creator_request_id(input.into());
214 self
215 }
216 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
217 /// <p>We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn't require idempotency.</p>
218 /// </note>
219 pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220 self.inner = self.inner.set_creator_request_id(input);
221 self
222 }
223 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
224 /// <p>We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn't require idempotency.</p>
225 /// </note>
226 pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
227 self.inner.get_creator_request_id()
228 }
229 /// <p>Required. The broker's deployment mode.</p>
230 pub fn deployment_mode(mut self, input: crate::types::DeploymentMode) -> Self {
231 self.inner = self.inner.deployment_mode(input);
232 self
233 }
234 /// <p>Required. The broker's deployment mode.</p>
235 pub fn set_deployment_mode(mut self, input: ::std::option::Option<crate::types::DeploymentMode>) -> Self {
236 self.inner = self.inner.set_deployment_mode(input);
237 self
238 }
239 /// <p>Required. The broker's deployment mode.</p>
240 pub fn get_deployment_mode(&self) -> &::std::option::Option<crate::types::DeploymentMode> {
241 self.inner.get_deployment_mode()
242 }
243 /// <p>Encryption options for the broker.</p>
244 pub fn encryption_options(mut self, input: crate::types::EncryptionOptions) -> Self {
245 self.inner = self.inner.encryption_options(input);
246 self
247 }
248 /// <p>Encryption options for the broker.</p>
249 pub fn set_encryption_options(mut self, input: ::std::option::Option<crate::types::EncryptionOptions>) -> Self {
250 self.inner = self.inner.set_encryption_options(input);
251 self
252 }
253 /// <p>Encryption options for the broker.</p>
254 pub fn get_encryption_options(&self) -> &::std::option::Option<crate::types::EncryptionOptions> {
255 self.inner.get_encryption_options()
256 }
257 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
258 pub fn engine_type(mut self, input: crate::types::EngineType) -> Self {
259 self.inner = self.inner.engine_type(input);
260 self
261 }
262 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
263 pub fn set_engine_type(mut self, input: ::std::option::Option<crate::types::EngineType>) -> Self {
264 self.inner = self.inner.set_engine_type(input);
265 self
266 }
267 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
268 pub fn get_engine_type(&self) -> &::std::option::Option<crate::types::EngineType> {
269 self.inner.get_engine_type()
270 }
271 /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. 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>
272 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273 self.inner = self.inner.engine_version(input.into());
274 self
275 }
276 /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. 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>
277 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278 self.inner = self.inner.set_engine_version(input);
279 self
280 }
281 /// <p>The broker engine version. Defaults to the latest available version for the specified broker engine type. 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>
282 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
283 self.inner.get_engine_version()
284 }
285 /// <p>Required. The broker's instance type.</p>
286 pub fn host_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
287 self.inner = self.inner.host_instance_type(input.into());
288 self
289 }
290 /// <p>Required. The broker's instance type.</p>
291 pub fn set_host_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
292 self.inner = self.inner.set_host_instance_type(input);
293 self
294 }
295 /// <p>Required. The broker's instance type.</p>
296 pub fn get_host_instance_type(&self) -> &::std::option::Option<::std::string::String> {
297 self.inner.get_host_instance_type()
298 }
299 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
300 pub fn ldap_server_metadata(mut self, input: crate::types::LdapServerMetadataInput) -> Self {
301 self.inner = self.inner.ldap_server_metadata(input);
302 self
303 }
304 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
305 pub fn set_ldap_server_metadata(mut self, input: ::std::option::Option<crate::types::LdapServerMetadataInput>) -> Self {
306 self.inner = self.inner.set_ldap_server_metadata(input);
307 self
308 }
309 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
310 pub fn get_ldap_server_metadata(&self) -> &::std::option::Option<crate::types::LdapServerMetadataInput> {
311 self.inner.get_ldap_server_metadata()
312 }
313 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
314 pub fn logs(mut self, input: crate::types::Logs) -> Self {
315 self.inner = self.inner.logs(input);
316 self
317 }
318 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
319 pub fn set_logs(mut self, input: ::std::option::Option<crate::types::Logs>) -> Self {
320 self.inner = self.inner.set_logs(input);
321 self
322 }
323 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
324 pub fn get_logs(&self) -> &::std::option::Option<crate::types::Logs> {
325 self.inner.get_logs()
326 }
327 /// <p>The parameters that determine the WeeklyStartTime.</p>
328 pub fn maintenance_window_start_time(mut self, input: crate::types::WeeklyStartTime) -> Self {
329 self.inner = self.inner.maintenance_window_start_time(input);
330 self
331 }
332 /// <p>The parameters that determine the WeeklyStartTime.</p>
333 pub fn set_maintenance_window_start_time(mut self, input: ::std::option::Option<crate::types::WeeklyStartTime>) -> Self {
334 self.inner = self.inner.set_maintenance_window_start_time(input);
335 self
336 }
337 /// <p>The parameters that determine the WeeklyStartTime.</p>
338 pub fn get_maintenance_window_start_time(&self) -> &::std::option::Option<crate::types::WeeklyStartTime> {
339 self.inner.get_maintenance_window_start_time()
340 }
341 /// <p>Enables connections from applications outside of the VPC that hosts the broker's subnets. Set to false by default, if no value is provided.</p>
342 pub fn publicly_accessible(mut self, input: bool) -> Self {
343 self.inner = self.inner.publicly_accessible(input);
344 self
345 }
346 /// <p>Enables connections from applications outside of the VPC that hosts the broker's subnets. Set to false by default, if no value is provided.</p>
347 pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
348 self.inner = self.inner.set_publicly_accessible(input);
349 self
350 }
351 /// <p>Enables connections from applications outside of the VPC that hosts the broker's subnets. Set to false by default, if no value is provided.</p>
352 pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
353 self.inner.get_publicly_accessible()
354 }
355 ///
356 /// Appends an item to `SecurityGroups`.
357 ///
358 /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
359 ///
360 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
361 pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
362 self.inner = self.inner.security_groups(input.into());
363 self
364 }
365 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
366 pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
367 self.inner = self.inner.set_security_groups(input);
368 self
369 }
370 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
371 pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
372 self.inner.get_security_groups()
373 }
374 /// <p>The broker's storage type.</p>
375 pub fn storage_type(mut self, input: crate::types::BrokerStorageType) -> Self {
376 self.inner = self.inner.storage_type(input);
377 self
378 }
379 /// <p>The broker's storage type.</p>
380 pub fn set_storage_type(mut self, input: ::std::option::Option<crate::types::BrokerStorageType>) -> Self {
381 self.inner = self.inner.set_storage_type(input);
382 self
383 }
384 /// <p>The broker's storage type.</p>
385 pub fn get_storage_type(&self) -> &::std::option::Option<crate::types::BrokerStorageType> {
386 self.inner.get_storage_type()
387 }
388 ///
389 /// Appends an item to `SubnetIds`.
390 ///
391 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
392 ///
393 /// <p>The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones. If you specify more than one subnet, the subnets must be in different Availability Zones. Amazon MQ will not be able to create VPC endpoints for your broker with multiple subnets in the same Availability Zone. A SINGLE_INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ Amazon MQ for ActiveMQ deployment requires two subnets. A CLUSTER_MULTI_AZ Amazon MQ for RabbitMQ deployment has no subnet requirements when deployed with public accessibility. Deployment without public accessibility requires at least one subnet.</p><important>
394 /// <p>If you specify subnets in a <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html">shared VPC</a> for a RabbitMQ broker, the associated VPC to which the specified subnets belong must be owned by your Amazon Web Services account. Amazon MQ will not be able to create VPC endpoints in VPCs that are not owned by your Amazon Web Services account.</p>
395 /// </important>
396 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
397 self.inner = self.inner.subnet_ids(input.into());
398 self
399 }
400 /// <p>The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones. If you specify more than one subnet, the subnets must be in different Availability Zones. Amazon MQ will not be able to create VPC endpoints for your broker with multiple subnets in the same Availability Zone. A SINGLE_INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ Amazon MQ for ActiveMQ deployment requires two subnets. A CLUSTER_MULTI_AZ Amazon MQ for RabbitMQ deployment has no subnet requirements when deployed with public accessibility. Deployment without public accessibility requires at least one subnet.</p><important>
401 /// <p>If you specify subnets in a <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html">shared VPC</a> for a RabbitMQ broker, the associated VPC to which the specified subnets belong must be owned by your Amazon Web Services account. Amazon MQ will not be able to create VPC endpoints in VPCs that are not owned by your Amazon Web Services account.</p>
402 /// </important>
403 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
404 self.inner = self.inner.set_subnet_ids(input);
405 self
406 }
407 /// <p>The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones. If you specify more than one subnet, the subnets must be in different Availability Zones. Amazon MQ will not be able to create VPC endpoints for your broker with multiple subnets in the same Availability Zone. A SINGLE_INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ Amazon MQ for ActiveMQ deployment requires two subnets. A CLUSTER_MULTI_AZ Amazon MQ for RabbitMQ deployment has no subnet requirements when deployed with public accessibility. Deployment without public accessibility requires at least one subnet.</p><important>
408 /// <p>If you specify subnets in a <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html">shared VPC</a> for a RabbitMQ broker, the associated VPC to which the specified subnets belong must be owned by your Amazon Web Services account. Amazon MQ will not be able to create VPC endpoints in VPCs that are not owned by your Amazon Web Services account.</p>
409 /// </important>
410 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
411 self.inner.get_subnet_ids()
412 }
413 ///
414 /// Adds a key-value pair to `Tags`.
415 ///
416 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
417 ///
418 /// <p>Create tags when creating the broker.</p>
419 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
420 self.inner = self.inner.tags(k.into(), v.into());
421 self
422 }
423 /// <p>Create tags when creating the broker.</p>
424 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
425 self.inner = self.inner.set_tags(input);
426 self
427 }
428 /// <p>Create tags when creating the broker.</p>
429 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
430 self.inner.get_tags()
431 }
432 ///
433 /// Appends an item to `Users`.
434 ///
435 /// To override the contents of this collection use [`set_users`](Self::set_users).
436 ///
437 /// <p>The list of broker users (persons or applications) who can access queues and topics. For Amazon MQ for RabbitMQ brokers, an administrative user is required if using simple authentication and authorization. For brokers using OAuth2, this user is optional. When provided, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent broker users are created by making RabbitMQ API calls directly to brokers or via the RabbitMQ web console.</p>
438 pub fn users(mut self, input: crate::types::User) -> Self {
439 self.inner = self.inner.users(input);
440 self
441 }
442 /// <p>The list of broker users (persons or applications) who can access queues and topics. For Amazon MQ for RabbitMQ brokers, an administrative user is required if using simple authentication and authorization. For brokers using OAuth2, this user is optional. When provided, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent broker users are created by making RabbitMQ API calls directly to brokers or via the RabbitMQ web console.</p>
443 pub fn set_users(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::User>>) -> Self {
444 self.inner = self.inner.set_users(input);
445 self
446 }
447 /// <p>The list of broker users (persons or applications) who can access queues and topics. For Amazon MQ for RabbitMQ brokers, an administrative user is required if using simple authentication and authorization. For brokers using OAuth2, this user is optional. When provided, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent broker users are created by making RabbitMQ API calls directly to brokers or via the RabbitMQ web console.</p>
448 pub fn get_users(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::User>> {
449 self.inner.get_users()
450 }
451 /// <p>Defines whether this broker is a part of a data replication pair.</p>
452 pub fn data_replication_mode(mut self, input: crate::types::DataReplicationMode) -> Self {
453 self.inner = self.inner.data_replication_mode(input);
454 self
455 }
456 /// <p>Defines whether this broker is a part of a data replication pair.</p>
457 pub fn set_data_replication_mode(mut self, input: ::std::option::Option<crate::types::DataReplicationMode>) -> Self {
458 self.inner = self.inner.set_data_replication_mode(input);
459 self
460 }
461 /// <p>Defines whether this broker is a part of a data replication pair.</p>
462 pub fn get_data_replication_mode(&self) -> &::std::option::Option<crate::types::DataReplicationMode> {
463 self.inner.get_data_replication_mode()
464 }
465 /// <p>The Amazon Resource Name (ARN) of the primary broker that is used to replicate data from in a data replication pair, and is applied to the replica broker. Must be set when dataReplicationMode is set to CRDR.</p>
466 pub fn data_replication_primary_broker_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
467 self.inner = self.inner.data_replication_primary_broker_arn(input.into());
468 self
469 }
470 /// <p>The Amazon Resource Name (ARN) of the primary broker that is used to replicate data from in a data replication pair, and is applied to the replica broker. Must be set when dataReplicationMode is set to CRDR.</p>
471 pub fn set_data_replication_primary_broker_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
472 self.inner = self.inner.set_data_replication_primary_broker_arn(input);
473 self
474 }
475 /// <p>The Amazon Resource Name (ARN) of the primary broker that is used to replicate data from in a data replication pair, and is applied to the replica broker. Must be set when dataReplicationMode is set to CRDR.</p>
476 pub fn get_data_replication_primary_broker_arn(&self) -> &::std::option::Option<::std::string::String> {
477 self.inner.get_data_replication_primary_broker_arn()
478 }
479}