Table of Contents

Class PutItemRequest

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

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

string

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

IReadOnlyDictionary<string, string>

ExpressionAttributeValues

Gets the substitutions for :value placeholders in ConditionExpression.

public IReadOnlyDictionary<string, AttributeValue>? ExpressionAttributeValues { get; init; }

Property Value

IReadOnlyDictionary<string, AttributeValue>

Item

Gets the item, including all key attributes. At most 400 KB.

public required IReadOnlyDictionary<string, AttributeValue> Item { get; init; }

Property Value

IReadOnlyDictionary<string, AttributeValue>

ReturnConsumedCapacity

Gets whether to report consumed capacity in ConsumedCapacity.

public ReturnConsumedCapacity ReturnConsumedCapacity { get; init; }

Property Value

ReturnConsumedCapacity

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

ReturnItemCollectionMetrics

ReturnValues

Gets what to return in Attributes: None or AllOld.

public ReturnValue ReturnValues { get; init; }

Property Value

ReturnValue

ReturnValuesOnConditionCheckFailure

Gets whether a failed condition returns the existing item in Item.

public ReturnValuesOnConditionCheckFailure ReturnValuesOnConditionCheckFailure { get; init; }

Property Value

ReturnValuesOnConditionCheckFailure

TableName

Gets the table name (or table ARN).

public required string TableName { get; init; }

Property Value

string

Methods

Equals(PutItemRequest?)

public bool Equals(PutItemRequest? other)

Parameters

other PutItemRequest

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(PutItemRequest?, PutItemRequest?)

public static bool operator ==(PutItemRequest? left, PutItemRequest? right)

Parameters

left PutItemRequest
right PutItemRequest

Returns

bool

operator !=(PutItemRequest?, PutItemRequest?)

public static bool operator !=(PutItemRequest? left, PutItemRequest? right)

Parameters

left PutItemRequest
right PutItemRequest

Returns

bool