All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.cosmosdb.kotlin.inputs.AccountGeoLocationArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.cosmosdb.kotlin.inputs

import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs.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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property failoverPriority The failover priority of the region. A failover priority of `0` indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority `0`.
 * @property id The CosmosDB Account ID.
 * @property location The name of the Azure region to host replicated data.
 * @property zoneRedundant Should zone redundancy be enabled for this region? Defaults to `false`.
 */
public data class AccountGeoLocationArgs(
    public val failoverPriority: Output,
    public val id: Output? = null,
    public val location: Output,
    public val zoneRedundant: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs =
        com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs.builder()
            .failoverPriority(failoverPriority.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .location(location.applyValue({ args0 -> args0 }))
            .zoneRedundant(zoneRedundant?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AccountGeoLocationArgs].
 */
@PulumiTagMarker
public class AccountGeoLocationArgsBuilder internal constructor() {
    private var failoverPriority: Output? = null

    private var id: Output? = null

    private var location: Output? = null

    private var zoneRedundant: Output? = null

    /**
     * @param value The failover priority of the region. A failover priority of `0` indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority `0`.
     */
    @JvmName("gecyuvwvsbnuabrt")
    public suspend fun failoverPriority(`value`: Output) {
        this.failoverPriority = value
    }

    /**
     * @param value The CosmosDB Account ID.
     */
    @JvmName("lwlahnuqkajxvqsf")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value The name of the Azure region to host replicated data.
     */
    @JvmName("qhwdqblwkbpuwvwl")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Should zone redundancy be enabled for this region? Defaults to `false`.
     */
    @JvmName("ntwuvsokrooewpvv")
    public suspend fun zoneRedundant(`value`: Output) {
        this.zoneRedundant = value
    }

    /**
     * @param value The failover priority of the region. A failover priority of `0` indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority `0`.
     */
    @JvmName("lepgubntyvmjymko")
    public suspend fun failoverPriority(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.failoverPriority = mapped
    }

    /**
     * @param value The CosmosDB Account ID.
     */
    @JvmName("megoafpxktvbobbt")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value The name of the Azure region to host replicated data.
     */
    @JvmName("iulatcrixbkmgmfl")
    public suspend fun location(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Should zone redundancy be enabled for this region? Defaults to `false`.
     */
    @JvmName("rsiwebhmjcqsbgsm")
    public suspend fun zoneRedundant(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneRedundant = mapped
    }

    internal fun build(): AccountGeoLocationArgs = AccountGeoLocationArgs(
        failoverPriority = failoverPriority ?: throw PulumiNullFieldException("failoverPriority"),
        id = id,
        location = location ?: throw PulumiNullFieldException("location"),
        zoneRedundant = zoneRedundant,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy