@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:35.194Z") public class CfnBroker extends CfnResource implements IInspectable
A broker is a message broker environment running on Amazon MQ . It is the basic building block of Amazon MQ .
The AWS::AmazonMQ::Broker
resource lets you create Amazon MQ for ActiveMQ and Amazon MQ for RabbitMQ brokers, add configuration changes or modify users for a speified ActiveMQ broker, return information about the specified broker, and delete the broker. For more information, see How Amazon MQ works 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
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.amazonmq.*; CfnBroker cfnBroker = CfnBroker.Builder.create(this, "MyCfnBroker") .autoMinorVersionUpgrade(false) .brokerName("brokerName") .deploymentMode("deploymentMode") .engineType("engineType") .engineVersion("engineVersion") .hostInstanceType("hostInstanceType") .publiclyAccessible(false) .users(List.of(UserProperty.builder() .password("password") .username("username") // the properties below are optional .consoleAccess(false) .groups(List.of("groups")) .build())) // the properties below are optional .authenticationStrategy("authenticationStrategy") .configuration(ConfigurationIdProperty.builder() .id("id") .revision(123) .build()) .encryptionOptions(EncryptionOptionsProperty.builder() .useAwsOwnedKey(false) // the properties below are optional .kmsKeyId("kmsKeyId") .build()) .ldapServerMetadata(LdapServerMetadataProperty.builder() .hosts(List.of("hosts")) .roleBase("roleBase") .roleSearchMatching("roleSearchMatching") .serviceAccountPassword("serviceAccountPassword") .serviceAccountUsername("serviceAccountUsername") .userBase("userBase") .userSearchMatching("userSearchMatching") // the properties below are optional .roleName("roleName") .roleSearchSubtree(false) .userRoleName("userRoleName") .userSearchSubtree(false) .build()) .logs(LogListProperty.builder() .audit(false) .general(false) .build()) .maintenanceWindowStartTime(MaintenanceWindowProperty.builder() .dayOfWeek("dayOfWeek") .timeOfDay("timeOfDay") .timeZone("timeZone") .build()) .securityGroups(List.of("securityGroups")) .storageType("storageType") .subnetIds(List.of("subnetIds")) .tags(List.of(TagsEntryProperty.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnBroker.Builder
A fluent builder for
CfnBroker . |
static interface |
CfnBroker.ConfigurationIdProperty
A list of information about the configuration.
|
static interface |
CfnBroker.EncryptionOptionsProperty
Encryption options for the broker.
|
static interface |
CfnBroker.LdapServerMetadataProperty
Optional.
|
static interface |
CfnBroker.LogListProperty
The list of information about logs to be enabled for the specified broker.
|
static interface |
CfnBroker.MaintenanceWindowProperty
The parameters that determine the `WeeklyStartTime` to apply pending updates or patches to the broker.
|
static interface |
CfnBroker.TagsEntryProperty
A key-value pair to associate with the broker.
|
static interface |
CfnBroker.UserProperty
The list of broker users (persons or applications) who can access queues and topics.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnBroker(Construct scope,
java.lang.String id,
CfnBrokerProps props)
Create a new `AWS::AmazonMQ::Broker`.
|
protected |
CfnBroker(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnBroker(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAttrAmqpEndpoints()
The AMQP endpoints of each broker instance as a list of strings.
|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the Amazon MQ broker.
|
java.lang.String |
getAttrConfigurationId()
The unique ID that Amazon MQ generates for the configuration.
|
java.lang.Number |
getAttrConfigurationRevision()
The revision number of the configuration.
|
java.util.List<java.lang.String> |
getAttrIpAddresses()
The IP addresses of each broker instance as a list of strings.
|
java.util.List<java.lang.String> |
getAttrMqttEndpoints()
The MQTT endpoints of each broker instance as a list of strings.
|
java.util.List<java.lang.String> |
getAttrOpenWireEndpoints()
The OpenWire endpoints of each broker instance as a list of strings.
|
java.util.List<java.lang.String> |
getAttrStompEndpoints()
The STOMP endpoints of each broker instance as a list of strings.
|
java.util.List<java.lang.String> |
getAttrWssEndpoints()
The WSS endpoints of each broker instance as a list of strings.
|
java.lang.String |
getAuthenticationStrategy()
Optional.
|
java.lang.Object |
getAutoMinorVersionUpgrade()
Enables automatic upgrades to new minor versions for brokers, as new broker engine versions are released and supported by Amazon MQ.
|
java.lang.String |
getBrokerName()
The name of the broker.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getConfiguration()
A list of information about the configuration.
|
java.lang.String |
getDeploymentMode()
The deployment mode of the broker.
|
java.lang.Object |
getEncryptionOptions()
Encryption options for the broker.
|
java.lang.String |
getEngineType()
The type of broker engine.
|
java.lang.String |
getEngineVersion()
The version of the broker engine.
|
java.lang.String |
getHostInstanceType()
The broker's instance type.
|
java.lang.Object |
getLdapServerMetadata()
Optional.
|
java.lang.Object |
getLogs()
Enables Amazon CloudWatch logging for brokers.
|
java.lang.Object |
getMaintenanceWindowStartTime()
The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.
|
java.lang.Object |
getPubliclyAccessible()
Enables connections from applications outside of the VPC that hosts the broker's subnets.
|
java.util.List<java.lang.String> |
getSecurityGroups()
The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
|
java.lang.String |
getStorageType()
The broker's storage type.
|
java.util.List<java.lang.String> |
getSubnetIds()
The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones.
|
TagManager |
getTags()
An array of key-value pairs.
|
java.lang.Object |
getUsers()
The list of broker users (persons or applications) who can access queues and topics.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAuthenticationStrategy(java.lang.String value)
Optional.
|
void |
setAutoMinorVersionUpgrade(java.lang.Boolean value)
Enables automatic upgrades to new minor versions for brokers, as new broker engine versions are released and supported by Amazon MQ.
|
void |
setAutoMinorVersionUpgrade(IResolvable value)
Enables automatic upgrades to new minor versions for brokers, as new broker engine versions are released and supported by Amazon MQ.
|
void |
setBrokerName(java.lang.String value)
The name of the broker.
|
void |
setConfiguration(CfnBroker.ConfigurationIdProperty value)
A list of information about the configuration.
|
void |
setConfiguration(IResolvable value)
A list of information about the configuration.
|
void |
setDeploymentMode(java.lang.String value)
The deployment mode of the broker.
|
void |
setEncryptionOptions(CfnBroker.EncryptionOptionsProperty value)
Encryption options for the broker.
|
void |
setEncryptionOptions(IResolvable value)
Encryption options for the broker.
|
void |
setEngineType(java.lang.String value)
The type of broker engine.
|
void |
setEngineVersion(java.lang.String value)
The version of the broker engine.
|
void |
setHostInstanceType(java.lang.String value)
The broker's instance type.
|
void |
setLdapServerMetadata(CfnBroker.LdapServerMetadataProperty value)
Optional.
|
void |
setLdapServerMetadata(IResolvable value)
Optional.
|
void |
setLogs(CfnBroker.LogListProperty value)
Enables Amazon CloudWatch logging for brokers.
|
void |
setLogs(IResolvable value)
Enables Amazon CloudWatch logging for brokers.
|
void |
setMaintenanceWindowStartTime(CfnBroker.MaintenanceWindowProperty value)
The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.
|
void |
setMaintenanceWindowStartTime(IResolvable value)
The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.
|
void |
setPubliclyAccessible(java.lang.Boolean value)
Enables connections from applications outside of the VPC that hosts the broker's subnets.
|
void |
setPubliclyAccessible(IResolvable value)
Enables connections from applications outside of the VPC that hosts the broker's subnets.
|
void |
setSecurityGroups(java.util.List<java.lang.String> value)
The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
|
void |
setStorageType(java.lang.String value)
The broker's storage type.
|
void |
setSubnetIds(java.util.List<java.lang.String> value)
The list of groups that define which subnets and IP ranges the broker can use from different Availability Zones.
|
void |
setUsers(IResolvable value)
The list of broker users (persons or applications) who can access queues and topics.
|
void |
setUsers(java.util.List<java.lang.Object> value)
The list of broker users (persons or applications) who can access queues and topics.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnBroker(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBroker(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnBroker(Construct scope, java.lang.String id, CfnBrokerProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.util.List<java.lang.String> getAttrAmqpEndpoints()
amqp+ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:5671
public java.lang.String getAttrArn()
arn:aws:mq:us-east-2:123456789012:broker:MyBroker:b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
public java.lang.String getAttrConfigurationId()
c-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
public java.lang.Number getAttrConfigurationRevision()
1
public java.util.List<java.lang.String> getAttrIpAddresses()
['198.51.100.2', '203.0.113.9']
public java.util.List<java.lang.String> getAttrMqttEndpoints()
mqtt+ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:8883
public java.util.List<java.lang.String> getAttrOpenWireEndpoints()
ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:61617
public java.util.List<java.lang.String> getAttrStompEndpoints()
stomp+ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:61614
public java.util.List<java.lang.String> getAttrWssEndpoints()
wss://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:61619
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Using Cost Allocation Tags in the Billing and Cost Management User Guide .
public java.lang.Object getAutoMinorVersionUpgrade()
Automatic upgrades occur during the scheduled maintenance window of the broker or after a manual broker reboot.
public void setAutoMinorVersionUpgrade(java.lang.Boolean value)
Automatic upgrades occur during the scheduled maintenance window of the broker or after a manual broker reboot.
public void setAutoMinorVersionUpgrade(IResolvable value)
Automatic upgrades occur during the scheduled maintenance window of the broker or after a manual broker reboot.
public java.lang.String getBrokerName()
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.
Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other AWS services, including C CloudWatch Logs . Broker names are not intended to be used for private or sensitive data.
public void setBrokerName(java.lang.String value)
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.
Do not add personally identifiable information (PII) or other confidential or sensitive information in broker names. Broker names are accessible to other AWS services, including C CloudWatch Logs . Broker names are not intended to be used for private or sensitive data.
public java.lang.String getDeploymentMode()
SINGLE_INSTANCE
ACTIVE_STANDBY_MULTI_AZ
CLUSTER_MULTI_AZ
public void setDeploymentMode(java.lang.String value)
SINGLE_INSTANCE
ACTIVE_STANDBY_MULTI_AZ
CLUSTER_MULTI_AZ
public java.lang.String getEngineType()
Currently, Amazon MQ supports ACTIVEMQ
and RABBITMQ
.
public void setEngineType(java.lang.String value)
Currently, Amazon MQ supports ACTIVEMQ
and RABBITMQ
.
public java.lang.String getEngineVersion()
For a list of supported engine versions, see Engine in the Amazon MQ Developer Guide .
public void setEngineVersion(java.lang.String value)
For a list of supported engine versions, see Engine in the Amazon MQ Developer Guide .
public java.lang.String getHostInstanceType()
public void setHostInstanceType(java.lang.String value)
public java.lang.Object getPubliclyAccessible()
public void setPubliclyAccessible(java.lang.Boolean value)
public void setPubliclyAccessible(IResolvable value)
public java.lang.Object getUsers()
For Amazon MQ for RabbitMQ brokers, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent RabbitMQ users are created by via the RabbitMQ web console or by using the RabbitMQ management API.
public void setUsers(IResolvable value)
For Amazon MQ for RabbitMQ brokers, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent RabbitMQ users are created by via the RabbitMQ web console or by using the RabbitMQ management API.
public void setUsers(java.util.List<java.lang.Object> value)
For Amazon MQ for RabbitMQ brokers, one and only one administrative user is accepted and created when a broker is first provisioned. All subsequent RabbitMQ users are created by via the RabbitMQ web console or by using the RabbitMQ management API.
public java.lang.String getAuthenticationStrategy()
The authentication strategy used to secure the broker. The default is SIMPLE
.
public void setAuthenticationStrategy(java.lang.String value)
The authentication strategy used to secure the broker. The default is SIMPLE
.
public java.lang.Object getConfiguration()
Does not apply to RabbitMQ brokers.
public void setConfiguration(IResolvable value)
Does not apply to RabbitMQ brokers.
public void setConfiguration(CfnBroker.ConfigurationIdProperty value)
Does not apply to RabbitMQ brokers.
public java.lang.Object getEncryptionOptions()
Does not apply to RabbitMQ brokers.
public void setEncryptionOptions(IResolvable value)
Does not apply to RabbitMQ brokers.
public void setEncryptionOptions(CfnBroker.EncryptionOptionsProperty value)
Does not apply to RabbitMQ brokers.
public java.lang.Object getLdapServerMetadata()
The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
public void setLdapServerMetadata(IResolvable value)
The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
public void setLdapServerMetadata(CfnBroker.LdapServerMetadataProperty value)
The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not apply to RabbitMQ brokers.
public java.lang.Object getLogs()
public void setLogs(IResolvable value)
public void setLogs(CfnBroker.LogListProperty value)
public java.lang.Object getMaintenanceWindowStartTime()
public void setMaintenanceWindowStartTime(IResolvable value)
public void setMaintenanceWindowStartTime(CfnBroker.MaintenanceWindowProperty value)
public java.util.List<java.lang.String> getSecurityGroups()
public void setSecurityGroups(java.util.List<java.lang.String> value)
public java.lang.String getStorageType()
public void setStorageType(java.lang.String value)
public java.util.List<java.lang.String> getSubnetIds()
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 deployment (ACTIVEMQ) requires two subnets. A CLUSTER_MULTI_AZ deployment (RABBITMQ) 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 AWS account . Amazon MQ will not be able to create VPC enpoints in VPCs that are not owned by your AWS account .
public void setSubnetIds(java.util.List<java.lang.String> value)
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 deployment (ACTIVEMQ) requires two subnets. A CLUSTER_MULTI_AZ deployment (RABBITMQ) 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 AWS account . Amazon MQ will not be able to create VPC enpoints in VPCs that are not owned by your AWS account .