Redis - Update

Update an existing Redis cache.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}?api-version=2024-11-01

URI Parameters

Name In Required Type Description
name
path True

string

The name of the Redis cache.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
identity

ManagedServiceIdentity

The identity of the resource.

properties.disableAccessKeyAuthentication

boolean

Authentication to Redis through access keys is disabled when set as true. Default value is false.

properties.enableNonSslPort

boolean

Specifies whether the non-ssl Redis server port (6379) is enabled.

properties.minimumTlsVersion

TlsVersion

Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

properties.publicNetworkAccess

PublicNetworkAccess

Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

properties.redisConfiguration

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.

properties.redisVersion

string

Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'.

properties.replicasPerMaster

integer

The number of replicas to be created per primary.

properties.replicasPerPrimary

integer

The number of replicas to be created per primary.

properties.shardCount

integer

The number of shards to be created on a Premium Cluster Cache.

properties.sku

Sku

The SKU of the Redis cache to deploy.

properties.tenantSettings

object

A dictionary of tenant settings

properties.updateChannel

UpdateChannel

Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'.

properties.zonalAllocationPolicy

ZonalAllocationPolicy

Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

RedisResource

The existing redis cache was successfully updated. Check provisioningState to see detailed status.

202 Accepted

RedisResource

The existing redis cache was successfully updated. Check Azure-AsyncOperation headers to poll detailed status.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

RedisCacheUpdate

Sample request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1?api-version=2024-11-01

{
  "properties": {
    "enableNonSslPort": true,
    "replicasPerPrimary": 2
  }
}

Sample response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1",
  "location": "East US",
  "name": "cache1",
  "type": "Microsoft.Cache/Redis",
  "tags": {},
  "properties": {
    "accessKeys": {
      "primaryKey": "<primaryKey>",
      "secondaryKey": "<secondaryKey>"
    },
    "provisioningState": "Succeeded",
    "redisVersion": "3.0",
    "sku": {
      "name": "Premium",
      "family": "P",
      "capacity": 1
    },
    "enableNonSslPort": true,
    "replicasPerMaster": 2,
    "replicasPerPrimary": 2,
    "updateChannel": "Stable",
    "zonalAllocationPolicy": "Automatic",
    "redisConfiguration": {
      "maxclients": "1000",
      "maxmemory-reserved": "50",
      "maxmemory-delta": "50"
    },
    "hostName": "cache1.redis.cache.windows.net",
    "port": 6379,
    "sslPort": 6380,
    "instances": [
      {
        "sslPort": 15000,
        "nonSslPort": 13000,
        "isMaster": true,
        "isPrimary": true
      },
      {
        "sslPort": 15001,
        "nonSslPort": 13001,
        "isMaster": false,
        "isPrimary": false
      },
      {
        "sslPort": 15002,
        "nonSslPort": 13002,
        "isMaster": false,
        "isPrimary": false
      }
    ]
  }
}
location: https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationResult...
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1",
  "location": "East US",
  "name": "cache1",
  "type": "Microsoft.Cache/Redis",
  "tags": {},
  "properties": {
    "accessKeys": {
      "primaryKey": "<primaryKey>",
      "secondaryKey": "<secondaryKey>"
    },
    "provisioningState": "Succeeded",
    "redisVersion": "3.0",
    "sku": {
      "name": "Premium",
      "family": "P",
      "capacity": 1
    },
    "enableNonSslPort": true,
    "replicasPerMaster": 2,
    "replicasPerPrimary": 2,
    "updateChannel": "Stable",
    "zonalAllocationPolicy": "Automatic",
    "redisConfiguration": {
      "maxclients": "1000",
      "maxmemory-reserved": "50",
      "maxmemory-delta": "50"
    },
    "hostName": "cache1.redis.cache.windows.net",
    "port": 6379,
    "sslPort": 6380,
    "instances": [
      {
        "sslPort": 15000,
        "nonSslPort": 13000,
        "isMaster": true,
        "isPrimary": true
      },
      {
        "sslPort": 15001,
        "nonSslPort": 13001,
        "isMaster": false,
        "isPrimary": false
      },
      {
        "sslPort": 15002,
        "nonSslPort": 13002,
        "isMaster": false,
        "isPrimary": false
      }
    ]
  }
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

PrivateEndpoint

The Private Endpoint resource.

