com.pulumi.azure.cosmosdb.kotlin.outputs.AccountConsistencyPolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.cosmosdb.kotlin.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
*
* @property consistencyLevel The Consistency Level to use for this CosmosDB Account - can be either `BoundedStaleness`, `Eventual`, `Session`, `Strong` or `ConsistentPrefix`.
* @property maxIntervalInSeconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is `5` - `86400` (1 day). Defaults to `5`. Required when `consistency_level` is set to `BoundedStaleness`.
* @property maxStalenessPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is `10` – `2147483647`. Defaults to `100`. Required when `consistency_level` is set to `BoundedStaleness`.
* > **Note:** `max_interval_in_seconds` and `max_staleness_prefix` can only be set to values other than default when the `consistency_level` is set to `BoundedStaleness`.
*/
public data class AccountConsistencyPolicy(
public val consistencyLevel: String,
public val maxIntervalInSeconds: Int? = null,
public val maxStalenessPrefix: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.azure.cosmosdb.outputs.AccountConsistencyPolicy):
AccountConsistencyPolicy = AccountConsistencyPolicy(
consistencyLevel = javaType.consistencyLevel(),
maxIntervalInSeconds = javaType.maxIntervalInSeconds().map({ args0 -> args0 }).orElse(null),
maxStalenessPrefix = javaType.maxStalenessPrefix().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy