Skip to content

Create Broker

mq_create_broker R Documentation

Creates a broker

Description

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.

Usage

mq_create_broker(AuthenticationStrategy, AutoMinorVersionUpgrade,
  BrokerName, Configuration, CreatorRequestId, DeploymentMode,
  EncryptionOptions, EngineType, EngineVersion, HostInstanceType,
  LdapServerMetadata, Logs, MaintenanceWindowStartTime,
  PubliclyAccessible, SecurityGroups, StorageType, SubnetIds, Tags, Users,
  DataReplicationMode, DataReplicationPrimaryBrokerArn)

Arguments

AuthenticationStrategy

Optional. The authentication strategy used to secure the broker. The default is SIMPLE.

AutoMinorVersionUpgrade

[required] Enables automatic upgrades to new minor versions for brokers, as new versions are released and supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window of the broker or after a manual broker reboot. Set to true by default, if no value is specified.

BrokerName

[required] 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

A list of information about the configuration.

CreatorRequestId

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.

DeploymentMode

[required] Required. The broker's deployment mode.

EncryptionOptions

Encryption options for the broker.

EngineType

[required] Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.

EngineVersion

[required] Required. The broker engine's version. For a list of supported engine versions, see Supported engines.

HostInstanceType

[required] Required. The broker's instance type.

LdapServerMetadata

Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.

Logs

Enables Amazon CloudWatch logging for brokers.

MaintenanceWindowStartTime

The parameters that determine the WeeklyStartTime.

PubliclyAccessible

[required] Enables connections from applications outside of the VPC that hosts the broker's subnets. Set to false by default, if no value is provided.

SecurityGroups

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

StorageType

The broker's storage type.

SubnetIds

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

Create tags when creating the broker.

Users

[required] The list of broker users (persons or applications) who can access queues and topics. For Amazon MQ for RabbitMQ brokers, 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.

DataReplicationMode

Defines whether this broker is a part of a data replication pair.

DataReplicationPrimaryBrokerArn

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.

Value

A list with the following syntax:

list(
  BrokerArn = "string",
  BrokerId = "string"
)

Request syntax

svc$create_broker(
  AuthenticationStrategy = "SIMPLE"|"LDAP",
  AutoMinorVersionUpgrade = TRUE|FALSE,
  BrokerName = "string",
  Configuration = list(
    Id = "string",
    Revision = 123
  ),
  CreatorRequestId = "string",
  DeploymentMode = "SINGLE_INSTANCE"|"ACTIVE_STANDBY_MULTI_AZ"|"CLUSTER_MULTI_AZ",
  EncryptionOptions = list(
    KmsKeyId = "string",
    UseAwsOwnedKey = TRUE|FALSE
  ),
  EngineType = "ACTIVEMQ"|"RABBITMQ",
  EngineVersion = "string",
  HostInstanceType = "string",
  LdapServerMetadata = list(
    Hosts = list(
      "string"
    ),
    RoleBase = "string",
    RoleName = "string",
    RoleSearchMatching = "string",
    RoleSearchSubtree = TRUE|FALSE,
    ServiceAccountPassword = "string",
    ServiceAccountUsername = "string",
    UserBase = "string",
    UserRoleName = "string",
    UserSearchMatching = "string",
    UserSearchSubtree = TRUE|FALSE
  ),
  Logs = list(
    Audit = TRUE|FALSE,
    General = TRUE|FALSE
  ),
  MaintenanceWindowStartTime = list(
    DayOfWeek = "MONDAY"|"TUESDAY"|"WEDNESDAY"|"THURSDAY"|"FRIDAY"|"SATURDAY"|"SUNDAY",
    TimeOfDay = "string",
    TimeZone = "string"
  ),
  PubliclyAccessible = TRUE|FALSE,
  SecurityGroups = list(
    "string"
  ),
  StorageType = "EBS"|"EFS",
  SubnetIds = list(
    "string"
  ),
  Tags = list(
    "string"
  ),
  Users = list(
    list(
      ConsoleAccess = TRUE|FALSE,
      Groups = list(
        "string"
      ),
      Password = "string",
      Username = "string",
      ReplicationUser = TRUE|FALSE
    )
  ),
  DataReplicationMode = "NONE"|"CRDR",
  DataReplicationPrimaryBrokerArn = "string"
)