condition
fun Item.condition(expression: String?, expressionAttributeNames: TokensToNames?, expressionAttributeValues: TokensToValues?): Map<AttributeName, AttributeValue>?(source)
Apply the conditional expression to the Item. If the condition is null or resolves to true returns the item, or returns null.
The expression is checked against the substitutions before it is evaluated, so a reference that DynamoDB would reject outright is reported whatever the item happens to hold - see Expr.validate.