# IJournalStorage.UpdateMetadataAsync(IReadOnlyDictionary&lt;string, string&gt;, IEnumerable&lt;string&gt;, string?, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.ijournalstorage/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.ijournalstorage/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/IJournalStorage.cs#L67)

```csharp
public virtual ValueTask<IJournalMetadata?> UpdateMetadataAsync(IReadOnlyDictionary<string, string>? set = null, IEnumerable<string>? remove = null, string? expectedETag = null, CancellationToken cancellationToken = default(CancellationToken))
```

Conditionally updates caller-owned metadata properties.

### Parameters

- `set` (`IReadOnlyDictionary<string, string>`): Metadata properties to set.
- `remove` (`IEnumerable<string>`): Metadata properties to remove.
- `expectedETag` (`string?`): The expected metadata ETag, or `null` for an unconditional update.
- `cancellationToken` (`CancellationToken`): The cancellation token.

### Returns

The current metadata if the update was applied or made no changes; otherwise, `null`.
