ExpectedAttributeValue.Exists Property

.NET Framework 3.5
 
 
 
Did this page help you?  Yes  No   Tell us about it...
Causes Amazon DynamoDB to evaluate the value before attempting a conditional operation:
  • If Exists is true, Amazon DynamoDB will check to see if that attribute value already exists in the table. If it is found, then the operation succeeds. If it is not found, the operation fails with a ConditionalCheckFailedException.
  • If Exists is false, Amazon DynamoDB assumes that the attribute value does not exist in the table. If in fact the value does not exist, then the assumption is valid and the operation succeeds. If the value is found, despite the assumption that it does not exist, the operation fails with a ConditionalCheckFailedException.
The default setting for Exists is true. If you supply a Value all by itself, Amazon DynamoDB assumes the attribute exists: You don't have to set Exists to true, because it is implied. Amazon DynamoDB returns a ValidationException if:
  • Exists is true but there is no Value to check. (You expect a value to exist, but don't specify what that value is.)
  • Exists is false but you also specify a Value. (You cannot expect an attribute to have a value, while also expecting it not to exist.)
If you specify more than one condition for Exists, then all of the conditions must evaluate to true. (In other words, the conditions are ANDed together.) Otherwise, the conditional operation will fail.

Namespace: Amazon.DynamoDBv2.Model
Assembly: AWSSDK.dll
Version: 2.0.0.3

Syntax

C#
public Boolean Exists { get; set; }
Property Value
Type: System.Boolean

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8

.NET for Windows Phone:
Supported in: Window Phone 8