deleteBotVersion method

Future<DeleteBotVersionResponse> deleteBotVersion({
  1. required String botId,
  2. required String botVersion,
  3. bool? skipResourceInUseCheck,
})

Deletes a specific version of a bot. To delete all versions of a bot, use the DeleteBot operation.

May throw ConflictException. May throw InternalServerException. May throw PreconditionFailedException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter botId : The identifier of the bot that contains the version.

Parameter botVersion : The version of the bot to delete.

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

Implementation

Future<DeleteBotVersionResponse> deleteBotVersion({
  required String botId,
  required String botVersion,
  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)}/botversions/${Uri.encodeComponent(botVersion)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteBotVersionResponse.fromJson(response);
}