updateBroker method

Future<UpdateBrokerResponse> updateBroker({
  1. required String brokerId,
  2. AuthenticationStrategy? authenticationStrategy,
  3. bool? autoMinorVersionUpgrade,
  4. ConfigurationId? configuration,
  5. String? engineVersion,
  6. String? hostInstanceType,
  7. LdapServerMetadataInput? ldapServerMetadata,
  8. Logs? logs,
  9. List<String>? securityGroups,
})

Adds a pending configuration change to a broker.

May throw NotFoundException. May throw BadRequestException. May throw InternalServerErrorException. May throw ConflictException. May throw ForbiddenException.

Parameter brokerId : The unique ID that Amazon MQ generates for the broker.

Parameter authenticationStrategy : The authentication strategy used to secure the broker.

Parameter autoMinorVersionUpgrade : Enables automatic upgrades to new minor versions for brokers, as Apache releases the versions. The automatic upgrades occur during the maintenance window of the broker or after a manual broker reboot.

Parameter configuration : A list of information about the configuration.

Parameter engineVersion : The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html

Parameter hostInstanceType : The host instance type of the broker to upgrade to. For a list of supported instance types, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types

Parameter ldapServerMetadata : The metadata of the LDAP server used to authenticate and authorize connections to the broker.

Parameter logs : Enables Amazon CloudWatch logging for brokers.

Parameter securityGroups : The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.

Implementation

Future<UpdateBrokerResponse> updateBroker({
  required String brokerId,
  AuthenticationStrategy? authenticationStrategy,
  bool? autoMinorVersionUpgrade,
  ConfigurationId? configuration,
  String? engineVersion,
  String? hostInstanceType,
  LdapServerMetadataInput? ldapServerMetadata,
  Logs? logs,
  List<String>? securityGroups,
}) async {
  ArgumentError.checkNotNull(brokerId, 'brokerId');
  final $payload = <String, dynamic>{
    if (authenticationStrategy != null)
      'authenticationStrategy': authenticationStrategy.toValue(),
    if (autoMinorVersionUpgrade != null)
      'autoMinorVersionUpgrade': autoMinorVersionUpgrade,
    if (configuration != null) 'configuration': configuration,
    if (engineVersion != null) 'engineVersion': engineVersion,
    if (hostInstanceType != null) 'hostInstanceType': hostInstanceType,
    if (ldapServerMetadata != null) 'ldapServerMetadata': ldapServerMetadata,
    if (logs != null) 'logs': logs,
    if (securityGroups != null) 'securityGroups': securityGroups,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v1/brokers/${Uri.encodeComponent(brokerId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateBrokerResponse.fromJson(response);
}