Reputation: 409
When trying to add an intent to a bot, I'm getting the following:
{"message":"The resource 'SomeBotThatDefinitelyExists' referenced in resource 'TestBot' was not found. Choose another resource."}
I'm calling the putBot
method, and passing the intents below:
`'intents' => [
[
'intentName' => 'SomeBotThatDefinitelyExists',
'intentVersion' => '1',
],
[
'intentName' => 'TestingTheBot',
'intentVersion' => '1'
]
]`
I am absolutely positive that I've successfully created the offending intent. I can see it in the AWS panel, and via the api. The only difference that I can see between the two intents is that the second intent, 'TestingTheBot' has been included in a previous version of the bot. I am able to add it via the api without issue, but, again, trying to add SomeBotThatDefinitelyExists returns the error above.
Upvotes: 1
Views: 71
Reputation: 409
For anyone with the same issue, I discovered that intents created with putIntent
don't have a version. After creating an intent, you must call createIntentVersion
. You can then obtain the latest version from the intent returned by the API. That should be the version you use to set the intentVersion
property when adding an intent to a bot.
Upvotes: 2