aws_sdk_mq/operation/create_broker/_create_broker_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Creates a broker using the specified properties.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateBrokerInput {
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. Set to true by default, if no value is specified.</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>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>
14 /// <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>
15 /// </important>
16 pub broker_name: ::std::option::Option<::std::string::String>,
17 /// <p>A list of information about the configuration.</p>
18 pub configuration: ::std::option::Option<crate::types::ConfigurationId>,
19 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
20 /// <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>
21 /// </note>
22 pub creator_request_id: ::std::option::Option<::std::string::String>,
23 /// <p>Required. The broker's deployment mode.</p>
24 pub deployment_mode: ::std::option::Option<crate::types::DeploymentMode>,
25 /// <p>Encryption options for the broker.</p>
26 pub encryption_options: ::std::option::Option<crate::types::EncryptionOptions>,
27 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
28 pub engine_type: ::std::option::Option<crate::types::EngineType>,
29 /// <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>
30 pub engine_version: ::std::option::Option<::std::string::String>,
31 /// <p>Required. The broker's instance type.</p>
32 pub host_instance_type: ::std::option::Option<::std::string::String>,
33 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
34 pub ldap_server_metadata: ::std::option::Option<crate::types::LdapServerMetadataInput>,
35 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
36 pub logs: ::std::option::Option<crate::types::Logs>,
37 /// <p>The parameters that determine the WeeklyStartTime.</p>
38 pub maintenance_window_start_time: ::std::option::Option<crate::types::WeeklyStartTime>,
39 /// <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>
40 pub publicly_accessible: ::std::option::Option<bool>,
41 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
42 pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43 /// <p>The broker's storage type.</p>
44 pub storage_type: ::std::option::Option<crate::types::BrokerStorageType>,
45 /// <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>
46 /// <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>
47 /// </important>
48 pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
49 /// <p>Create tags when creating the broker.</p>
50 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
51 /// <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>
52 pub users: ::std::option::Option<::std::vec::Vec<crate::types::User>>,
53 /// <p>Defines whether this broker is a part of a data replication pair.</p>
54 pub data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
55 /// <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>
56 pub data_replication_primary_broker_arn: ::std::option::Option<::std::string::String>,
57}
58impl CreateBrokerInput {
59 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
60 pub fn authentication_strategy(&self) -> ::std::option::Option<&crate::types::AuthenticationStrategy> {
61 self.authentication_strategy.as_ref()
62 }
63 /// <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>
64 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
65 /// </note>
66 pub fn auto_minor_version_upgrade(&self) -> ::std::option::Option<bool> {
67 self.auto_minor_version_upgrade
68 }
69 /// <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>
70 /// <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>
71 /// </important>
72 pub fn broker_name(&self) -> ::std::option::Option<&str> {
73 self.broker_name.as_deref()
74 }
75 /// <p>A list of information about the configuration.</p>
76 pub fn configuration(&self) -> ::std::option::Option<&crate::types::ConfigurationId> {
77 self.configuration.as_ref()
78 }
79 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
80 /// <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>
81 /// </note>
82 pub fn creator_request_id(&self) -> ::std::option::Option<&str> {
83 self.creator_request_id.as_deref()
84 }
85 /// <p>Required. The broker's deployment mode.</p>
86 pub fn deployment_mode(&self) -> ::std::option::Option<&crate::types::DeploymentMode> {
87 self.deployment_mode.as_ref()
88 }
89 /// <p>Encryption options for the broker.</p>
90 pub fn encryption_options(&self) -> ::std::option::Option<&crate::types::EncryptionOptions> {
91 self.encryption_options.as_ref()
92 }
93 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
94 pub fn engine_type(&self) -> ::std::option::Option<&crate::types::EngineType> {
95 self.engine_type.as_ref()
96 }
97 /// <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>
98 pub fn engine_version(&self) -> ::std::option::Option<&str> {
99 self.engine_version.as_deref()
100 }
101 /// <p>Required. The broker's instance type.</p>
102 pub fn host_instance_type(&self) -> ::std::option::Option<&str> {
103 self.host_instance_type.as_deref()
104 }
105 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
106 pub fn ldap_server_metadata(&self) -> ::std::option::Option<&crate::types::LdapServerMetadataInput> {
107 self.ldap_server_metadata.as_ref()
108 }
109 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
110 pub fn logs(&self) -> ::std::option::Option<&crate::types::Logs> {
111 self.logs.as_ref()
112 }
113 /// <p>The parameters that determine the WeeklyStartTime.</p>
114 pub fn maintenance_window_start_time(&self) -> ::std::option::Option<&crate::types::WeeklyStartTime> {
115 self.maintenance_window_start_time.as_ref()
116 }
117 /// <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>
118 pub fn publicly_accessible(&self) -> ::std::option::Option<bool> {
119 self.publicly_accessible
120 }
121 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
122 ///
123 /// 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()`.
124 pub fn security_groups(&self) -> &[::std::string::String] {
125 self.security_groups.as_deref().unwrap_or_default()
126 }
127 /// <p>The broker's storage type.</p>
128 pub fn storage_type(&self) -> ::std::option::Option<&crate::types::BrokerStorageType> {
129 self.storage_type.as_ref()
130 }
131 /// <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>
132 /// <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>
133 /// </important>
134 ///
135 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
136 pub fn subnet_ids(&self) -> &[::std::string::String] {
137 self.subnet_ids.as_deref().unwrap_or_default()
138 }
139 /// <p>Create tags when creating the broker.</p>
140 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
141 self.tags.as_ref()
142 }
143 /// <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>
144 ///
145 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.users.is_none()`.
146 pub fn users(&self) -> &[crate::types::User] {
147 self.users.as_deref().unwrap_or_default()
148 }
149 /// <p>Defines whether this broker is a part of a data replication pair.</p>
150 pub fn data_replication_mode(&self) -> ::std::option::Option<&crate::types::DataReplicationMode> {
151 self.data_replication_mode.as_ref()
152 }
153 /// <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>
154 pub fn data_replication_primary_broker_arn(&self) -> ::std::option::Option<&str> {
155 self.data_replication_primary_broker_arn.as_deref()
156 }
157}
158impl CreateBrokerInput {
159 /// Creates a new builder-style object to manufacture [`CreateBrokerInput`](crate::operation::create_broker::CreateBrokerInput).
160 pub fn builder() -> crate::operation::create_broker::builders::CreateBrokerInputBuilder {
161 crate::operation::create_broker::builders::CreateBrokerInputBuilder::default()
162 }
163}
164
165/// A builder for [`CreateBrokerInput`](crate::operation::create_broker::CreateBrokerInput).
166#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
167#[non_exhaustive]
168pub struct CreateBrokerInputBuilder {
169 pub(crate) authentication_strategy: ::std::option::Option<crate::types::AuthenticationStrategy>,
170 pub(crate) auto_minor_version_upgrade: ::std::option::Option<bool>,
171 pub(crate) broker_name: ::std::option::Option<::std::string::String>,
172 pub(crate) configuration: ::std::option::Option<crate::types::ConfigurationId>,
173 pub(crate) creator_request_id: ::std::option::Option<::std::string::String>,
174 pub(crate) deployment_mode: ::std::option::Option<crate::types::DeploymentMode>,
175 pub(crate) encryption_options: ::std::option::Option<crate::types::EncryptionOptions>,
176 pub(crate) engine_type: ::std::option::Option<crate::types::EngineType>,
177 pub(crate) engine_version: ::std::option::Option<::std::string::String>,
178 pub(crate) host_instance_type: ::std::option::Option<::std::string::String>,
179 pub(crate) ldap_server_metadata: ::std::option::Option<crate::types::LdapServerMetadataInput>,
180 pub(crate) logs: ::std::option::Option<crate::types::Logs>,
181 pub(crate) maintenance_window_start_time: ::std::option::Option<crate::types::WeeklyStartTime>,
182 pub(crate) publicly_accessible: ::std::option::Option<bool>,
183 pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
184 pub(crate) storage_type: ::std::option::Option<crate::types::BrokerStorageType>,
185 pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
186 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
187 pub(crate) users: ::std::option::Option<::std::vec::Vec<crate::types::User>>,
188 pub(crate) data_replication_mode: ::std::option::Option<crate::types::DataReplicationMode>,
189 pub(crate) data_replication_primary_broker_arn: ::std::option::Option<::std::string::String>,
190}
191impl CreateBrokerInputBuilder {
192 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
193 pub fn authentication_strategy(mut self, input: crate::types::AuthenticationStrategy) -> Self {
194 self.authentication_strategy = ::std::option::Option::Some(input);
195 self
196 }
197 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
198 pub fn set_authentication_strategy(mut self, input: ::std::option::Option<crate::types::AuthenticationStrategy>) -> Self {
199 self.authentication_strategy = input;
200 self
201 }
202 /// <p>Optional. The authentication strategy used to secure the broker. The default is SIMPLE.</p>
203 pub fn get_authentication_strategy(&self) -> &::std::option::Option<crate::types::AuthenticationStrategy> {
204 &self.authentication_strategy
205 }
206 /// <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>
207 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
208 /// </note>
209 pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
210 self.auto_minor_version_upgrade = ::std::option::Option::Some(input);
211 self
212 }
213 /// <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>
214 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
215 /// </note>
216 pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
217 self.auto_minor_version_upgrade = input;
218 self
219 }
220 /// <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>
221 /// <p>Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.</p>
222 /// </note>
223 pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
224 &self.auto_minor_version_upgrade
225 }
226 /// <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>
227 /// <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>
228 /// </important>
229 /// This field is required.
230 pub fn broker_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.broker_name = ::std::option::Option::Some(input.into());
232 self
233 }
234 /// <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>
235 /// <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>
236 /// </important>
237 pub fn set_broker_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238 self.broker_name = input;
239 self
240 }
241 /// <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>
242 /// <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>
243 /// </important>
244 pub fn get_broker_name(&self) -> &::std::option::Option<::std::string::String> {
245 &self.broker_name
246 }
247 /// <p>A list of information about the configuration.</p>
248 pub fn configuration(mut self, input: crate::types::ConfigurationId) -> Self {
249 self.configuration = ::std::option::Option::Some(input);
250 self
251 }
252 /// <p>A list of information about the configuration.</p>
253 pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ConfigurationId>) -> Self {
254 self.configuration = input;
255 self
256 }
257 /// <p>A list of information about the configuration.</p>
258 pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ConfigurationId> {
259 &self.configuration
260 }
261 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
262 /// <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>
263 /// </note>
264 pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265 self.creator_request_id = ::std::option::Option::Some(input.into());
266 self
267 }
268 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
269 /// <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>
270 /// </note>
271 pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.creator_request_id = input;
273 self
274 }
275 /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.</p><note>
276 /// <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>
277 /// </note>
278 pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
279 &self.creator_request_id
280 }
281 /// <p>Required. The broker's deployment mode.</p>
282 /// This field is required.
283 pub fn deployment_mode(mut self, input: crate::types::DeploymentMode) -> Self {
284 self.deployment_mode = ::std::option::Option::Some(input);
285 self
286 }
287 /// <p>Required. The broker's deployment mode.</p>
288 pub fn set_deployment_mode(mut self, input: ::std::option::Option<crate::types::DeploymentMode>) -> Self {
289 self.deployment_mode = input;
290 self
291 }
292 /// <p>Required. The broker's deployment mode.</p>
293 pub fn get_deployment_mode(&self) -> &::std::option::Option<crate::types::DeploymentMode> {
294 &self.deployment_mode
295 }
296 /// <p>Encryption options for the broker.</p>
297 pub fn encryption_options(mut self, input: crate::types::EncryptionOptions) -> Self {
298 self.encryption_options = ::std::option::Option::Some(input);
299 self
300 }
301 /// <p>Encryption options for the broker.</p>
302 pub fn set_encryption_options(mut self, input: ::std::option::Option<crate::types::EncryptionOptions>) -> Self {
303 self.encryption_options = input;
304 self
305 }
306 /// <p>Encryption options for the broker.</p>
307 pub fn get_encryption_options(&self) -> &::std::option::Option<crate::types::EncryptionOptions> {
308 &self.encryption_options
309 }
310 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
311 /// This field is required.
312 pub fn engine_type(mut self, input: crate::types::EngineType) -> Self {
313 self.engine_type = ::std::option::Option::Some(input);
314 self
315 }
316 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
317 pub fn set_engine_type(mut self, input: ::std::option::Option<crate::types::EngineType>) -> Self {
318 self.engine_type = input;
319 self
320 }
321 /// <p>Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.</p>
322 pub fn get_engine_type(&self) -> &::std::option::Option<crate::types::EngineType> {
323 &self.engine_type
324 }
325 /// <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>
326 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
327 self.engine_version = ::std::option::Option::Some(input.into());
328 self
329 }
330 /// <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>
331 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
332 self.engine_version = input;
333 self
334 }
335 /// <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>
336 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
337 &self.engine_version
338 }
339 /// <p>Required. The broker's instance type.</p>
340 /// This field is required.
341 pub fn host_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342 self.host_instance_type = ::std::option::Option::Some(input.into());
343 self
344 }
345 /// <p>Required. The broker's instance type.</p>
346 pub fn set_host_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
347 self.host_instance_type = input;
348 self
349 }
350 /// <p>Required. The broker's instance type.</p>
351 pub fn get_host_instance_type(&self) -> &::std::option::Option<::std::string::String> {
352 &self.host_instance_type
353 }
354 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
355 pub fn ldap_server_metadata(mut self, input: crate::types::LdapServerMetadataInput) -> Self {
356 self.ldap_server_metadata = ::std::option::Option::Some(input);
357 self
358 }
359 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
360 pub fn set_ldap_server_metadata(mut self, input: ::std::option::Option<crate::types::LdapServerMetadataInput>) -> Self {
361 self.ldap_server_metadata = input;
362 self
363 }
364 /// <p>Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.</p>
365 pub fn get_ldap_server_metadata(&self) -> &::std::option::Option<crate::types::LdapServerMetadataInput> {
366 &self.ldap_server_metadata
367 }
368 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
369 pub fn logs(mut self, input: crate::types::Logs) -> Self {
370 self.logs = ::std::option::Option::Some(input);
371 self
372 }
373 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
374 pub fn set_logs(mut self, input: ::std::option::Option<crate::types::Logs>) -> Self {
375 self.logs = input;
376 self
377 }
378 /// <p>Enables Amazon CloudWatch logging for brokers.</p>
379 pub fn get_logs(&self) -> &::std::option::Option<crate::types::Logs> {
380 &self.logs
381 }
382 /// <p>The parameters that determine the WeeklyStartTime.</p>
383 pub fn maintenance_window_start_time(mut self, input: crate::types::WeeklyStartTime) -> Self {
384 self.maintenance_window_start_time = ::std::option::Option::Some(input);
385 self
386 }
387 /// <p>The parameters that determine the WeeklyStartTime.</p>
388 pub fn set_maintenance_window_start_time(mut self, input: ::std::option::Option<crate::types::WeeklyStartTime>) -> Self {
389 self.maintenance_window_start_time = input;
390 self
391 }
392 /// <p>The parameters that determine the WeeklyStartTime.</p>
393 pub fn get_maintenance_window_start_time(&self) -> &::std::option::Option<crate::types::WeeklyStartTime> {
394 &self.maintenance_window_start_time
395 }
396 /// <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>
397 /// This field is required.
398 pub fn publicly_accessible(mut self, input: bool) -> Self {
399 self.publicly_accessible = ::std::option::Option::Some(input);
400 self
401 }
402 /// <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>
403 pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
404 self.publicly_accessible = input;
405 self
406 }
407 /// <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>
408 pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
409 &self.publicly_accessible
410 }
411 /// Appends an item to `security_groups`.
412 ///
413 /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
414 ///
415 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
416 pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
417 let mut v = self.security_groups.unwrap_or_default();
418 v.push(input.into());
419 self.security_groups = ::std::option::Option::Some(v);
420 self
421 }
422 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
423 pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
424 self.security_groups = input;
425 self
426 }
427 /// <p>The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.</p>
428 pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
429 &self.security_groups
430 }
431 /// <p>The broker's storage type.</p>
432 pub fn storage_type(mut self, input: crate::types::BrokerStorageType) -> Self {
433 self.storage_type = ::std::option::Option::Some(input);
434 self
435 }
436 /// <p>The broker's storage type.</p>
437 pub fn set_storage_type(mut self, input: ::std::option::Option<crate::types::BrokerStorageType>) -> Self {
438 self.storage_type = input;
439 self
440 }
441 /// <p>The broker's storage type.</p>
442 pub fn get_storage_type(&self) -> &::std::option::Option<crate::types::BrokerStorageType> {
443 &self.storage_type
444 }
445 /// Appends an item to `subnet_ids`.
446 ///
447 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
448 ///
449 /// <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>
450 /// <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>
451 /// </important>
452 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
453 let mut v = self.subnet_ids.unwrap_or_default();
454 v.push(input.into());
455 self.subnet_ids = ::std::option::Option::Some(v);
456 self
457 }
458 /// <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>
459 /// <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>
460 /// </important>
461 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
462 self.subnet_ids = input;
463 self
464 }
465 /// <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>
466 /// <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>
467 /// </important>
468 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
469 &self.subnet_ids
470 }
471 /// Adds a key-value pair to `tags`.
472 ///
473 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
474 ///
475 /// <p>Create tags when creating the broker.</p>
476 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
477 let mut hash_map = self.tags.unwrap_or_default();
478 hash_map.insert(k.into(), v.into());
479 self.tags = ::std::option::Option::Some(hash_map);
480 self
481 }
482 /// <p>Create tags when creating the broker.</p>
483 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
484 self.tags = input;
485 self
486 }
487 /// <p>Create tags when creating the broker.</p>
488 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
489 &self.tags
490 }
491 /// Appends an item to `users`.
492 ///
493 /// To override the contents of this collection use [`set_users`](Self::set_users).
494 ///
495 /// <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>
496 pub fn users(mut self, input: crate::types::User) -> Self {
497 let mut v = self.users.unwrap_or_default();
498 v.push(input);
499 self.users = ::std::option::Option::Some(v);
500 self
501 }
502 /// <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>
503 pub fn set_users(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::User>>) -> Self {
504 self.users = input;
505 self
506 }
507 /// <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>
508 pub fn get_users(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::User>> {
509 &self.users
510 }
511 /// <p>Defines whether this broker is a part of a data replication pair.</p>
512 pub fn data_replication_mode(mut self, input: crate::types::DataReplicationMode) -> Self {
513 self.data_replication_mode = ::std::option::Option::Some(input);
514 self
515 }
516 /// <p>Defines whether this broker is a part of a data replication pair.</p>
517 pub fn set_data_replication_mode(mut self, input: ::std::option::Option<crate::types::DataReplicationMode>) -> Self {
518 self.data_replication_mode = input;
519 self
520 }
521 /// <p>Defines whether this broker is a part of a data replication pair.</p>
522 pub fn get_data_replication_mode(&self) -> &::std::option::Option<crate::types::DataReplicationMode> {
523 &self.data_replication_mode
524 }
525 /// <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>
526 pub fn data_replication_primary_broker_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
527 self.data_replication_primary_broker_arn = ::std::option::Option::Some(input.into());
528 self
529 }
530 /// <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>
531 pub fn set_data_replication_primary_broker_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
532 self.data_replication_primary_broker_arn = input;
533 self
534 }
535 /// <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>
536 pub fn get_data_replication_primary_broker_arn(&self) -> &::std::option::Option<::std::string::String> {
537 &self.data_replication_primary_broker_arn
538 }
539 /// Consumes the builder and constructs a [`CreateBrokerInput`](crate::operation::create_broker::CreateBrokerInput).
540 pub fn build(
541 self,
542 ) -> ::std::result::Result<crate::operation::create_broker::CreateBrokerInput, ::aws_smithy_types::error::operation::BuildError> {
543 ::std::result::Result::Ok(crate::operation::create_broker::CreateBrokerInput {
544 authentication_strategy: self.authentication_strategy,
545 auto_minor_version_upgrade: self.auto_minor_version_upgrade,
546 broker_name: self.broker_name,
547 configuration: self.configuration,
548 creator_request_id: self.creator_request_id,
549 deployment_mode: self.deployment_mode,
550 encryption_options: self.encryption_options,
551 engine_type: self.engine_type,
552 engine_version: self.engine_version,
553 host_instance_type: self.host_instance_type,
554 ldap_server_metadata: self.ldap_server_metadata,
555 logs: self.logs,
556 maintenance_window_start_time: self.maintenance_window_start_time,
557 publicly_accessible: self.publicly_accessible,
558 security_groups: self.security_groups,
559 storage_type: self.storage_type,
560 subnet_ids: self.subnet_ids,
561 tags: self.tags,
562 users: self.users,
563 data_replication_mode: self.data_replication_mode,
564 data_replication_primary_broker_arn: self.data_replication_primary_broker_arn,
565 })
566 }
567}