deleteBotAlias method

Future<DeleteBotAliasResponse> deleteBotAlias({
  1. required String botAliasId,
  2. required String botId,
  3. bool? skipResourceInUseCheck,
})

Deletes the specified 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 to delete.

Parameter botId : The unique identifier of the bot associated with the alias to delete.

Parameter skipResourceInUseCheck : By default, Amazon Lex checks if any other resource, such as a bot network, is using the bot alias before it is deleted and throws a ResourceInUseException exception if the alias is being used by another resource. Set this parameter to true to skip this check and remove the alias even if it is being used by another resource.

Implementation

Future<DeleteBotAliasResponse> deleteBotAlias({
  required String botAliasId,
  required String botId,
  bool? skipResourceInUseCheck,
}) async {
  final $query = <String, List<String>>{
    if (skipResourceInUseCheck != null)
      'skipResourceInUseCheck': [skipResourceInUseCheck.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/bots/${Uri.encodeComponent(botId)}/botaliases/${Uri.encodeComponent(botAliasId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteBotAliasResponse.fromJson(response);
}