Class: AWSCDK::AmazonMQ::CfnBroker::UserProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
amazon_mq/cfn_broker.rb

Overview

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.

When OAuth 2.0 is enabled, the broker accepts one or no users.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(password:, username:, console_access: nil, groups: nil, replication_user: nil) ⇒ UserProperty

Returns a new instance of UserProperty.

Parameters:

  • password (String)

    Required.

  • username (String)

    The username of the broker user. The following restrictions apply to broker usernames:.

  • console_access (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

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

  • groups (Array<String>, nil) (defaults to: nil)

    The list of groups (20 maximum) to which the ActiveMQ user belongs.

  • replication_user (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Defines if this user is intended for CRDR replication purposes.



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
# File 'amazon_mq/cfn_broker.rb', line 1263

def initialize(password:, username:, console_access: nil, groups: nil, replication_user: nil)
  @password = password
  Jsii::Type.check_type(@password, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "password")
  @username = username
  Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username")
  @console_access = console_access
  Jsii::Type.check_type(@console_access, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "consoleAccess") unless @console_access.nil?
  @groups = groups
  Jsii::Type.check_type(@groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "groups") unless @groups.nil?
  @replication_user = replication_user
  Jsii::Type.check_type(@replication_user, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "replicationUser") unless @replication_user.nil?
end

Instance Attribute Details

#console_accessBoolean, ... (readonly)

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

Does not apply to RabbitMQ brokers.



1299
1300
1301
# File 'amazon_mq/cfn_broker.rb', line 1299

def console_access
  @console_access
end

#groupsArray<String>? (readonly)

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. Does not apply to RabbitMQ brokers.



1306
1307
1308
# File 'amazon_mq/cfn_broker.rb', line 1306

def groups
  @groups
end

#passwordString (readonly)

Required.

The password of the user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas, colons, or equal signs (,:=).



1282
1283
1284
# File 'amazon_mq/cfn_broker.rb', line 1282

def password
  @password
end

#replication_userBoolean, ... (readonly)

Defines if this user is intended for CRDR replication purposes.



1311
1312
1313
# File 'amazon_mq/cfn_broker.rb', line 1311

def replication_user
  @replication_user
end

#usernameString (readonly)

The username of the broker user. The following restrictions apply to broker usernames:.

  • For Amazon MQ for ActiveMQ brokers, this value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.
  • For Amazon MQ for RabbitMQ brokers, this value can contain only alphanumeric characters, dashes, periods, underscores (- . _). This value must not contain a tilde (~) character. Amazon MQ prohibts using guest as a valid usename. This value must be 2-100 characters long.

Do not add personally identifiable information (PII) or other confidential or sensitive information in broker usernames. Broker usernames are accessible to other AWS services, including CloudWatch Logs . Broker usernames are not intended to be used for private or sensitive data.



1292
1293
1294
# File 'amazon_mq/cfn_broker.rb', line 1292

def username
  @username
end

Class Method Details

.jsii_propertiesObject



1313
1314
1315
1316
1317
1318
1319
1320
1321
# File 'amazon_mq/cfn_broker.rb', line 1313

def self.jsii_properties
  {
    :password => "password",
    :username => "username",
    :console_access => "consoleAccess",
    :groups => "groups",
    :replication_user => "replicationUser",
  }
end

Instance Method Details

#to_jsiiObject



1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
# File 'amazon_mq/cfn_broker.rb', line 1323

def to_jsii
  result = {}
  result.merge!({
    "password" => @password,
    "username" => @username,
    "consoleAccess" => @console_access,
    "groups" => @groups,
    "replicationUser" => @replication_user,
  })
  result.compact
end