Amazon MQ
REST API Reference

Brokers

This is a collection of brokers. A broker is a message broker environment running on Amazon MQ. It is the basic building block of Amazon MQ. For more information, see Broker Instance Types in the Amazon MQ Developer Guide.

URI

/v1/brokers

HTTP Methods

GET

Operation ID: ListBrokers

Returns a list of all brokers.

Query Parameters

Name Type Required Description
nextToken String False

The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.

maxResults String False

The maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.

Responses

Status Code Response Model Description
200 ListBrokersOutput

HTTP Status Code 200: OK.

400 Error

HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.

403 Error

HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.

500 Error

HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.

POST

Operation ID: CreateBroker

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.

For more information, see Create an IAM User and Get Your AWS Credentials and Never Modify or Delete the Amazon MQ Elastic Network Interface in the Amazon MQ Developer Guide.

  • 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

Responses

Status Code Response Model Description
200 CreateBrokerOutput

HTTP Status Code 200: OK.

400 Error

HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.

401 Error

HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.

403 Error

HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.

409 Error

HTTP Status Code 409: Conflict. This broker name already exists. Retry your request with another name.

500 Error

HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.

Schemas

Request Bodies

Example POST

{ "engineVersion": "string", "deploymentMode": enum, "maintenanceWindowStartTime": { "dayOfWeek": enum, "timeZone": "string", "timeOfDay": "string" }, "configuration": { "id": "string", "revision": integer }, "engineType": enum, "hostInstanceType": "string", "users": [ { "password": "string", "groups": [ "string" ], "consoleAccess": boolean, "username": "string" } ], "tags": { }, "creatorRequestId": "string", "publiclyAccessible": boolean, "securityGroups": [ "string" ], "brokerName": "string", "logs": { "general": boolean, "audit": boolean }, "autoMinorVersionUpgrade": boolean, "subnetIds": [ "string" ] }

Response Bodies

Example ListBrokersOutput

{ "brokerSummaries": [ { "brokerArn": "string", "brokerId": "string", "deploymentMode": enum, "created": "string", "brokerState": enum, "brokerName": "string", "hostInstanceType": "string" } ], "nextToken": "string" }

Example CreateBrokerOutput

{ "brokerArn": "string", "brokerId": "string" }

Example Error

{ "errorAttribute": "string", "message": "string" }

Properties

BrokerState

The status of the broker.

  • CREATION_IN_PROGRESS

  • CREATION_FAILED

  • DELETION_IN_PROGRESS

  • RUNNING

  • REBOOT_IN_PROGRESS

BrokerSummary

Returns information about all brokers.

Property Type Required Description
brokerArn

string

False

The Amazon Resource Name (ARN) of the broker.

brokerId

string

False

The unique ID that Amazon MQ generates for the broker.

deploymentMode

DeploymentMode

True

Required. The deployment mode of the broker.

created

string

Format: date-time

False

The time when the broker was created.

brokerState

BrokerState

False

The status of the broker.

brokerName

string

False

The name of the broker. This value must be unique in your AWS 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.

hostInstanceType

string

False

The broker's instance type.

ConfigurationId

A list of information about the configuration.

Property Type Required Description
id

string

True

Required. The unique ID that Amazon MQ generates for the configuration.

revision

integer

False

The revision number of the configuration.

CreateBrokerInput

Creates a broker.

Property Type Required Description
engineVersion

string

True

Required. The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html

deploymentMode

DeploymentMode

True

Required. The deployment mode of the broker.

maintenanceWindowStartTime

WeeklyStartTime

False

The parameters that determine the WeeklyStartTime.

configuration

ConfigurationId

False

A list of information about the configuration.

engineType

EngineType

True

Required. The type of broker engine. Note: Currently, Amazon MQ supports only ACTIVEMQ.

hostInstanceType

string

True

Required. The broker's instance type.

users

Array of type User

False

Required. The list of ActiveMQ users (persons or applications) who can access queues and topics. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.

tags

object

False

Create tags when creating the broker.

creatorRequestId

string

False

The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action. Note: We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn't require idempotency.

publiclyAccessible

boolean

True

Required. Enables connections from applications outside of the VPC that hosts the broker's subnets.

securityGroups

Array of type string

False

The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.

brokerName

string

True

Required. The name of the broker. This value must be unique in your AWS 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.

logs

Logs

False

Enables Amazon CloudWatch logging for brokers.

autoMinorVersionUpgrade

boolean

True

Required. Enables automatic upgrades to new minor versions for brokers, as Apache releases the versions. The automatic upgrades occur during the maintenance window of the broker or after a manual broker reboot.

subnetIds

Array of type string

False

The list of groups (2 maximum) that define which subnets and IP ranges the broker can use from different Availability Zones. A SINGLE_INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ deployment requires two subnets.

CreateBrokerOutput

Returns information about the created broker.

Property Type Required Description
brokerArn

string

False

The Amazon Resource Name (ARN) of the broker.

brokerId

string

False

The unique ID that Amazon MQ generates for the broker.

DeploymentMode

The deployment mode of the broker.

  • SINGLE_INSTANCE

  • ACTIVE_STANDBY_MULTI_AZ

EngineType

The type of broker engine. Note: Currently, Amazon MQ supports only ActiveMQ.

  • ACTIVEMQ

Error

Returns information about an error.

Property Type Required Description
errorAttribute

string

False

The attribute which caused the error.

message

string

False

The explanation of the error.

ListBrokersOutput

Property Type Required Description
brokerSummaries

Array of type BrokerSummary

False

A list of information about all brokers.

nextToken

string

False

The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.

Logs

The list of information about logs to be enabled for the specified broker.

Property Type Required Description
general

boolean

False

Enables general logging.

audit

boolean

False

Enables audit logging. Every user management action made using JMX or the ActiveMQ Web Console is logged.

User

An ActiveMQ user associated with the broker.

Property Type Required Description
password

string

Format: password

True

Required. The password of the ActiveMQ user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas.

groups

Array of type string

False

The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.

consoleAccess

boolean

False

Enables access to the the ActiveMQ Web Console for the ActiveMQ user.

username

string

True

Required. The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.

WeeklyStartTime

The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.

Property Type Required Description
dayOfWeek

string

Values: MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY

True

Required. The day of the week.

timeZone

string

False

The time zone, UTC by default, in either the Country/City format, or the UTC offset format.

timeOfDay

string

True

Required. The time, in 24-hour format.

See Also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

ListBrokers

CreateBroker