Class RedisConfiguration

java.lang.Object
com.azure.resourcemanager.redis.models.RedisConfiguration
All Implemented Interfaces:
com.azure.json.JsonSerializable<RedisConfiguration>

public final class RedisConfiguration extends Object implements com.azure.json.JsonSerializable<RedisConfiguration>
All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc.
  • Constructor Details

    • RedisConfiguration

      public RedisConfiguration()
      Creates an instance of RedisConfiguration class.
  • Method Details

    • rdbBackupEnabled

      public String rdbBackupEnabled()
      Get the rdbBackupEnabled property: Specifies whether the rdb backup is enabled.
      Returns:
      the rdbBackupEnabled value.
    • withRdbBackupEnabled

      public RedisConfiguration withRdbBackupEnabled(String rdbBackupEnabled)
      Set the rdbBackupEnabled property: Specifies whether the rdb backup is enabled.
      Parameters:
      rdbBackupEnabled - the rdbBackupEnabled value to set.
      Returns:
      the RedisConfiguration object itself.
    • rdbBackupFrequency

      public String rdbBackupFrequency()
      Get the rdbBackupFrequency property: Specifies the frequency for creating rdb backup in minutes. Valid values: (15, 30, 60, 360, 720, 1440).
      Returns:
      the rdbBackupFrequency value.
    • withRdbBackupFrequency

      public RedisConfiguration withRdbBackupFrequency(String rdbBackupFrequency)
      Set the rdbBackupFrequency property: Specifies the frequency for creating rdb backup in minutes. Valid values: (15, 30, 60, 360, 720, 1440).
      Parameters:
      rdbBackupFrequency - the rdbBackupFrequency value to set.
      Returns:
      the RedisConfiguration object itself.
    • rdbBackupMaxSnapshotCount

      public String rdbBackupMaxSnapshotCount()
      Get the rdbBackupMaxSnapshotCount property: Specifies the maximum number of snapshots for rdb backup.
      Returns:
      the rdbBackupMaxSnapshotCount value.
    • withRdbBackupMaxSnapshotCount

      public RedisConfiguration withRdbBackupMaxSnapshotCount(String rdbBackupMaxSnapshotCount)
      Set the rdbBackupMaxSnapshotCount property: Specifies the maximum number of snapshots for rdb backup.
      Parameters:
      rdbBackupMaxSnapshotCount - the rdbBackupMaxSnapshotCount value to set.
      Returns:
      the RedisConfiguration object itself.
    • rdbStorageConnectionString

      public String rdbStorageConnectionString()
      Get the rdbStorageConnectionString property: The storage account connection string for storing rdb file.
      Returns:
      the rdbStorageConnectionString value.
    • withRdbStorageConnectionString

      public RedisConfiguration withRdbStorageConnectionString(String rdbStorageConnectionString)
      Set the rdbStorageConnectionString property: The storage account connection string for storing rdb file.
      Parameters:
      rdbStorageConnectionString - the rdbStorageConnectionString value to set.
      Returns:
      the RedisConfiguration object itself.
    • aofBackupEnabled

      public String aofBackupEnabled()
      Get the aofBackupEnabled property: Specifies whether the aof backup is enabled.
      Returns:
      the aofBackupEnabled value.
    • withAofBackupEnabled

      public RedisConfiguration withAofBackupEnabled(String aofBackupEnabled)
      Set the aofBackupEnabled property: Specifies whether the aof backup is enabled.
      Parameters:
      aofBackupEnabled - the aofBackupEnabled value to set.
      Returns:
      the RedisConfiguration object itself.
    • aofStorageConnectionString0

      public String aofStorageConnectionString0()
      Get the aofStorageConnectionString0 property: First storage account connection string.
      Returns:
      the aofStorageConnectionString0 value.
    • withAofStorageConnectionString0

      public RedisConfiguration withAofStorageConnectionString0(String aofStorageConnectionString0)
      Set the aofStorageConnectionString0 property: First storage account connection string.
      Parameters:
      aofStorageConnectionString0 - the aofStorageConnectionString0 value to set.
      Returns:
      the RedisConfiguration object itself.
    • aofStorageConnectionString1

      public String aofStorageConnectionString1()
      Get the aofStorageConnectionString1 property: Second storage account connection string.
      Returns:
      the aofStorageConnectionString1 value.
    • withAofStorageConnectionString1

      public RedisConfiguration withAofStorageConnectionString1(String aofStorageConnectionString1)
      Set the aofStorageConnectionString1 property: Second storage account connection string.
      Parameters:
      aofStorageConnectionString1 - the aofStorageConnectionString1 value to set.
      Returns:
      the RedisConfiguration object itself.
    • maxfragmentationmemoryReserved

      public String maxfragmentationmemoryReserved()
      Get the maxfragmentationmemoryReserved property: Value in megabytes reserved for fragmentation per shard.
      Returns:
      the maxfragmentationmemoryReserved value.
    • withMaxfragmentationmemoryReserved

      public RedisConfiguration withMaxfragmentationmemoryReserved(String maxfragmentationmemoryReserved)
      Set the maxfragmentationmemoryReserved property: Value in megabytes reserved for fragmentation per shard.
      Parameters:
      maxfragmentationmemoryReserved - the maxfragmentationmemoryReserved value to set.
      Returns:
      the RedisConfiguration object itself.
    • maxmemoryPolicy

      public String maxmemoryPolicy()
      Get the maxmemoryPolicy property: The eviction strategy used when your data won't fit within its memory limit.
      Returns:
      the maxmemoryPolicy value.
    • withMaxmemoryPolicy

      public RedisConfiguration withMaxmemoryPolicy(String maxmemoryPolicy)
      Set the maxmemoryPolicy property: The eviction strategy used when your data won't fit within its memory limit.
      Parameters:
      maxmemoryPolicy - the maxmemoryPolicy value to set.
      Returns:
      the RedisConfiguration object itself.
    • maxmemoryReserved

      public String maxmemoryReserved()
      Get the maxmemoryReserved property: Value in megabytes reserved for non-cache usage per shard e.g. failover.
      Returns:
      the maxmemoryReserved value.
    • withMaxmemoryReserved

      public RedisConfiguration withMaxmemoryReserved(String maxmemoryReserved)
      Set the maxmemoryReserved property: Value in megabytes reserved for non-cache usage per shard e.g. failover.
      Parameters:
      maxmemoryReserved - the maxmemoryReserved value to set.
      Returns:
      the RedisConfiguration object itself.
    • maxmemoryDelta

      public String maxmemoryDelta()
      Get the maxmemoryDelta property: Value in megabytes reserved for non-cache usage per shard e.g. failover.
      Returns:
      the maxmemoryDelta value.
    • withMaxmemoryDelta

      public RedisConfiguration withMaxmemoryDelta(String maxmemoryDelta)
      Set the maxmemoryDelta property: Value in megabytes reserved for non-cache usage per shard e.g. failover.
      Parameters:
      maxmemoryDelta - the maxmemoryDelta value to set.
      Returns:
      the RedisConfiguration object itself.
    • maxclients

      public String maxclients()
      Get the maxclients property: The max clients config.
      Returns:
      the maxclients value.
    • notifyKeyspaceEvents

      public String notifyKeyspaceEvents()
      Get the notifyKeyspaceEvents property: The keyspace events which should be monitored.
      Returns:
      the notifyKeyspaceEvents value.
    • withNotifyKeyspaceEvents

      public RedisConfiguration withNotifyKeyspaceEvents(String notifyKeyspaceEvents)
      Set the notifyKeyspaceEvents property: The keyspace events which should be monitored.
      Parameters:
      notifyKeyspaceEvents - the notifyKeyspaceEvents value to set.
      Returns:
      the RedisConfiguration object itself.
    • preferredDataArchiveAuthMethod

      public String preferredDataArchiveAuthMethod()
      Get the preferredDataArchiveAuthMethod property: Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS.
      Returns:
      the preferredDataArchiveAuthMethod value.
    • preferredDataPersistenceAuthMethod

      public String preferredDataPersistenceAuthMethod()
      Get the preferredDataPersistenceAuthMethod property: Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS.
      Returns:
      the preferredDataPersistenceAuthMethod value.
    • withPreferredDataPersistenceAuthMethod

      public RedisConfiguration withPreferredDataPersistenceAuthMethod(String preferredDataPersistenceAuthMethod)
      Set the preferredDataPersistenceAuthMethod property: Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS.
      Parameters:
      preferredDataPersistenceAuthMethod - the preferredDataPersistenceAuthMethod value to set.
      Returns:
      the RedisConfiguration object itself.
    • zonalConfiguration

      public String zonalConfiguration()
      Get the zonalConfiguration property: Zonal Configuration.
      Returns:
      the zonalConfiguration value.
    • authnotrequired

      public String authnotrequired()
      Get the authnotrequired property: Specifies whether the authentication is disabled. Setting this property is highly discouraged from security point of view.
      Returns:
      the authnotrequired value.
    • withAuthnotrequired

      public RedisConfiguration withAuthnotrequired(String authnotrequired)
      Set the authnotrequired property: Specifies whether the authentication is disabled. Setting this property is highly discouraged from security point of view.
      Parameters:
      authnotrequired - the authnotrequired value to set.
      Returns:
      the RedisConfiguration object itself.
    • storageSubscriptionId

      public String storageSubscriptionId()
      Get the storageSubscriptionId property: SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity.
      Returns:
      the storageSubscriptionId value.
    • withStorageSubscriptionId

      public RedisConfiguration withStorageSubscriptionId(String storageSubscriptionId)
      Set the storageSubscriptionId property: SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity.
      Parameters:
      storageSubscriptionId - the storageSubscriptionId value to set.
      Returns:
      the RedisConfiguration object itself.
    • aadEnabled

      public String aadEnabled()
      Get the aadEnabled property: Specifies whether AAD based authentication has been enabled or disabled for the cache.
      Returns:
      the aadEnabled value.
    • withAadEnabled

      public RedisConfiguration withAadEnabled(String aadEnabled)
      Set the aadEnabled property: Specifies whether AAD based authentication has been enabled or disabled for the cache.
      Parameters:
      aadEnabled - the aadEnabled value to set.
      Returns:
      the RedisConfiguration object itself.
    • additionalProperties

      public Map<String,String> additionalProperties()
      Get the additionalProperties property: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc.
      Returns:
      the additionalProperties value.
    • withAdditionalProperties

      public RedisConfiguration withAdditionalProperties(Map<String,String> additionalProperties)
      Set the additionalProperties property: All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc.
      Parameters:
      additionalProperties - the additionalProperties value to set.
      Returns:
      the RedisConfiguration object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RedisConfiguration>
      Throws:
      IOException
    • fromJson

      public static RedisConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RedisConfiguration from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RedisConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the RedisConfiguration.