brokers
Creates, updates, deletes, gets or lists a brokers resource.
Overview
| Name | brokers |
| Type | Resource |
| Id | aws.mq.brokers |
Fields
The following fields are returned by SELECT queries:
- describe_broker
- list_brokers
| Name | Datatype | Description |
|---|---|---|
actions_required | array | Actions required for a broker. |
authentication_strategy | string | Optional. The authentication strategy used to secure the broker. The default is SIMPLE. (SIMPLE, LDAP, CONFIG_MANAGED) |
auto_minor_version_upgrade | boolean | 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. |
broker_arn | string | The broker's Amazon Resource Name (ARN). |
broker_id | string | The unique ID that Amazon MQ generates for the broker. |
broker_instances | array | A list of information about allocated brokers. |
broker_name | string | The 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_state | string | The broker's status. (CREATION_IN_PROGRESS, CREATION_FAILED, DELETION_IN_PROGRESS, RUNNING, REBOOT_IN_PROGRESS, CRITICAL_ACTION_REQUIRED, REPLICA) |
configurations | object | The list of all revisions for the specified configuration. |
created | string (date-time) | The time when the broker was created. |
data_replication_metadata | object | The replication details of the data replication-enabled broker. Only returned if dataReplicationMode is set to CRDR. |
data_replication_mode | string | Specifies whether a broker is a part of a data replication pair. (NONE, CRDR) |
deployment_mode | string | The broker's deployment mode. (SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ, CLUSTER_MULTI_AZ) |
encryption_options | object | Encryption options for the broker. |
engine_type | string | The type of broker engine. Amazon MQ supports ActiveMQ and RabbitMQ. (ACTIVEMQ, RABBITMQ) |
engine_version | string | The 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_type | string | The broker's instance type. |
ldap_server_metadata | object | The metadata of the LDAP server used to authenticate and authorize connections to the broker. |
logs | object | The list of information about logs currently enabled and pending to be deployed for the specified broker. |
maintenance_window_start_time | object | The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker. |
pending_authentication_strategy | string | Optional. The authentication strategy used to secure the broker. The default is SIMPLE. (SIMPLE, LDAP, CONFIG_MANAGED) |
pending_data_replication_metadata | object | The pending replication details of the data replication-enabled broker. Only returned if pendingDataReplicationMode is set to CRDR. |
pending_data_replication_mode | string | Specifies whether a broker is a part of a data replication pair. (NONE, CRDR) |
pending_engine_version | string | The 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_type | string | The broker's host instance type to upgrade to. For a list of supported instance types, see Broker instance types. |
pending_ldap_server_metadata | object | The metadata of the LDAP server that will be used to authenticate and authorize connections to the broker after it is rebooted. |
pending_security_groups | array | The list of pending security groups to authorize connections to brokers. |
pending_storage_size | integer | The pending storage size in GB, to be applied on the next broker restart. |
publicly_accessible | boolean | Enables connections from applications outside of the VPC that hosts the broker's subnets. |
security_groups | array | The list of rules (1 minimum, 125 maximum) that authorize connections to brokers. |
storage_size | integer | The broker's storage size in GB. |
storage_type | string | The broker's storage type. EFS is not supported for RabbitMQ engine type. (EBS, EFS) |
subnet_ids | array | The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones. |
tags | object | The list of all tags associated with this broker. |
users | array | The list of all broker usernames for the specified broker. |
| Name | Datatype | Description |
|---|---|---|
broker_arn | string | The broker's Amazon Resource Name (ARN). |
broker_id | string | The unique ID that Amazon MQ generates for the broker. |
broker_name | string | The broker's name. This value is unique in your Amazon Web Services account, 1-50 characters long, and containing only letters, numbers, dashes, and underscores, and must not contain white spaces, brackets, wildcard characters, or special characters. |
broker_state | string | The broker's status. (CREATION_IN_PROGRESS, CREATION_FAILED, DELETION_IN_PROGRESS, RUNNING, REBOOT_IN_PROGRESS, CRITICAL_ACTION_REQUIRED, REPLICA) |
created | string (date-time) | The time when the broker was created. |
deployment_mode | string | The broker's deployment mode. (SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ, CLUSTER_MULTI_AZ) |
engine_type | string | The type of broker engine. Amazon MQ supports ActiveMQ and RabbitMQ. (ACTIVEMQ, RABBITMQ) |
host_instance_type | string | The broker's instance type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_broker | select | broker-id, region | Returns information about the specified broker. | |
list_brokers | select | region | maxResults, nextToken | Returns a list of all brokers. |
create_broker | insert | region, BrokerName, DeploymentMode, EngineType, HostInstanceType, PubliclyAccessible | 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. | |
update_broker | update | broker-id, region | Adds a pending configuration change to a broker. | |
delete_broker | delete | broker-id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
broker-id | string | The unique ID that Amazon MQ generates for the broker. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | 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. |
nextToken | string | The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty. |
SELECT examples
- describe_broker
- list_brokers
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
;
Returns a list of all brokers.
SELECT
broker_arn,
broker_id,
broker_name,
broker_state,
created,
deployment_mode,
engine_type,
host_instance_type
FROM aws.mq.brokers
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_broker
- Manifest
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
;
# Description fields are for documentation purposes
- name: brokers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the brokers resource.
- name: AuthenticationStrategy
value: "{{ AuthenticationStrategy }}"
description: |
Optional. The authentication strategy used to secure the broker. The default is SIMPLE.
valid_values: ['SIMPLE', 'LDAP', 'CONFIG_MANAGED']
- name: AutoMinorVersionUpgrade
value: {{ AutoMinorVersionUpgrade }}
- name: BrokerName
value: "{{ BrokerName }}"
- name: Configuration
description: |
A list of information about the configuration.
value:
Id: "{{ Id }}"
Revision: {{ Revision }}
- name: CreatorRequestId
value: "{{ CreatorRequestId }}"
- name: DeploymentMode
value: "{{ DeploymentMode }}"
description: |
The broker's deployment mode.
valid_values: ['SINGLE_INSTANCE', 'ACTIVE_STANDBY_MULTI_AZ', 'CLUSTER_MULTI_AZ']
- name: EncryptionOptions
description: |
Encryption options for the broker.
value:
KmsKeyId: "{{ KmsKeyId }}"
UseAwsOwnedKey: {{ UseAwsOwnedKey }}
- name: EngineType
value: "{{ EngineType }}"
description: |
The type of broker engine. Amazon MQ supports ActiveMQ and RabbitMQ.
valid_values: ['ACTIVEMQ', 'RABBITMQ']
- name: EngineVersion
value: "{{ EngineVersion }}"
- name: HostInstanceType
value: "{{ HostInstanceType }}"
- name: LdapServerMetadata
description: |
Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
value:
Hosts:
- "{{ Hosts }}"
RoleBase: "{{ RoleBase }}"
RoleName: "{{ RoleName }}"
RoleSearchMatching: "{{ RoleSearchMatching }}"
RoleSearchSubtree: {{ RoleSearchSubtree }}
ServiceAccountPassword: "{{ ServiceAccountPassword }}"
ServiceAccountUsername: "{{ ServiceAccountUsername }}"
UserBase: "{{ UserBase }}"
UserRoleName: "{{ UserRoleName }}"
UserSearchMatching: "{{ UserSearchMatching }}"
UserSearchSubtree: {{ UserSearchSubtree }}
- name: Logs
description: |
The list of information about logs to be enabled for the specified broker.
value:
Audit: {{ Audit }}
General: {{ General }}
- name: MaintenanceWindowStartTime
description: |
The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.
value:
DayOfWeek: "{{ DayOfWeek }}"
TimeOfDay: "{{ TimeOfDay }}"
TimeZone: "{{ TimeZone }}"
- name: PubliclyAccessible
value: {{ PubliclyAccessible }}
- name: SecurityGroups
value:
- "{{ SecurityGroups }}"
- name: StorageSize
value: {{ StorageSize }}
- name: StorageType
value: "{{ StorageType }}"
description: |
The broker's storage type. EFS is not supported for RabbitMQ engine type.
valid_values: ['EBS', 'EFS']
- name: SubnetIds
value:
- "{{ SubnetIds }}"
- name: Tags
value: "{{ Tags }}"
- name: Users
value:
- ConsoleAccess: {{ ConsoleAccess }}
Groups: "{{ Groups }}"
Password: "{{ Password }}"
Username: "{{ Username }}"
ReplicationUser: {{ ReplicationUser }}
- name: DataReplicationMode
value: "{{ DataReplicationMode }}"
description: |
Specifies whether a broker is a part of a data replication pair.
valid_values: ['NONE', 'CRDR']
- name: DataReplicationPrimaryBrokerArn
value: "{{ DataReplicationPrimaryBrokerArn }}"
UPDATE examples
- update_broker
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
- delete_broker
Deletes a broker. Note: This API is asynchronous.
DELETE FROM aws.mq.brokers
WHERE `broker-id` = '{{ broker-id }}' --required
AND region = '{{ region }}' --required
;