create_broker
¶
create_broker(
*,
config_overrides: Optional[mqClientConfig] = None,
authentication_strategy: Optional[AuthenticationStrategy] = None,
auto_minor_version_upgrade: Optional[__boolean] = None,
broker_name: Optional[__string] = None,
configuration: Optional[ConfigurationId] = None,
creator_request_id: Optional[__string] = None,
deployment_mode: Optional[DeploymentMode] = None,
encryption_options: Optional[EncryptionOptions] = None,
engine_type: Optional[EngineType] = None,
engine_version: Optional[__string] = None,
host_instance_type: Optional[__string] = None,
ldap_server_metadata: Optional[LdapServerMetadataInput] = None,
logs: Optional[Logs] = None,
maintenance_window_start_time: Optional[WeeklyStartTime] = None,
publicly_accessible: Optional[__boolean] = None,
security_groups: Optional[__listOf__string] = None,
storage_size: Optional[__integer] = None,
storage_type: Optional[BrokerStorageType] = None,
subnet_ids: Optional[__listOf__string] = None,
tags: Optional[__mapOf__string] = None,
users: Optional[__listOfUser] = None,
data_replication_mode: Optional[DataReplicationMode] = None,
data_replication_primary_broker_arn: Optional[__string] = None,
) -> CreateBrokerResponse
Creates a broker. Note: This API is asynchronous.
To create a broker, you must either use the AmazonMQFullAccess IAM policy or include the following EC2 permissions in your IAM policy.
ec2:CreateNetworkInterface
This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account.
ec2:CreateNetworkInterfacePermission
This permission is required to attach the ENI to the broker instance.
ec2:DeleteNetworkInterface
ec2:DeleteNetworkInterfacePermission
ec2:DetachNetworkInterface
ec2:DescribeInternetGateways
ec2:DescribeNetworkInterfaces
ec2:DescribeNetworkInterfacePermissions
ec2:DescribeRouteTables
ec2:DescribeSecurityGroups
ec2:DescribeSubnets
ec2:DescribeVpcs
For more information, see Create an IAM User and Get Your Amazon Web Services Credentials and Never Modify or Delete the Amazon MQ Elastic Network Interface in the Amazon MQ Developer Guide.
Parameters:
-
authentication_strategy(Optional[AuthenticationStrategy], default:None) –Optional. The authentication strategy used to secure the broker. The default is SIMPLE.
-
auto_minor_version_upgrade(Optional[__boolean], default:None) –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.
Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above.
-
broker_name(Optional[__string], default:None) –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.
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.
-
configuration(Optional[ConfigurationId], default:None) –A list of information about the configuration.
-
creator_request_id(Optional[__string], default:None) –The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action.
We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn't require idempotency.
-
deployment_mode(Optional[DeploymentMode], default:None) –Required. The broker's deployment mode.
-
encryption_options(Optional[EncryptionOptions], default:None) –Encryption options for the broker.
-
engine_type(Optional[EngineType], default:None) –Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
-
engine_version(Optional[__string], default:None) –The broker engine version. Defaults to the latest available version for the specified broker engine type. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
-
host_instance_type(Optional[__string], default:None) –Required. The broker's instance type.
-
ldap_server_metadata(Optional[LdapServerMetadataInput], default:None) –Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
-
logs(Optional[Logs], default:None) –Enables Amazon CloudWatch logging for brokers.
-
maintenance_window_start_time(Optional[WeeklyStartTime], default:None) –The parameters that determine the WeeklyStartTime.
-
publicly_accessible(Optional[__boolean], default:None) –Enables connections from applications outside of the VPC that hosts the broker's subnets. Set to false by default, if no value is provided.
-
security_groups(Optional[__listOf__string], default:None) –The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
-
storage_size(Optional[__integer], default:None) –The broker's storage size in GB.
-
storage_type(Optional[BrokerStorageType], default:None) –The broker's storage type.
-
subnet_ids(Optional[__listOf__string], default:None) –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.
If you specify subnets in a shared VPC 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.
-
tags(Optional[__mapOf__string], default:None) –Create tags when creating the broker.
-
users(Optional[__listOfUser], default:None) –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.
-
data_replication_mode(Optional[DataReplicationMode], default:None) –Defines whether this broker is a part of a data replication pair.
-
data_replication_primary_broker_arn(Optional[__string], default:None) –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.
Raises:
-
BadRequestException–Returns information about an error.
-
ConflictException–Returns information about an error.
-
ForbiddenException–Returns information about an error.
-
InternalServerErrorException–Returns information about an error.
-
UnauthorizedException–Returns information about an error.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_mq/_services/mq.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |