# DynamoDBStorage.PutEntryAsync(string, Dictionary&lt;string, AttributeValue&gt;, CancellationToken, string, Dictionary&lt;string, AttributeValue&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions.dynamodb/orleans.transactions.dynamodb.dynamodbstorage/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.transactions.dynamodb/orleans.transactions.dynamodb.dynamodbstorage/methods/)

[Source](https://github.com/dotnet/orleans/blob/8bc9fd244427351ad24ccc039a9e7642a42c1cc4/src/AWS/Shared/Storage/DynamoDBStorage.cs#L510-L529)

```csharp
public Task PutEntryAsync(string tableName, Dictionary<string, AttributeValue> fields, CancellationToken cancellationToken, string conditionExpression = "", Dictionary<string, AttributeValue>? conditionValues = null)
```

Creates or replaces an entry using the supplied cancellation token.

### Parameters

- `tableName` (`string`): The table name.
- `fields` (`Dictionary<string, AttributeValue>`): The fields to write.
- `cancellationToken` (`CancellationToken`): The cancellation token.
- `conditionExpression` (`string`): The optional conditional expression.
- `conditionValues` (`Dictionary<string, AttributeValue>`): The conditional expression values.
