< Back
New-AzureRmRedisCache
Post
NAME New-AzureRmRedisCache
SYNOPSIS
Creates a Redis Cache.
SYNTAX
New-AzureRmRedisCache [-DefaultProfile <IAzureContextContainer>] [-EnableNonSslPort <Boolean>] -Location <String> [-MaxMemoryPolicy <String>]
-Name <String> [-RedisConfiguration <Hashtable>] [-RedisVersion <String>] -ResourceGroupName <String> [-ShardCount <Int32>] [-Size {P1 | P2 | P3 |
P4 | C0 | C1 | C2 | C3 | C4 | C5 | C6 | 250MB | 1GB | 2.5GB | 6GB | 13GB | 26GB | 53GB}] [-Sku {Basic | Standard | Premium}] [-StaticIP <String>]
[-Subnet <String>] [-SubnetId <String>] [-Tag <Hashtable>] [-TenantSettings <Hashtable>] [-VirtualNetwork <String>] [-Zone <String[]>] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmRedisCache cmdlet creates an Azure Redis Cache.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-EnableNonSslPort <Boolean>
Indicates whether the non-SSL port is enabled. The default value is $False (the non-SSL port is disabled).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Location <String>
Specifies the location in which to create a Redis Cache. Valid values are:
- North Central US
- South Central US
- Central US
- West Europe
- North Europe
- West US
- East US
- East US 2
- Japan East
- Japan West
- Brazil South
- Southeast Asia
- East Asia
- Australia East
- Australia Southeast
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MaxMemoryPolicy <String>
This parameter has been deprecated. Use the RedisConfiguration parameter to set maxmemory-policy. For example:
`-RedisConfiguration @{"maxmemory-policy" = "allkeys-lru"}`
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the Redis Cache to create.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RedisConfiguration <Hashtable>
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 PowerShellhttp://go.microsoft.com/fwlink/?LinkId=800051
(http://go.microsoft.com/fwlink/?LinkId=800051).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RedisVersion <String>
This parameter is deprecated and will be removed from future releases.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group in which to create the Redis Cache.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ShardCount <Int32>
Specifies the number of shards to create on a Premium cluster cache. The acceptable values for this parameter are:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Size <String>
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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Sku <String>
Specifies the SKU of the Redis Cache to create. Valid values are:
- Basic
- Standard
- Premium
The default value is Standard.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-StaticIP <String>
Specifies a unique IP address in the subnet for the Redis Cache.
If you do not specify a value for this parameter, this cmdlet chooses an IP address from the subnet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Subnet <String>
Specifies the name of the subnet in which to deploy the Redis Cache.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SubnetId <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Tag <Hashtable>
A hash table which represents tags.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TenantSettings <Hashtable>
This parameter has been deprecated.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VirtualNetwork <String>
Specifies the resource ID of the virtual network in which to deploy the Redis Cache.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Zone <String[]>
List of zones.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
You can pipe input to this cmdlet by name, but not by value.
OUTPUTS
Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributesWithAccessKeys
This cmdlet returns all attributes of a Redis Cache including primary and secondary access keys.
NOTES
Example 1: Create a Redis Cache
PS C:\\>New-AzureRmRedisCache -ResourceGroupName "MyGroup" -Name "MyCache" -Location "North Central US"
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 : {}
EnableNonSslPort : False
RedisVersion : 2.8
Size : 1GB
Sku : Standard
Tag : {}
Zone : []
This command creates a Redis Cache.
Example 2: Create a Standard SKU Redis Cache
PS C:\\>New-AzureRmRedisCache -ResourceGroupName "MyGroup" -Name "MyCache" -Location "North Central US" -Size 250MB -Sku "Standard"
-RedisConfiguration @{"maxmemory-policy" = "allkeys-random"} -Force
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 creates a Redis Cache.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... rediscache
Get-AzureRmRedisCache
Remove-AzureRmRedisCache
Reset-AzureRmRedisCache
SYNOPSIS
Creates a Redis Cache.
SYNTAX
New-AzureRmRedisCache [-DefaultProfile <IAzureContextContainer>] [-EnableNonSslPort <Boolean>] -Location <String> [-MaxMemoryPolicy <String>]
-Name <String> [-RedisConfiguration <Hashtable>] [-RedisVersion <String>] -ResourceGroupName <String> [-ShardCount <Int32>] [-Size {P1 | P2 | P3 |
P4 | C0 | C1 | C2 | C3 | C4 | C5 | C6 | 250MB | 1GB | 2.5GB | 6GB | 13GB | 26GB | 53GB}] [-Sku {Basic | Standard | Premium}] [-StaticIP <String>]
[-Subnet <String>] [-SubnetId <String>] [-Tag <Hashtable>] [-TenantSettings <Hashtable>] [-VirtualNetwork <String>] [-Zone <String[]>] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmRedisCache cmdlet creates an Azure Redis Cache.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-EnableNonSslPort <Boolean>
Indicates whether the non-SSL port is enabled. The default value is $False (the non-SSL port is disabled).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Location <String>
Specifies the location in which to create a Redis Cache. Valid values are:
- North Central US
- South Central US
- Central US
- West Europe
- North Europe
- West US
- East US
- East US 2
- Japan East
- Japan West
- Brazil South
- Southeast Asia
- East Asia
- Australia East
- Australia Southeast
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MaxMemoryPolicy <String>
This parameter has been deprecated. Use the RedisConfiguration parameter to set maxmemory-policy. For example:
`-RedisConfiguration @{"maxmemory-policy" = "allkeys-lru"}`
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the Redis Cache to create.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RedisConfiguration <Hashtable>
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 PowerShellhttp://go.microsoft.com/fwlink/?LinkId=800051
(http://go.microsoft.com/fwlink/?LinkId=800051).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RedisVersion <String>
This parameter is deprecated and will be removed from future releases.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group in which to create the Redis Cache.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ShardCount <Int32>
Specifies the number of shards to create on a Premium cluster cache. The acceptable values for this parameter are:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Size <String>
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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Sku <String>
Specifies the SKU of the Redis Cache to create. Valid values are:
- Basic
- Standard
- Premium
The default value is Standard.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-StaticIP <String>
Specifies a unique IP address in the subnet for the Redis Cache.
If you do not specify a value for this parameter, this cmdlet chooses an IP address from the subnet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Subnet <String>
Specifies the name of the subnet in which to deploy the Redis Cache.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SubnetId <String>
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Tag <Hashtable>
A hash table which represents tags.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TenantSettings <Hashtable>
This parameter has been deprecated.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-VirtualNetwork <String>
Specifies the resource ID of the virtual network in which to deploy the Redis Cache.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Zone <String[]>
List of zones.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
You can pipe input to this cmdlet by name, but not by value.
OUTPUTS
Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributesWithAccessKeys
This cmdlet returns all attributes of a Redis Cache including primary and secondary access keys.
NOTES
Example 1: Create a Redis Cache
PS C:\\>New-AzureRmRedisCache -ResourceGroupName "MyGroup" -Name "MyCache" -Location "North Central US"
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 : {}
EnableNonSslPort : False
RedisVersion : 2.8
Size : 1GB
Sku : Standard
Tag : {}
Zone : []
This command creates a Redis Cache.
Example 2: Create a Standard SKU Redis Cache
PS C:\\>New-AzureRmRedisCache -ResourceGroupName "MyGroup" -Name "MyCache" -Location "North Central US" -Size 250MB -Sku "Standard"
-RedisConfiguration @{"maxmemory-policy" = "allkeys-random"} -Force
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 creates a Redis Cache.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... rediscache
Get-AzureRmRedisCache
Remove-AzureRmRedisCache
Reset-AzureRmRedisCache