Set-AzureRmRedisCache
Modifies a Redis Cache.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmRedisCache
[-ResourceGroupName <String>]
-Name <String>
[-Size <String>]
[-Sku <String>]
[-RedisConfiguration <Hashtable>]
[-EnableNonSslPort <Boolean>]
[-TenantSettings <Hashtable>]
[-ShardCount <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzureRmRedisCache cmdlet modifies an Azure Redis Cache.
Examples
Example 1: Modify a Redis Cache
PS C:\>Set-AzureRmRedisCache -ResourceGroupName "MyGroup" -Name "MyCache" -RedisConfiguration @{"maxmemory-policy" = "allkeys-random"}
PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo=
SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo=
ResourceGroupName : mygroup
Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/mygroup/providers/Microsoft.Cache/Redis/myCache
Location : North Central US
Name : MyCache
Type : Microsoft.Cache/Redis
HostName : mycache.redis.cache.windows.net
Port : 6379
ProvisioningState : creating
SslPort : 6380
RedisConfiguration : {[maxmemory-policy, allkeys-random]}
EnableNonSslPort : False
RedisVersion : 2.8
Size : 250MB
Sku : Standard
Tag : {}
Zone : []
This command updates the maxmemory-policy for the Redis Cache named MyCache.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableNonSslPort
Indicates whether the non-SSL port is enabled. The default value is $False (the non-SSL port is disabled).
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the Redis Cache to update.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RedisConfiguration
Specifies Redis configuration settings. The acceptable values for this parameter are:
- rdb-backup-enabled. Specifies that Redis data persistence is enabled. Premium tier only.
- rdb-storage-connection-string. Specifies the connection string to the Storage account for Redis data persistence. Premium tier only.
- rdb-backup-frequency. Specifies the backup frequency for Redis data persistence. Premium tier only.
- maxmemory-reserved. Configures the memory reserved for non-cache processes. Standard and Premium tiers.
- maxmemory-policy. Configures the eviction policy for the cache. All pricing tiers.
- notify-keyspace-events. Configures keyspace notifications. Standard and premium tiers.
- hash-max-ziplist-entries. Configures memory optimization for small aggregate data types. Standard and Premium tiers.
- hash-max-ziplist-value. Configures memory optimization for small aggregate data types. Standard and Premium tiers.
- set-max-intset-entries. Configures memory optimization for small aggregate data types. Standard and Premium tiers.
- zset-max-ziplist-entries. Configures memory optimization for small aggregate data types. Standard and Premium tiers.
- zset-max-ziplist-value. Configures memory optimization for small aggregate data types. Standard and Premium tiers.
- databases. Configures the number of databases. This property can be configured only at cache creation. Standard and Premium tiers. For more information, see Manage Azure Redis Cache with Azure PowerShellhttps://go.microsoft.com/fwlink/?LinkId=800051 (https://go.microsoft.com/fwlink/?LinkId=800051).
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group that contains the Redis Cache.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ShardCount
Specifies the number of shards to create on a Premium cluster cache.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Size
Specifies the size of the Redis Cache. Valid values are:
- P1
- P2
- P3
- P4
- C0
- C1
- C2
- C3
- C4
- C5
- C6
- 250MB
- 1GB
- 2.5GB
- 6GB
- 13GB
- 26GB
- 53GB The default value is 1GB or C1.
Type: | String |
Accepted values: | P1, P2, P3, P4, C0, C1, C2, C3, C4, C5, C6, 250MB, 1GB, 2.5GB, 6GB, 13GB, 26GB, 53GB |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Sku
Specifies the SKU of the Redis Cache to create. Valid values are:
- Basic
- Standard
- Premium The default value is Standard.
Type: | String |
Accepted values: | Basic, Standard, Premium |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
A hash table which represents tags.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TenantSettings
This parameter has been deprecated.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Nullable<T>[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Outputs
RedisCacheAttributesWithAccessKeys