Class PutItemRequest
Creates an item or replaces an existing item with the same primary key entirely (DynamoDB PutItem).
public sealed record PutItemRequest : IEquatable<PutItemRequest>
- Inheritance
-
PutItemRequest
- Implements
- Inherited Members
Constructors
PutItemRequest()
public PutItemRequest()
Properties
ConditionExpression
Gets a condition that must hold for the write to succeed, for example "attribute_not_exists(pk)".
When it does not hold, the call throws ConditionalCheckFailedException.
Attribute names that are DynamoDB reserved words, such as name, status, size, order or total,
must be aliased with a #placeholder defined in ExpressionAttributeNames; written directly, DynamoDB rejects the
request with a ValidationException. See the list of reserved words.
public string? ConditionExpression { get; init; }
Property Value
ExpressionAttributeNames
Gets the substitutions for #name placeholders in ConditionExpression.
Use it to alias attribute names that are DynamoDB reserved words, such as name, status, size, order or
total, which DynamoDB rejects with a ValidationException when an expression uses them directly (the check is
case-insensitive), and names with a dot or other special characters. See the list of reserved words.
public IReadOnlyDictionary<string, string>? ExpressionAttributeNames { get; init; }
Property Value
ExpressionAttributeValues
Gets the substitutions for :value placeholders in ConditionExpression.
public IReadOnlyDictionary<string, AttributeValue>? ExpressionAttributeValues { get; init; }
Property Value
Item
Gets the item, including all key attributes. At most 400 KB.
public required IReadOnlyDictionary<string, AttributeValue> Item { get; init; }
Property Value
ReturnConsumedCapacity
Gets whether to report consumed capacity in ConsumedCapacity.
public ReturnConsumedCapacity ReturnConsumedCapacity { get; init; }
Property Value
ReturnItemCollectionMetrics
Gets whether to report the size of the item collection in ItemCollectionMetrics. Only tables with a local secondary index have item collections.
public ReturnItemCollectionMetrics ReturnItemCollectionMetrics { get; init; }
Property Value
ReturnValues
Gets what to return in Attributes: None or AllOld.
public ReturnValue ReturnValues { get; init; }
Property Value
ReturnValuesOnConditionCheckFailure
Gets whether a failed condition returns the existing item in Item.
public ReturnValuesOnConditionCheckFailure ReturnValuesOnConditionCheckFailure { get; init; }
Property Value
TableName
Gets the table name (or table ARN).
public required string TableName { get; init; }
Property Value
Methods
Equals(PutItemRequest?)
public bool Equals(PutItemRequest? other)
Parameters
otherPutItemRequest
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(PutItemRequest?, PutItemRequest?)
public static bool operator ==(PutItemRequest? left, PutItemRequest? right)
Parameters
leftPutItemRequestrightPutItemRequest
Returns
operator !=(PutItemRequest?, PutItemRequest?)
public static bool operator !=(PutItemRequest? left, PutItemRequest? right)
Parameters
leftPutItemRequestrightPutItemRequest