com.pulumi.azure.redis.kotlin.inputs.CacheRedisConfigurationArgs.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.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.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 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.
*
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.redis.Cache;
* import com.pulumi.azure.redis.CacheArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Cache("example", CacheArgs.builder()
* .ignoreChanges(redisConfiguration[0].rdbStorageConnectionString())
* .build());
* }
* }
* ```
* ```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 dataPersistenceAuthenticationMethod: Output? = null,
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 }))
.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 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("bgtiiaihbookdfsv")
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("pmirosapssqbphxa")
public suspend fun aofBackupEnabled(`value`: Output) {
this.aofBackupEnabled = value
}
/**
* @param value First Storage Account connection string for AOF persistence.
*/
@JvmName("txubcvqwtitjunvs")
public suspend fun aofStorageConnectionString0(`value`: Output) {
this.aofStorageConnectionString0 = value
}
/**
* @param value Second Storage Account connection string for AOF persistence.
* Example usage:
*/
@JvmName("oasbbpfjmbgaubpy")
public suspend fun aofStorageConnectionString1(`value`: Output) {
this.aofStorageConnectionString1 = 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("jubxkkdobwpiiuah")
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`.
*/
@JvmName("jgoiutpphapppqon")
public suspend fun enableAuthentication(`value`: Output) {
this.enableAuthentication = value
}
/**
* @param value Returns the max number of connected clients at the same time.
*/
@JvmName("nigattkrllhejehw")
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("luburcsdpujjarwu")
public suspend fun maxfragmentationmemoryReserved(`value`: Output) {
this.maxfragmentationmemoryReserved = value
}
/**
* @param value The max-memory delta for this Redis instance. Defaults are shown below.
*/
@JvmName("qedkalahtculfdfe")
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("dpmrnyvxkrudxrve")
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("kekbuhdsaftshlfa")
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("tvyqyurtvacrwjsh")
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("lknxoyemqwsohrni")
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("utftprytrfkmwmuq")
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("gbbpolecatrbydgm")
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("qbgtniisarovgbtk")
public suspend fun rdbStorageConnectionString(`value`: Output) {
this.rdbStorageConnectionString = value
}
/**
* @param value The ID of the Subscription containing the Storage Account.
*
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.redis.Cache;
* import com.pulumi.azure.redis.CacheArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Cache("example", CacheArgs.builder()
* .ignoreChanges(redisConfiguration[0].rdbStorageConnectionString())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:redis:Cache
* properties:
* ignoreChanges:
* - ${redisConfiguration[0].rdbStorageConnectionString}
* ```
*
*/
@JvmName("empubpvwlkpecncq")
public suspend fun storageAccountSubscriptionId(`value`: Output) {
this.storageAccountSubscriptionId = value
}
/**
* @param value Enable Microsoft Entra (AAD) authentication. Defaults to `false`.
*/
@JvmName("tebcdaxjbofalxay")
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("bkrfoggsbsmpmbhc")
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("wsmiacjwgqdjsanu")
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("ienrpeyqrlsqfgpg")
public suspend fun aofStorageConnectionString1(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.aofStorageConnectionString1 = 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("hoxfrdocdupuwsdg")
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`.
*/
@JvmName("cmsxapjfcywnsttv")
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("nalikpciwbohpbaf")
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("lbcagdkcqwmfwvxt")
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("pcgiwlbevmnkqyro")
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("gxmexxllmsbnuifb")
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("tfemxbmcsaqidhub")
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("cudhrvvugvgfnswa")
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("ndrpcayflnifcuer")
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("qlmaiuboehvqcytv")
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("mohpcwvnoaqgjvyk")
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("vyttmvlrirtemyvj")
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.
*
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.redis.Cache;
* import com.pulumi.azure.redis.CacheArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Cache("example", CacheArgs.builder()
* .ignoreChanges(redisConfiguration[0].rdbStorageConnectionString())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:redis:Cache
* properties:
* ignoreChanges:
* - ${redisConfiguration[0].rdbStorageConnectionString}
* ```
*
*/
@JvmName("skurkxnpmoacxhhv")
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,
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 - 2025 Weber Informatics LLC | Privacy Policy