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

com.pulumi.azure.redis.kotlin.inputs.CacheRedisConfigurationArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.redis.kotlin.inputs

import com.pulumi.azure.redis.inputs.CacheRedisConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property activeDirectoryAuthenticationEnabled Enable Microsoft Entra (AAD) authentication. Defaults to `false`.
 * @property aofBackupEnabled Enable or disable AOF persistence for this Redis Cache. Defaults to `false`.
 * > **NOTE:** `aof_backup_enabled` can only be set when SKU is `Premium`.
 * @property aofStorageConnectionString0 First Storage Account connection string for AOF persistence.
 * @property aofStorageConnectionString1 Second Storage Account connection string for AOF persistence.
 * Example usage:
 * @property authenticationEnabled
 * @property dataPersistenceAuthenticationMethod Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. Defaults to `SAS`.
 * @property enableAuthentication If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.
 * > **NOTE:** `enable_authentication` can only be set to `false` if a `subnet_id` is specified; and only works if there aren't existing instances within the subnet with `enable_authentication` set to `true`.
 * @property maxclients Returns the max number of connected clients at the same time.
 * @property maxfragmentationmemoryReserved Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.
 * @property maxmemoryDelta The max-memory delta for this Redis instance. Defaults are shown below.
 * @property maxmemoryPolicy How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`.
 * @property maxmemoryReserved Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.
 * @property notifyKeyspaceEvents Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)
 * @property rdbBackupEnabled Is Backup Enabled? Only supported on Premium SKUs. Defaults to `false`.
 * > **NOTE:** If `rdb_backup_enabled` set to `true`, `rdb_storage_connection_string` must also be set.
 * @property rdbBackupFrequency The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.
 * @property rdbBackupMaxSnapshotCount The maximum number of snapshots to create as a backup. Only supported for Premium SKUs.
 * @property rdbStorageConnectionString The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.
 * > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.:
 * @property storageAccountSubscriptionId The ID of the Subscription containing the Storage Account.
 * 
 * ```yaml
 * resources:
 *   example:
 *     type: azure:redis:Cache
 *     properties:
 *       ignoreChanges:
 *         - ${redisConfiguration[0].rdbStorageConnectionString}
 * ```
 * 
 */
public data class CacheRedisConfigurationArgs(
    public val activeDirectoryAuthenticationEnabled: Output? = null,
    public val aofBackupEnabled: Output? = null,
    public val aofStorageConnectionString0: Output? = null,
    public val aofStorageConnectionString1: Output? = null,
    public val authenticationEnabled: Output? = null,
    public val dataPersistenceAuthenticationMethod: Output? = null,
    @Deprecated(
        message = """
  `enable_authentication` will be removed in favour of the property `authentication_enabled` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    public val enableAuthentication: Output? = null,
    public val maxclients: Output? = null,
    public val maxfragmentationmemoryReserved: Output? = null,
    public val maxmemoryDelta: Output? = null,
    public val maxmemoryPolicy: Output? = null,
    public val maxmemoryReserved: Output? = null,
    public val notifyKeyspaceEvents: Output? = null,
    public val rdbBackupEnabled: Output? = null,
    public val rdbBackupFrequency: Output? = null,
    public val rdbBackupMaxSnapshotCount: Output? = null,
    public val rdbStorageConnectionString: Output? = null,
    public val storageAccountSubscriptionId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.redis.inputs.CacheRedisConfigurationArgs =
        com.pulumi.azure.redis.inputs.CacheRedisConfigurationArgs.builder()
            .activeDirectoryAuthenticationEnabled(
                activeDirectoryAuthenticationEnabled?.applyValue({ args0 ->
                    args0
                }),
            )
            .aofBackupEnabled(aofBackupEnabled?.applyValue({ args0 -> args0 }))
            .aofStorageConnectionString0(aofStorageConnectionString0?.applyValue({ args0 -> args0 }))
            .aofStorageConnectionString1(aofStorageConnectionString1?.applyValue({ args0 -> args0 }))
            .authenticationEnabled(authenticationEnabled?.applyValue({ args0 -> args0 }))
            .dataPersistenceAuthenticationMethod(
                dataPersistenceAuthenticationMethod?.applyValue({ args0 ->
                    args0
                }),
            )
            .enableAuthentication(enableAuthentication?.applyValue({ args0 -> args0 }))
            .maxclients(maxclients?.applyValue({ args0 -> args0 }))
            .maxfragmentationmemoryReserved(maxfragmentationmemoryReserved?.applyValue({ args0 -> args0 }))
            .maxmemoryDelta(maxmemoryDelta?.applyValue({ args0 -> args0 }))
            .maxmemoryPolicy(maxmemoryPolicy?.applyValue({ args0 -> args0 }))
            .maxmemoryReserved(maxmemoryReserved?.applyValue({ args0 -> args0 }))
            .notifyKeyspaceEvents(notifyKeyspaceEvents?.applyValue({ args0 -> args0 }))
            .rdbBackupEnabled(rdbBackupEnabled?.applyValue({ args0 -> args0 }))
            .rdbBackupFrequency(rdbBackupFrequency?.applyValue({ args0 -> args0 }))
            .rdbBackupMaxSnapshotCount(rdbBackupMaxSnapshotCount?.applyValue({ args0 -> args0 }))
            .rdbStorageConnectionString(rdbStorageConnectionString?.applyValue({ args0 -> args0 }))
            .storageAccountSubscriptionId(storageAccountSubscriptionId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CacheRedisConfigurationArgs].
 */
@PulumiTagMarker
public class CacheRedisConfigurationArgsBuilder internal constructor() {
    private var activeDirectoryAuthenticationEnabled: Output? = null

    private var aofBackupEnabled: Output? = null

    private var aofStorageConnectionString0: Output? = null

    private var aofStorageConnectionString1: Output? = null

    private var authenticationEnabled: Output? = null

    private var dataPersistenceAuthenticationMethod: Output? = null

    private var enableAuthentication: Output? = null

    private var maxclients: Output? = null

    private var maxfragmentationmemoryReserved: Output? = null

    private var maxmemoryDelta: Output? = null

    private var maxmemoryPolicy: Output? = null

    private var maxmemoryReserved: Output? = null

    private var notifyKeyspaceEvents: Output? = null

    private var rdbBackupEnabled: Output? = null

    private var rdbBackupFrequency: Output? = null

    private var rdbBackupMaxSnapshotCount: Output? = null

    private var rdbStorageConnectionString: Output? = null

    private var storageAccountSubscriptionId: Output? = null

    /**
     * @param value Enable Microsoft Entra (AAD) authentication. Defaults to `false`.
     */
    @JvmName("jrckqjmqtfdxddxp")
    public suspend fun activeDirectoryAuthenticationEnabled(`value`: Output) {
        this.activeDirectoryAuthenticationEnabled = value
    }

    /**
     * @param value Enable or disable AOF persistence for this Redis Cache. Defaults to `false`.
     * > **NOTE:** `aof_backup_enabled` can only be set when SKU is `Premium`.
     */
    @JvmName("cxrvascyjffcvils")
    public suspend fun aofBackupEnabled(`value`: Output) {
        this.aofBackupEnabled = value
    }

    /**
     * @param value First Storage Account connection string for AOF persistence.
     */
    @JvmName("dsnnxfbqnjivamqs")
    public suspend fun aofStorageConnectionString0(`value`: Output) {
        this.aofStorageConnectionString0 = value
    }

    /**
     * @param value Second Storage Account connection string for AOF persistence.
     * Example usage:
     */
    @JvmName("jpdtihcaklhdydoe")
    public suspend fun aofStorageConnectionString1(`value`: Output) {
        this.aofStorageConnectionString1 = value
    }

    /**
     * @param value
     */
    @JvmName("qmcanedpmstgdlvr")
    public suspend fun authenticationEnabled(`value`: Output) {
        this.authenticationEnabled = value
    }

    /**
     * @param value Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. Defaults to `SAS`.
     */
    @JvmName("tuyvsvyowuqgqard")
    public suspend fun dataPersistenceAuthenticationMethod(`value`: Output) {
        this.dataPersistenceAuthenticationMethod = value
    }

    /**
     * @param value If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.
     * > **NOTE:** `enable_authentication` can only be set to `false` if a `subnet_id` is specified; and only works if there aren't existing instances within the subnet with `enable_authentication` set to `true`.
     */
    @Deprecated(
        message = """
  `enable_authentication` will be removed in favour of the property `authentication_enabled` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("jwknusutmmcrvsen")
    public suspend fun enableAuthentication(`value`: Output) {
        this.enableAuthentication = value
    }

    /**
     * @param value Returns the max number of connected clients at the same time.
     */
    @JvmName("noilwyoxpldecait")
    public suspend fun maxclients(`value`: Output) {
        this.maxclients = value
    }

    /**
     * @param value Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.
     */
    @JvmName("wqxvcjiqwqsfdahi")
    public suspend fun maxfragmentationmemoryReserved(`value`: Output) {
        this.maxfragmentationmemoryReserved = value
    }

    /**
     * @param value The max-memory delta for this Redis instance. Defaults are shown below.
     */
    @JvmName("hanmsyootnhcaulv")
    public suspend fun maxmemoryDelta(`value`: Output) {
        this.maxmemoryDelta = value
    }

    /**
     * @param value How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`.
     */
    @JvmName("tovoawdeyaqiymoa")
    public suspend fun maxmemoryPolicy(`value`: Output) {
        this.maxmemoryPolicy = value
    }

    /**
     * @param value Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.
     */
    @JvmName("sdvthxemcptqmchk")
    public suspend fun maxmemoryReserved(`value`: Output) {
        this.maxmemoryReserved = value
    }

    /**
     * @param value Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)
     */
    @JvmName("wencukfkleegipju")
    public suspend fun notifyKeyspaceEvents(`value`: Output) {
        this.notifyKeyspaceEvents = value
    }

    /**
     * @param value Is Backup Enabled? Only supported on Premium SKUs. Defaults to `false`.
     * > **NOTE:** If `rdb_backup_enabled` set to `true`, `rdb_storage_connection_string` must also be set.
     */
    @JvmName("maennmndqbsphixg")
    public suspend fun rdbBackupEnabled(`value`: Output) {
        this.rdbBackupEnabled = value
    }

    /**
     * @param value The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.
     */
    @JvmName("wncwfywqlloiyiap")
    public suspend fun rdbBackupFrequency(`value`: Output) {
        this.rdbBackupFrequency = value
    }

    /**
     * @param value The maximum number of snapshots to create as a backup. Only supported for Premium SKUs.
     */
    @JvmName("jufnejegrbfbhmoj")
    public suspend fun rdbBackupMaxSnapshotCount(`value`: Output) {
        this.rdbBackupMaxSnapshotCount = value
    }

    /**
     * @param value The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.
     * > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.:
     */
    @JvmName("yfrsbdbmwisahavt")
    public suspend fun rdbStorageConnectionString(`value`: Output) {
        this.rdbStorageConnectionString = value
    }

    /**
     * @param value The ID of the Subscription containing the Storage Account.
     * 
     * ```yaml
     * resources:
     *   example:
     *     type: azure:redis:Cache
     *     properties:
     *       ignoreChanges:
     *         - ${redisConfiguration[0].rdbStorageConnectionString}
     * ```
     * 
     */
    @JvmName("rafervlxqnffimwo")
    public suspend fun storageAccountSubscriptionId(`value`: Output) {
        this.storageAccountSubscriptionId = value
    }

    /**
     * @param value Enable Microsoft Entra (AAD) authentication. Defaults to `false`.
     */
    @JvmName("uielchfpbchpqsfc")
    public suspend fun activeDirectoryAuthenticationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activeDirectoryAuthenticationEnabled = mapped
    }

    /**
     * @param value Enable or disable AOF persistence for this Redis Cache. Defaults to `false`.
     * > **NOTE:** `aof_backup_enabled` can only be set when SKU is `Premium`.
     */
    @JvmName("nhktjsjthytjleub")
    public suspend fun aofBackupEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aofBackupEnabled = mapped
    }

    /**
     * @param value First Storage Account connection string for AOF persistence.
     */
    @JvmName("iffpvaeddkrimwpe")
    public suspend fun aofStorageConnectionString0(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aofStorageConnectionString0 = mapped
    }

    /**
     * @param value Second Storage Account connection string for AOF persistence.
     * Example usage:
     */
    @JvmName("bqpvnbbrkxypbdya")
    public suspend fun aofStorageConnectionString1(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aofStorageConnectionString1 = mapped
    }

    /**
     * @param value
     */
    @JvmName("jgsawyxwliiatfhq")
    public suspend fun authenticationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authenticationEnabled = mapped
    }

    /**
     * @param value Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. Defaults to `SAS`.
     */
    @JvmName("hswyxjjfwjlmldpl")
    public suspend fun dataPersistenceAuthenticationMethod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataPersistenceAuthenticationMethod = mapped
    }

    /**
     * @param value If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.
     * > **NOTE:** `enable_authentication` can only be set to `false` if a `subnet_id` is specified; and only works if there aren't existing instances within the subnet with `enable_authentication` set to `true`.
     */
    @Deprecated(
        message = """
  `enable_authentication` will be removed in favour of the property `authentication_enabled` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("sgoihpouaoyglxpo")
    public suspend fun enableAuthentication(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableAuthentication = mapped
    }

    /**
     * @param value Returns the max number of connected clients at the same time.
     */
    @JvmName("xetkxeevqsexjxlj")
    public suspend fun maxclients(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxclients = mapped
    }

    /**
     * @param value Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.
     */
    @JvmName("hkbetmfuxmkmyexx")
    public suspend fun maxfragmentationmemoryReserved(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxfragmentationmemoryReserved = mapped
    }

    /**
     * @param value The max-memory delta for this Redis instance. Defaults are shown below.
     */
    @JvmName("hrcnbpgoykqyksay")
    public suspend fun maxmemoryDelta(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxmemoryDelta = mapped
    }

    /**
     * @param value How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`.
     */
    @JvmName("ovmpvkblfpanfthd")
    public suspend fun maxmemoryPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxmemoryPolicy = mapped
    }

    /**
     * @param value Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.
     */
    @JvmName("liiasvpgncnkprgq")
    public suspend fun maxmemoryReserved(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxmemoryReserved = mapped
    }

    /**
     * @param value Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)
     */
    @JvmName("ummycrqunarrucrl")
    public suspend fun notifyKeyspaceEvents(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notifyKeyspaceEvents = mapped
    }

    /**
     * @param value Is Backup Enabled? Only supported on Premium SKUs. Defaults to `false`.
     * > **NOTE:** If `rdb_backup_enabled` set to `true`, `rdb_storage_connection_string` must also be set.
     */
    @JvmName("xulsimxjwuwpnnyk")
    public suspend fun rdbBackupEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rdbBackupEnabled = mapped
    }

    /**
     * @param value The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.
     */
    @JvmName("bindueeythrycxma")
    public suspend fun rdbBackupFrequency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rdbBackupFrequency = mapped
    }

    /**
     * @param value The maximum number of snapshots to create as a backup. Only supported for Premium SKUs.
     */
    @JvmName("bthvunwcpjhbgyxm")
    public suspend fun rdbBackupMaxSnapshotCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rdbBackupMaxSnapshotCount = mapped
    }

    /**
     * @param value The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.
     * > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.:
     */
    @JvmName("ohhafpcsrlekpxtf")
    public suspend fun rdbStorageConnectionString(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rdbStorageConnectionString = mapped
    }

    /**
     * @param value The ID of the Subscription containing the Storage Account.
     * 
     * ```yaml
     * resources:
     *   example:
     *     type: azure:redis:Cache
     *     properties:
     *       ignoreChanges:
     *         - ${redisConfiguration[0].rdbStorageConnectionString}
     * ```
     * 
     */
    @JvmName("quogerkncpykblvx")
    public suspend fun storageAccountSubscriptionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountSubscriptionId = mapped
    }

    internal fun build(): CacheRedisConfigurationArgs = CacheRedisConfigurationArgs(
        activeDirectoryAuthenticationEnabled = activeDirectoryAuthenticationEnabled,
        aofBackupEnabled = aofBackupEnabled,
        aofStorageConnectionString0 = aofStorageConnectionString0,
        aofStorageConnectionString1 = aofStorageConnectionString1,
        authenticationEnabled = authenticationEnabled,
        dataPersistenceAuthenticationMethod = dataPersistenceAuthenticationMethod,
        enableAuthentication = enableAuthentication,
        maxclients = maxclients,
        maxfragmentationmemoryReserved = maxfragmentationmemoryReserved,
        maxmemoryDelta = maxmemoryDelta,
        maxmemoryPolicy = maxmemoryPolicy,
        maxmemoryReserved = maxmemoryReserved,
        notifyKeyspaceEvents = notifyKeyspaceEvents,
        rdbBackupEnabled = rdbBackupEnabled,
        rdbBackupFrequency = rdbBackupFrequency,
        rdbBackupMaxSnapshotCount = rdbBackupMaxSnapshotCount,
        rdbStorageConnectionString = rdbStorageConnectionString,
        storageAccountSubscriptionId = storageAccountSubscriptionId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy