#if($inputRoot.objectType == 'Test'), "TableName": "StudentTests", #else,"TableName": "UserActions", #end
如果使用if条件,我在邮递员链接中出现错误 ##“ __type”:“ com.amazon.coral.service#SerializationException” ##
答案 0 :(得分:1)
我理解您的问题的方式:
#if($inputRoot.objectType == "Test")
#set($tableName = "StudentTests"
#else
#set($tableName = "UserActions"
#end
{
"TableName": "$tableName",
"Key": ...
}