function getBotAttrs()

in custom-resources/lex-bot/index.js [109:129]


function getBotAttrs (props, next) {
  const latestVersion = '$LATEST'
  const BotParams = {
    name: props.name,
    version: latestVersion
  }
  console.log('Accessing current slot version with getBot: %j', BotParams)
  LexModelBuildingService.getBot(BotParams, function (err, BotData) {
    if (err) {
      console.error('Problem accessing data during read to Bot: %j', err)
      return next(err.code + ': ' + err.message)
    }
    console.log('Got Bot information back: %j', BotData)
    const BotReplyAttrs = {
      checksum: BotData.checksum,
      version: latestVersion
    }
    console.log('Bot attributes: %j', BotReplyAttrs)
    next(null, BotReplyAttrs)
  })
}