PrivateEndpointConnection

The Private Endpoint Connection resource.

PrivateEndpointConnectionProvisioningState

The current provisioning state.

PrivateEndpointServiceConnectionStatus

The private endpoint connection status.

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

ProvisioningState

Redis instance provisioning status.

PublicNetworkAccess

Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

RedisAccessKeys

Redis cache access keys.

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.

RedisInstanceDetails

Details of single instance of redis.

RedisLinkedServer

Linked server Id

RedisResource

A single Redis item in List or Get Operation.

RedisUpdateParameters

Parameters supplied to the Update Redis operation.

Sku

SKU parameters supplied to the create Redis operation.

SkuFamily

The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).

SkuName

The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)

TlsVersion

Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

UpdateChannel

Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'.

UserAssignedIdentity

User assigned identity properties

ZonalAllocationPolicy

Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

Name Type Description
principalId

string

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Name Type Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

PrivateEndpoint

The Private Endpoint resource.

Name Type Description
id

string

The ARM identifier for Private Endpoint

PrivateEndpointConnection

The Private Endpoint Connection resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.privateEndpoint

PrivateEndpoint

The resource of private end point.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

properties.provisioningState

PrivateEndpointConnectionProvisioningState

The provisioning state of the private endpoint connection resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

PrivateEndpointConnectionProvisioningState

The current provisioning state.

Name Type Description
Creating

string

Deleting

string

Failed

string

Succeeded

string

PrivateEndpointServiceConnectionStatus

The private endpoint connection status.

Name Type Description
Approved

string

Pending

string

Rejected

string

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

Name Type Description
actionsRequired

string

A message indicating if changes on the service provider require any updates on the consumer.

description

string

The reason for approval/rejection of the connection.

status

PrivateEndpointServiceConnectionStatus

Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

ProvisioningState

Redis instance provisioning status.

Name Type Description
ConfiguringAAD

string

Creating

string

Deleting

string

Disabled

string

Failed

string

Linking

string

Provisioning

string

RecoveringScaleFailure

string

Scaling

string

Succeeded

string

Unlinking

string

Unprovisioning

string

Updating

string

PublicNetworkAccess

Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

Name Type Description
Disabled

string

Enabled

string

RedisAccessKeys

Redis cache access keys.

Name Type Description
primaryKey

string

The current primary key that clients can use to authenticate with Redis cache.

secondaryKey

string

The current secondary key that clients can use to authenticate with Redis cache.

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.

Name Type Description
aad-enabled

string

Specifies whether AAD based authentication has been enabled or disabled for the cache

aof-backup-enabled

string

Specifies whether the aof backup is enabled

aof-storage-connection-string-0

string

First storage account connection string

aof-storage-connection-string-1

string

Second storage account connection string

authnotrequired

string

Specifies whether the authentication is disabled. Setting this property is highly discouraged from security point of view.

maxclients

string

The max clients config

maxfragmentationmemory-reserved

string

Value in megabytes reserved for fragmentation per shard

maxmemory-delta

string

Value in megabytes reserved for non-cache usage per shard e.g. failover.

maxmemory-policy

string

The eviction strategy used when your data won't fit within its memory limit.

maxmemory-reserved

string

Value in megabytes reserved for non-cache usage per shard e.g. failover.

notify-keyspace-events

string

The keyspace events which should be monitored.

preferred-data-archive-auth-method

string

Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS

preferred-data-persistence-auth-method

string

Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS

rdb-backup-enabled

string

Specifies whether the rdb backup is enabled

rdb-backup-frequency

string

Specifies the frequency for creating rdb backup in minutes. Valid values: (15, 30, 60, 360, 720, 1440)

rdb-backup-max-snapshot-count

string

Specifies the maximum number of snapshots for rdb backup

rdb-storage-connection-string

string

The storage account connection string for storing rdb file

storage-subscription-id

string

SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity.

zonal-configuration

string

Zonal Configuration

RedisInstanceDetails

Details of single instance of redis.

Name Type Description
isMaster

boolean

Specifies whether the instance is a primary node.

isPrimary

boolean

Specifies whether the instance is a primary node.

nonSslPort

integer

If enableNonSslPort is true, provides Redis instance Non-SSL port.

shardId

integer

If clustering is enabled, the Shard ID of Redis Instance

sslPort

integer

