createConfiguration method
Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
Parameter engineType :
Required. The type of broker engine. Currently, Amazon MQ supports
ACTIVEMQ and RABBITMQ.
Parameter name :
Required. The name of the configuration. This value can contain only
alphanumeric characters, dashes, periods, underscores, and tildes (- . _
~). This value must be 1-150 characters long.
Parameter authenticationStrategy :
Optional. The authentication strategy associated with the configuration.
The default is SIMPLE.
Parameter engineVersion :
The broker engine version. Defaults to the latest available version for
the specified broker engine type. For more information, see the ActiveMQ
version management and the RabbitMQ
version management sections in the Amazon MQ Developer Guide.
Parameter tags :
Create tags when creating the configuration.
Implementation
Future<CreateConfigurationResponse> createConfiguration({
required EngineType engineType,
required String name,
AuthenticationStrategy? authenticationStrategy,
String? engineVersion,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'engineType': engineType.value,
'name': name,
if (authenticationStrategy != null)
'authenticationStrategy': authenticationStrategy.value,
if (engineVersion != null) 'engineVersion': engineVersion,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/configurations',
exceptionFnMap: _exceptionFns,
);
return CreateConfigurationResponse.fromJson(response);
}