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 |
|
The name of the Redis cache. |
resource
|
path | True |
|
The name of the resource group. |
subscription
|
path | True |
|
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 |
|
Client Api Version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
|
The geo-location where the resource lives |
properties.sku | True |
The SKU of the Redis cache to deploy. |
|
properties.enableNonSslPort |
|
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 |
|
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 |
|
The number of replicas to be created per master. |
|
properties.shardCount |
|
The number of shards to be created on a Premium Cluster Cache. |
|
properties.staticIP |
|
Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. |
|
properties.subnetId |
|
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 |
|
A dictionary of tenant settings |
|
tags |
|
Resource tags. |
|
zones |
|
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
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Private |
The Private Endpoint resource. |
Private |
The Private Endpoint Connection resource. |
Private |
The current provisioning state. |
Private |
The private endpoint connection status. |
Private |
A collection of information about the state of the connection between service consumer and provider. |
Provisioning |
Redis instance provisioning status. |
Public |
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' |
Redis |
Redis cache access keys. |
Redis |
Parameters supplied to the Create Redis operation. |
Redis |
Details of single instance of redis. |
Redis |
Linked server Id |
Redis |
A single Redis item in List or Get Operation. |
Sku |
SKU parameters supplied to the create Redis operation. |
Sku |
The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). |
Sku |
The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium) |
Tls |
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 |
|
The additional info. |
type |
|
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
|
The error code. |
details |
The error details. |
|
message |
|
The error message. |
target |
|
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
PrivateEndpoint
The Private Endpoint resource.
Name | Type | Description |
---|---|---|
id |
|
The ARM identifier for Private Endpoint |
PrivateEndpointConnection
The Private Endpoint Connection resource.
Name | Type | Description |
---|---|---|
id |
|
Resource ID. |
name |
|
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 |
|
Resource type. |
PrivateEndpointConnectionProvisioningState
The current provisioning state.
Name | Type | Description |
---|---|---|
Creating |
|
|
Deleting |
|
|
Failed |
|
|
Succeeded |
|
PrivateEndpointServiceConnectionStatus
The private endpoint connection status.
Name | Type | Description |
---|---|---|
Approved |
|
|
Pending |
|
|
Rejected |
|
PrivateLinkServiceConnectionState
A collection of information about the state of the connection between service consumer and provider.
Name | Type | Description |
---|---|---|
actionsRequired |
|
A message indicating if changes on the service provider require any updates on the consumer. |
description |
|
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 |
|
|
Deleting |
|
|
Disabled |
|
|
Failed |
|
|
Linking |
|
|
Provisioning |
|
|
RecoveringScaleFailure |
|
|
Scaling |
|
|
Succeeded |
|
|
Unlinking |
|
|
Unprovisioning |
|
|
Updating |
|
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 |
|
|
Enabled |
|
RedisAccessKeys
Redis cache access keys.
Name | Type | Description |
---|---|---|
primaryKey |
|
The current primary key that clients can use to authenticate with Redis cache. |
secondaryKey |
|
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 |
|
The geo-location where the resource lives |
properties.enableNonSslPort |
|
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 |
|
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 |
|
The number of replicas to be created per master. |
properties.shardCount |
|
The number of shards to be created on a Premium Cluster Cache. |
properties.sku |
The SKU of the Redis cache to deploy. |
|
properties.staticIP |
|
Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. |
properties.subnetId |
|
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 |
|
A dictionary of tenant settings |
tags |
|
Resource tags. |
zones |
|
A list of availability zones denoting where the resource needs to come from. |
RedisInstanceDetails
Details of single instance of redis.
Name | Type | Description |
---|---|---|
isMaster |
|
Specifies whether the instance is a master node. |
nonSslPort |
|
If enableNonSslPort is true, provides Redis instance Non-SSL port. |
shardId |
|
If clustering is enabled, the Shard ID of Redis Instance |
sslPort |
|
Redis instance SSL port. |
zone |
|
If the Cache uses availability zones, specifies availability zone where this instance is located. |
RedisLinkedServer
Linked server Id
Name | Type | Description |
---|---|---|
id |
|
Linked server Id. |
RedisResource
A single Redis item in List or Get Operation.
Name | Type | Description |
---|---|---|
enableNonSslPort |
|
Specifies whether the non-ssl Redis server port (6379) is enabled. |
id |
|
Resource ID. |
location |
|
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 |
|
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 |
|
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 |
|
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 |
|
Redis version. |
properties.sku |
The SKU of the Redis cache to deploy. |
|
properties.sslPort |
|
Redis SSL port. |
properties.staticIP |
|
Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. |
properties.subnetId |
|
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 |
|
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 |
|
The number of replicas to be created per master. |
shardCount |
|
The number of shards to be created on a Premium Cluster Cache. |
tags |
|
Resource tags. |
tenantSettings |
|
A dictionary of tenant settings |
type |
|
Resource type. |
zones |
|
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 |
|
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 |
|
|
P |
|
SkuName
The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)
Name | Type | Description |
---|---|---|
Basic |
|
|
Premium |
|
|
Standard |
|
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 |
|
|
1.1 |
|
|
1.2 |
|