updateBroker method

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

Adds a pending configuration change to a broker.

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

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

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

Parameter autoMinorVersionUpgrade : 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.

Parameter configuration : A list of information about the configuration.

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

Parameter engineVersion : The broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.

Parameter hostInstanceType : The broker's host instance type to upgrade to. For a list of supported instance types, see Broker instance types.

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

Parameter logs : Enables Amazon CloudWatch logging for brokers.

Parameter maintenanceWindowStartTime : The parameters that determine the WeeklyStartTime.

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,
  DataReplicationMode? dataReplicationMode,
  String? engineVersion,
  String? hostInstanceType,
  LdapServerMetadataInput? ldapServerMetadata,
  Logs? logs,
  WeeklyStartTime? maintenanceWindowStartTime,
  List<String>? securityGroups,
}) async {
  final $payload = <String, dynamic>{
    if (authenticationStrategy != null)
      'authenticationStrategy': authenticationStrategy.value,
    if (autoMinorVersionUpgrade != null)
      'autoMinorVersionUpgrade': autoMinorVersionUpgrade,
    if (configuration != null) 'configuration': configuration,
    if (dataReplicationMode != null)
      'dataReplicationMode': dataReplicationMode.value,
    if (engineVersion != null) 'engineVersion': engineVersion,
    if (hostInstanceType != null) 'hostInstanceType': hostInstanceType,
    if (ldapServerMetadata != null) 'ldapServerMetadata': ldapServerMetadata,
    if (logs != null) 'logs': logs,
    if (maintenanceWindowStartTime != null)
      'maintenanceWindowStartTime': maintenanceWindowStartTime,
    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);
}