com.pulumi.azure.cosmosdb.kotlin.inputs.AccountConsistencyPolicyArgs.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.inputs
import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @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 AccountConsistencyPolicyArgs(
public val consistencyLevel: Output,
public val maxIntervalInSeconds: Output? = null,
public val maxStalenessPrefix: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs =
com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs.builder()
.consistencyLevel(consistencyLevel.applyValue({ args0 -> args0 }))
.maxIntervalInSeconds(maxIntervalInSeconds?.applyValue({ args0 -> args0 }))
.maxStalenessPrefix(maxStalenessPrefix?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AccountConsistencyPolicyArgs].
*/
@PulumiTagMarker
public class AccountConsistencyPolicyArgsBuilder internal constructor() {
private var consistencyLevel: Output? = null
private var maxIntervalInSeconds: Output? = null
private var maxStalenessPrefix: Output? = null
/**
* @param value The Consistency Level to use for this CosmosDB Account - can be either `BoundedStaleness`, `Eventual`, `Session`, `Strong` or `ConsistentPrefix`.
*/
@JvmName("wukcrgpeubovnhwm")
public suspend fun consistencyLevel(`value`: Output) {
this.consistencyLevel = value
}
/**
* @param value 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`.
*/
@JvmName("srlnqpjcpklsiscr")
public suspend fun maxIntervalInSeconds(`value`: Output) {
this.maxIntervalInSeconds = value
}
/**
* @param value 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`.
*/
@JvmName("utsojpnxrgafjjcj")
public suspend fun maxStalenessPrefix(`value`: Output) {
this.maxStalenessPrefix = value
}
/**
* @param value The Consistency Level to use for this CosmosDB Account - can be either `BoundedStaleness`, `Eventual`, `Session`, `Strong` or `ConsistentPrefix`.
*/
@JvmName("fknfqiuamsuttdgg")
public suspend fun consistencyLevel(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.consistencyLevel = mapped
}
/**
* @param value 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`.
*/
@JvmName("xtdjxbowuekapayi")
public suspend fun maxIntervalInSeconds(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maxIntervalInSeconds = mapped
}
/**
* @param value 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`.
*/
@JvmName("mnkfhcfwitagkorf")
public suspend fun maxStalenessPrefix(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maxStalenessPrefix = mapped
}
internal fun build(): AccountConsistencyPolicyArgs = AccountConsistencyPolicyArgs(
consistencyLevel = consistencyLevel ?: throw PulumiNullFieldException("consistencyLevel"),
maxIntervalInSeconds = maxIntervalInSeconds,
maxStalenessPrefix = maxStalenessPrefix,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy