updateBotAlias method
Updates the configuration of an existing bot alias.
May throw ConflictException.
May throw InternalServerException.
May throw PreconditionFailedException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter botAliasId :
The unique identifier of the bot alias.
Parameter botAliasName :
The new name to assign to the bot alias.
Parameter botId :
The identifier of the bot with the updated alias.
Parameter botAliasLocaleSettings :
The new Lambda functions to use in each locale for the bot alias.
Parameter botVersion :
The new bot version to assign to the bot alias.
Parameter conversationLogSettings :
The new settings for storing conversation logs in Amazon CloudWatch Logs
and Amazon S3 buckets.
Parameter description :
The new description to assign to the bot alias.
Implementation
Future<UpdateBotAliasResponse> updateBotAlias({
required String botAliasId,
required String botAliasName,
required String botId,
Map<String, BotAliasLocaleSettings>? botAliasLocaleSettings,
String? botVersion,
ConversationLogSettings? conversationLogSettings,
String? description,
SentimentAnalysisSettings? sentimentAnalysisSettings,
}) async {
final $payload = <String, dynamic>{
'botAliasName': botAliasName,
if (botAliasLocaleSettings != null)
'botAliasLocaleSettings': botAliasLocaleSettings,
if (botVersion != null) 'botVersion': botVersion,
if (conversationLogSettings != null)
'conversationLogSettings': conversationLogSettings,
if (description != null) 'description': description,
if (sentimentAnalysisSettings != null)
'sentimentAnalysisSettings': sentimentAnalysisSettings,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/bots/${Uri.encodeComponent(botId)}/botaliases/${Uri.encodeComponent(botAliasId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateBotAliasResponse.fromJson(response);
}