Skip to main content

brokers

Creates, updates, deletes, gets or lists a brokers resource.

Overview

Namebrokers
TypeResource
Idaws.mq.brokers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actions_requiredarrayActions required for a broker.
authentication_strategystringOptional. The authentication strategy used to secure the broker. The default is SIMPLE. (SIMPLE, LDAP, CONFIG_MANAGED)
auto_minor_version_upgradebooleanEnables 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.
broker_arnstringThe broker's Amazon Resource Name (ARN).
broker_idstringThe unique ID that Amazon MQ generates for the broker.
broker_instancesarrayA list of information about allocated brokers.
broker_namestringThe broker's name. This value must be unique in your Amazon Web Services account 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.
broker_statestringThe broker's status. (CREATION_IN_PROGRESS, CREATION_FAILED, DELETION_IN_PROGRESS, RUNNING, REBOOT_IN_PROGRESS, CRITICAL_ACTION_REQUIRED, REPLICA)
configurationsobjectThe list of all revisions for the specified configuration.
createdstring (date-time)The time when the broker was created.
data_replication_metadataobjectThe replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR.
data_replication_modestringSpecifies whether a broker is a part of a data replication pair. (NONE, CRDR)
deployment_modestringThe broker's deployment mode. (SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ, CLUSTER_MULTI_AZ)
encryption_optionsobjectEncryption options for the broker.
engine_typestringThe type of broker engine. Amazon MQ supports ActiveMQ and RabbitMQ. (ACTIVEMQ, RABBITMQ)
engine_versionstringThe broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
host_instance_typestringThe broker's instance type.
ldap_server_metadataobjectThe metadata of the LDAP server used to authenticate and authorize connections to the broker.
logsobjectThe list of information about logs currently enabled and pending to be deployed for the specified broker.
maintenance_window_start_timeobjectThe scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.
pending_authentication_strategystringOptional. The authentication strategy used to secure the broker. The default is SIMPLE. (SIMPLE, LDAP, CONFIG_MANAGED)
pending_data_replication_metadataobjectThe pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR.
pending_data_replication_modestringSpecifies whether a broker is a part of a data replication pair. (NONE, CRDR)
pending_engine_versionstringThe broker engine version to upgrade to. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.
pending_host_instance_typestringThe broker's host instance type to upgrade to. For a list of supported instance types, see Broker instance types.
pending_ldap_server_metadataobjectThe metadata of the LDAP server that will be used to authenticate and authorize connections to the broker after it is rebooted.
pending_security_groupsarrayThe list of pending security groups to authorize connections to brokers.
pending_storage_sizeintegerThe pending storage size in GB, to be applied on the next broker restart.
publicly_accessiblebooleanEnables connections from applications outside of the VPC that hosts the broker's subnets.
security_groupsarrayThe list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
storage_sizeintegerThe broker's storage size in GB.
storage_typestringThe broker's storage type. EFS is not supported for RabbitMQ engine type. (EBS, EFS)
subnet_idsarrayThe list of groups that define which subnets and IP ranges the broker can use from different Availability Zones.
tagsobjectThe list of all tags associated with this broker.
usersarrayThe list of all broker usernames for the specified broker.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_brokerselectbroker-id, regionReturns information about the specified broker.
list_brokersselectregionmaxResults, nextTokenReturns a list of all brokers.
create_brokerinsertregion, BrokerName, DeploymentMode, EngineType, HostInstanceType, PubliclyAccessibleCreates 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.
update_brokerupdatebroker-id, regionAdds a pending configuration change to a broker.
delete_brokerdeletebroker-id, regionDeletes a broker. Note: This API is asynchronous.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
broker-idstringThe unique ID that Amazon MQ generates for the broker.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.
nextTokenstringThe token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.

SELECT examples

Returns information about the specified broker.

SELECT
actions_required,
authentication_strategy,
auto_minor_version_upgrade,
broker_arn,
broker_id,
broker_instances,
broker_name,
broker_state,
configurations,
created,
data_replication_metadata,
data_replication_mode,
deployment_mode,
encryption_options,
engine_type,
engine_version,
host_instance_type,
ldap_server_metadata,
logs,
maintenance_window_start_time,
pending_authentication_strategy,
pending_data_replication_metadata,
pending_data_replication_mode,
pending_engine_version,
pending_host_instance_type,
pending_ldap_server_metadata,
pending_security_groups,
pending_storage_size,
publicly_accessible,
security_groups,
storage_size,
storage_type,
subnet_ids,
tags,
users
FROM aws.mq.brokers
WHERE `broker-id` = '{{ broker-id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.mq.brokers (
AuthenticationStrategy,
AutoMinorVersionUpgrade,
BrokerName,
Configuration,
CreatorRequestId,
DeploymentMode,
EncryptionOptions,
EngineType,
EngineVersion,
HostInstanceType,
LdapServerMetadata,
Logs,
MaintenanceWindowStartTime,
PubliclyAccessible,
SecurityGroups,
StorageSize,
StorageType,
SubnetIds,
Tags,
Users,
DataReplicationMode,
DataReplicationPrimaryBrokerArn,
region
)
SELECT
'{{ AuthenticationStrategy }}',
{{ AutoMinorVersionUpgrade }},
'{{ BrokerName }}' /* required */,
'{{ Configuration }}',
'{{ CreatorRequestId }}',
'{{ DeploymentMode }}' /* required */,
'{{ EncryptionOptions }}',
'{{ EngineType }}' /* required */,
'{{ EngineVersion }}',
'{{ HostInstanceType }}' /* required */,
'{{ LdapServerMetadata }}',
'{{ Logs }}',
'{{ MaintenanceWindowStartTime }}',
{{ PubliclyAccessible }} /* required */,
'{{ SecurityGroups }}',
{{ StorageSize }},
'{{ StorageType }}',
'{{ SubnetIds }}',
'{{ Tags }}',
'{{ Users }}',
'{{ DataReplicationMode }}',
'{{ DataReplicationPrimaryBrokerArn }}',
'{{ region }}'
RETURNING
broker_arn,
broker_id
;

UPDATE examples

Adds a pending configuration change to a broker.

UPDATE aws.mq.brokers
SET
AuthenticationStrategy = '{{ AuthenticationStrategy }}',
AutoMinorVersionUpgrade = {{ AutoMinorVersionUpgrade }},
Configuration = '{{ Configuration }}',
EngineVersion = '{{ EngineVersion }}',
HostInstanceType = '{{ HostInstanceType }}',
LdapServerMetadata = '{{ LdapServerMetadata }}',
Logs = '{{ Logs }}',
MaintenanceWindowStartTime = '{{ MaintenanceWindowStartTime }}',
ResourceShareArns = '{{ ResourceShareArns }}',
SecurityGroups = '{{ SecurityGroups }}',
StorageSize = {{ StorageSize }},
DataReplicationMode = '{{ DataReplicationMode }}'
WHERE
`broker-id` = '{{ broker-id }}' --required
AND region = '{{ region }}' --required
RETURNING
authentication_strategy,
auto_minor_version_upgrade,
broker_id,
configuration,
data_replication_metadata,
data_replication_mode,
engine_version,
host_instance_type,
ldap_server_metadata,
logs,
maintenance_window_start_time,
pending_data_replication_metadata,
pending_data_replication_mode,
resource_share_arns,
security_groups,
storage_size;

DELETE examples

Deletes a broker. Note: This API is asynchronous.

DELETE FROM aws.mq.brokers
WHERE `broker-id` = '{{ broker-id }}' --required
AND region = '{{ region }}' --required
;