ConsistencyPolicy Class
The consistency policy for the Cosmos DB database account.
All required parameters must be populated in order to send to server.
- Inheritance
-
azure.mgmt.cosmosdb._serialization.ModelConsistencyPolicy
Constructor
ConsistencyPolicy(*, default_consistency_level: str | _models.DefaultConsistencyLevel, max_staleness_prefix: int | None = None, max_interval_in_seconds: int | None = None, **kwargs: Any)
Keyword-Only Parameters
Name | Description |
---|---|
default_consistency_level
|
The default consistency level and configuration settings of the Cosmos DB account. Required. Known values are: "Eventual", "Session", "BoundedStaleness", "Strong", and "ConsistentPrefix". |
max_staleness_prefix
|
When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. |
max_interval_in_seconds
|
When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. |
Variables
Name | Description |
---|---|
default_consistency_level
|
The default consistency level and configuration settings of the Cosmos DB account. Required. Known values are: "Eventual", "Session", "BoundedStaleness", "Strong", and "ConsistentPrefix". |
max_staleness_prefix
|
When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. |
max_interval_in_seconds
|
When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. |
Azure SDK for Python