Redis instance SSL port.

zone

string

If the Cache uses availability zones, specifies availability zone where this instance is located.

RedisLinkedServer

Linked server Id

Name Type Description
id

string

Linked server Id.

RedisResource

A single Redis item in List or Get Operation.

Name Type Default value Description
disableAccessKeyAuthentication

boolean

False

Authentication to Redis through access keys is disabled when set as true. Default value is false.

enableNonSslPort

boolean

False

Specifies whether the non-ssl Redis server port (6379) is enabled.

id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

ManagedServiceIdentity

The identity of the resource.

location

string

The geo-location where the resource lives

minimumTlsVersion

TlsVersion

Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

name

string

The name of the resource

properties.accessKeys

RedisAccessKeys

The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache

properties.hostName

string

Redis host name.

properties.instances

RedisInstanceDetails[]

List of the Redis instances associated with the cache

properties.linkedServers

RedisLinkedServer[]

List of the linked servers associated with the cache

properties.port

integer

Redis non-SSL port.

properties.privateEndpointConnections

PrivateEndpointConnection[]

List of private endpoint connection associated with the specified redis cache

properties.provisioningState

ProvisioningState

Redis instance provisioning status.

properties.sku

Sku

The SKU of the Redis cache to deploy.

properties.sslPort

integer

Redis SSL port.

properties.staticIP

string

Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default.

properties.subnetId

string

The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1

publicNetworkAccess

PublicNetworkAccess

Enabled

Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

redisConfiguration

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.

redisVersion

string

Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'.

replicasPerMaster

integer

The number of replicas to be created per primary.

replicasPerPrimary

integer

The number of replicas to be created per primary.

shardCount

integer

The number of shards to be created on a Premium Cluster Cache.

tags

object

Resource tags.

tenantSettings

object

A dictionary of tenant settings

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

updateChannel

UpdateChannel

Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'.

zonalAllocationPolicy

ZonalAllocationPolicy

Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported.

zones

string[]

A list of availability zones denoting where the resource needs to come from.

RedisUpdateParameters

Parameters supplied to the Update Redis operation.

Name Type Default value Description
identity

ManagedServiceIdentity

The identity of the resource.

properties.disableAccessKeyAuthentication

boolean

False

Authentication to Redis through access keys is disabled when set as true. Default value is false.

properties.enableNonSslPort

boolean

False

Specifies whether the non-ssl Redis server port (6379) is enabled.

properties.minimumTlsVersion

TlsVersion

Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

properties.publicNetworkAccess

PublicNetworkAccess

Enabled

Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

properties.redisConfiguration

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.

properties.redisVersion

string

Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'.

properties.replicasPerMaster

integer

The number of replicas to be created per primary.

properties.replicasPerPrimary

integer

The number of replicas to be created per primary.

properties.shardCount

integer

The number of shards to be created on a Premium Cluster Cache.

properties.sku

Sku

The SKU of the Redis cache to deploy.

properties.tenantSettings

object

A dictionary of tenant settings

properties.updateChannel

UpdateChannel

Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'.

properties.zonalAllocationPolicy

ZonalAllocationPolicy

Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported.

tags

object

Resource tags.

Sku

SKU parameters supplied to the create Redis operation.

Name Type Description
capacity

integer

The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4).

family

SkuFamily

The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).

name

SkuName

The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)

SkuFamily

The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).

Name Type Description
C

string

P

string

SkuName

The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)

Name Type Description
Basic

string

Premium

string

Standard

string

TlsVersion

Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

Name Type Description
1.0

string

1.1

string

1.2

string

UpdateChannel

Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'.

Name Type Description
Preview

string

Stable

string

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string

The client ID of the assigned identity.

principalId

string

The principal ID of the assigned identity.

ZonalAllocationPolicy

Optional: Specifies how availability zones are allocated to the Redis cache. 'Automatic' enables zone redundancy and Azure will automatically select zones based on regional availability and capacity. 'UserDefined' will select availability zones passed in by you using the 'zones' parameter. 'NoZones' will produce a non-zonal cache. If 'zonalAllocationPolicy' is not passed, it will be set to 'UserDefined' when zones are passed in, otherwise, it will be set to 'Automatic' in regions where zones are supported and 'NoZones' in regions where zones are not supported.

Name Type Description
Automatic

string

NoZones

string

UserDefined

string