如何在 Azure Cosmos DB 更改源中启用完全保真

How to enable full fidelity in Azure Cosmos DB Change Feed

我正在尝试使用以下代码在 Change Feed 中启用完全保真度:

ContainerProperties containerProperties = new ContainerProperties("myContainer", "/pk");
containerProperties.ChangeFeedPolicy.FullFidelityRetention = TimeSpan.FromMinutes(5);

CosmosContainerResponse containerCreateResponse = await database.CreateContainerAsync(containerProperties, 400);

但我得到以下异常:

The retention duration in Change Feed policy can only be enabled when Full-Fidelity is enabled for database account.

如何为数据库帐户启用此模式?我在门户网站上没有看到选项。

Public 预览版将很快公布,您使用的是预览版 SDK,并且已启用 API 供用户在 public 预览版公布且可以注册后使用它们。敬请关注:)