AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Specifies when a property value should be set.

Inheritance Hierarchy

System.Object
  System.ValueType
    System.Enum
      Amazon.DynamoDBv2.DataModel.UpdateBehavior

Namespace: Amazon.DynamoDBv2.DataModel
Assembly: AWSSDK.DynamoDBv2.dll
Version: 3.x.y.z

Syntax

C#
public enum UpdateBehavior

The UpdateBehavior type exposes the following members

Members

NameDescription
Enum Always

Always set the value during persistence. Notes: - On update, this will overwrite any existing value for the attribute.

Enum IfNotExists

Set the value only if the attribute does not currently exist on the item. Applies to: - Create: attribute is written when the item is inserted. - Update: attribute is written if it is missing on the existing item (i.e., absent or has not been set previously). Typical usage: fields that should be initialized once and then left unchanged (e.g., created timestamps, initial version, immutable IDs). Notes: - If the attribute already exists on the item during update, its value is preserved and not overwritten. - This behavior is analogous to using DynamoDB’s if_not_exists in update expressions for the attribute.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer