deleteBotVersion method

Future<void> deleteBotVersion({
  1. required String name,
  2. required String version,
})

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

This operation requires permissions for the lex:DeleteBotVersion action.

May throw NotFoundException. May throw ConflictException. May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException. May throw ResourceInUseException.

Parameter name : The name of the bot.

Parameter version : The version of the bot to delete. You cannot delete the $LATEST version of the bot. To delete the $LATEST version, use the DeleteBot operation.

Implementation

Future<void> deleteBotVersion({
  required String name,
  required String version,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    2,
    50,
    isRequired: true,
  );
  ArgumentError.checkNotNull(version, 'version');
  _s.validateStringLength(
    'version',
    version,
    1,
    64,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/bots/${Uri.encodeComponent(name)}/versions/${Uri.encodeComponent(version)}',
    exceptionFnMap: _exceptionFns,
  );
}