CosmosDbPartitionedStorage.WriteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts or updates one or more items into the Cosmos DB container.
public System.Threading.Tasks.Task WriteAsync (System.Collections.Generic.IDictionary<string,object> changes, System.Threading.CancellationToken cancellationToken = default);
abstract member WriteAsync : System.Collections.Generic.IDictionary<string, obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.WriteAsync : System.Collections.Generic.IDictionary<string, obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WriteAsync (changes As IDictionary(Of String, Object), Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- changes
- IDictionary<String,Object>
A dictionary of items to be inserted or updated. The dictionary item key is used as the ID for the inserted / updated item.
- cancellationToken
- CancellationToken
Returns
A Task representing the work to be executed.
Implements
Exceptions
Exception thrown if the changes dictionary is null.
Exception thrown is the etag is empty on any of the items within the changes dictionary.