Redis - Create

Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}?api-version=2020-06-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.

subscriptionId
path True
  • string

Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
location True
  • string

The geo-location where the resource lives

properties.sku True

The SKU of the Redis cache to deploy.

properties.enableNonSslPort
  • boolean

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

properties.minimumTlsVersion

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

properties.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
  • object

All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.

properties.replicasPerMaster
  • integer

The number of replicas to be created per master.

properties.shardCount
  • integer

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

properties.staticIP
  • string

Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network.

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

properties.tenantSettings
  • object

A dictionary of tenant settings

tags
  • object

Resource tags.

zones
  • string[]

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

Responses

Name Type Description
200 OK

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

201 Created

The new redis cache was successfully created. Check provisioningState to see detailed status.

Other Status Codes

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

RedisCacheCreate

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1?api-version=2020-06-01
{
  "location": "West US",
  "zones": [
    "1"
  ],
  "properties": {
    "sku": {
      "name": "Premium",
      "family": "P",
      "capacity": 1
    },
    "enableNonSslPort": true,
    "shardCount": 2,
    "replicasPerMaster": 2,
    "redisConfiguration": {
      "maxmemory-policy": "allkeys-lru"
    },
    "subnetId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1",
    "staticIP": "192.168.0.5",
    "minimumTlsVersion": "1.2"
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1",
  "location": "West US",
  "zones": [
    "1"
  ],
  "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": false,
    "replicasPerMaster": 2,
    "redisConfiguration": {
      "maxmemory-policy": "allkeys-lru"
    },
    "hostName": "cache1.redis.cache.windows.net",
    "port": 6379,
    "sslPort": 6380,
    "minimumTlsVersion": "1.2",
    "instances": [
      {
        "sslPort": 15000,
        "nonSslPort": 13000,
        "zone": "1",
        "shardId": 0
      },
      {
        "sslPort": 15001,
        "nonSslPort": 13001,
        "zone": "1",
        "shardId": 0
      },
      {
        "sslPort": 15002,
        "nonSslPort": 13002,
        "zone": "1",
        "shardId": 0
      },
      {
        "sslPort": 15003,
        "nonSslPort": 13003,
        "zone": "1",
        "shardId": 1
      },
      {
        "sslPort": 15004,
        "nonSslPort": 13004,
        "zone": "1",
        "shardId": 1
      },
      {
        "sslPort": 15005,
        "nonSslPort": 13005,
        "zone": "1",
        "shardId": 1
      }
    ]
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1",
  "location": "West US",
  "zones": [
    "1"
  ],
  "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": false,
    "replicasPerMaster": 2,
    "redisConfiguration": {
      "maxclients": "1000",
      "maxmemory-reserved": "50",
      "maxmemory-delta": "50"
    },
    "hostName": "cache1.redis.cache.windows.net",
    "port": 6379,
    "sslPort": 6380,
    "minimumTlsVersion": "1.2",
    "instances": [
      {
        "sslPort": 15000,
        "nonSslPort": 13000,
        "zone": "1",
        "shardId": 0
      },
      {
        "sslPort": 15001,
        "nonSslPort": 13001,
        "zone": "1",
        "shardId": 0
      },
      {
        "sslPort": 15002,
        "nonSslPort": 13002,
        "zone": "1",
        "shardId": 0
      },
      {
        "sslPort": 15003,
        "nonSslPort": 13003,
        "zone": "1",
        "shardId": 1
      },
      {
        "sslPort": 15004,
        "nonSslPort": 13004,
        "zone": "1",
        "shardId": 1
      },
      {
        "sslPort": 15005,
        "nonSslPort": 13005,
        "zone": "1",
        "shardId": 1
      }
    ]
  }
}

Definitions

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

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.

RedisCreateParameters

Parameters supplied to the Create Redis operation.

RedisInstanceDetails

Details of single instance of redis.

RedisLinkedServer

Linked server Id

RedisResource

A single Redis item in List or Get 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')

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

The error additional info.

code
  • string

The error code.

details

The error details.

message
  • string

The error message.

target
  • string

The error target.

ErrorResponse

Error response

Name Type Description
error

The error object.

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

Resource ID.

name
  • string

Resource name.

properties.privateEndpoint

The resource of private end point.

properties.privateLinkServiceConnectionState

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

properties.provisioningState

The provisioning state of the private endpoint connection resource.

type
  • string

Resource type.

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

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

ProvisioningState

Redis instance provisioning status.

Name Type Description
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.

RedisCreateParameters

Parameters supplied to the Create Redis operation.

Name Type Description
location
  • string

The geo-location where the resource lives

properties.enableNonSslPort
  • boolean

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

properties.minimumTlsVersion

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

properties.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
  • object

All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.

properties.replicasPerMaster
  • integer

The number of replicas to be created per master.

properties.shardCount
  • integer

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

properties.sku

The SKU of the Redis cache to deploy.

properties.staticIP
  • string

Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network.

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

properties.tenantSettings
  • object

A dictionary of tenant settings

tags
  • object

Resource tags.

zones
  • string[]

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

RedisInstanceDetails

Details of single instance of redis.

Name Type Description
isMaster
  • boolean

Specifies whether the instance is a master 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 Description
enableNonSslPort
  • boolean

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

id
  • string

Resource ID.

location
  • string

The geo-location where the resource lives

minimumTlsVersion

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

name
  • string

Resource name.

properties.accessKeys

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

List of the Redis instances associated with the cache

properties.linkedServers

List of the linked servers associated with the cache

properties.port
  • integer

Redis non-SSL port.

properties.privateEndpointConnections

List of private endpoint connection associated with the specified redis cache

properties.provisioningState

Redis instance provisioning status.

properties.redisVersion
  • string

Redis version.

properties.sku

The SKU of the Redis cache to deploy.

properties.sslPort
  • integer

Redis SSL port.

properties.staticIP
  • string

Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network.

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

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
  • object

All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.

replicasPerMaster
  • integer

The number of replicas to be created per master.

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

Resource type.

zones
  • string[]

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

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

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

name

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