Databases - Create
Creates a database
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}?api-version=2022-11-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
cluster
|
path | True |
|
The name of the RedisEnterprise cluster. |
|
database
|
path | True |
|
The name of the database. |
|
resource
|
path | True |
|
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
|
The ID of the target subscription. |
|
api-version
|
query | True |
|
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties.clientProtocol |
Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. |
|
| properties.clusteringPolicy |
Clustering policy - default is OSSCluster. Specified at create time. |
|
| properties.evictionPolicy |
Redis eviction policy - default is VolatileLRU |
|
| properties.geoReplication |
Optional set of properties to configure geo replication for this database. |
|
| properties.modules |
|
Optional set of redis modules to enable in this database - modules can only be added at creation time. |
| properties.persistence |
Persistence settings |
|
| properties.port |
|
TCP port of the database endpoint. Specified at create time. Defaults to an available port. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The database was/is being updated. Check provisioningState and resourceState for detailed status. |
|
| 201 Created |
The database was/is being created. Check provisioningState and resourceState for 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
|
Redis |
|
Redis |
RedisEnterpriseDatabasesCreate
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2022-11-01-preview
{
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20"
},
{
"name": "RediSearch"
}
]
}
}
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Updating",
"resourceState": "Updating",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400",
"version": "1.0.0"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20",
"version": "1.0.0"
},
{
"name": "RediSearch",
"args": "",
"version": "1.0.0"
}
]
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1",
"name": "cache1/db1",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Creating",
"resourceState": "Creating",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400",
"version": "1.0.0"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20",
"version": "1.0.0"
},
{
"name": "RediSearch",
"args": "",
"version": "1.0.0"
}
]
}
}
RedisEnterpriseDatabasesCreate With Active Geo Replication
Sample Request
PUT https://management.azure.com/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2022-11-01-preview
{
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"
},
{
"id": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"
}
]
}
}
}
Sample Response
{
"id": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Updating",
"resourceState": "Updating",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"state": "Linking"
},
{
"id": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default",
"state": "Linking"
}
]
}
}
}
{
"id": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1",
"name": "cache1/db1",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Creating",
"resourceState": "Creating",
"clientProtocol": "Plaintext",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"state": "Linking"
},
{
"id": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default",
"state": "Linking"
}
]
}
}
}
Definitions
|
Aof |
Sets the frequency at which data is written to disk. |
|
Clustering |
Clustering policy - default is OSSCluster. Specified at create time. |
|
created |
The type of identity that created the resource. |
| Database |
Describes a database on the RedisEnterprise cluster |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Eviction |
Redis eviction policy - default is VolatileLRU |
|
Geo |
Optional set of properties to configure geo replication for this database. |
|
Linked |
Linked Database |
|
Link |
State of the link between the database resources. |
| Module |
Module settings |
| Persistence |
Persistence settings |
| Protocol |
Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. |
|
Provisioning |
Current provisioning status |
|
Rdb |
Sets the frequency at which a snapshot of the database is created. |
|
Resource |
Current resource status |
|
system |
Metadata pertaining to creation and last modification of the resource. |
AofFrequency
Sets the frequency at which data is written to disk.
| Name | Type | Description |
|---|---|---|
| 1s |
|
|
| always |
|
ClusteringPolicy
Clustering policy - default is OSSCluster. Specified at create time.
| Name | Type | Description |
|---|---|---|
| EnterpriseCluster |
|
|
| OSSCluster |
|
createdByType
The type of identity that created the resource.
| Name | Type | Description |
|---|---|---|
| Application |
|
|
| Key |
|
|
| ManagedIdentity |
|
|
| User |
|
Database
Describes a database on the RedisEnterprise cluster
| Name | Type | Description |
|---|---|---|
| id |
|
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
|
The name of the resource |
| properties.clientProtocol |
Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. |
|
| properties.clusteringPolicy |
Clustering policy - default is OSSCluster. Specified at create time. |
|
| properties.evictionPolicy |
Redis eviction policy - default is VolatileLRU |
|
| properties.geoReplication |
Optional set of properties to configure geo replication for this database. |
|
| properties.modules |
|
Optional set of redis modules to enable in this database - modules can only be added at creation time. |
| properties.persistence |
Persistence settings |
|
| properties.port |
|
TCP port of the database endpoint. Specified at create time. Defaults to an available port. |
| properties.provisioningState |
Current provisioning status of the database |
|
| properties.resourceState |
Current resource status of the database |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
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. |
EvictionPolicy
Redis eviction policy - default is VolatileLRU
| Name | Type | Description |
|---|---|---|
| AllKeysLFU |
|
|
| AllKeysLRU |
|
|
| AllKeysRandom |
|
|
| NoEviction |
|
|
| VolatileLFU |
|
|
| VolatileLRU |
|
|
| VolatileRandom |
|
|
| VolatileTTL |
|
GeoReplication
Optional set of properties to configure geo replication for this database.
| Name | Type | Description |
|---|---|---|
| groupNickname |
|
Name for the group of linked database resources |
| linkedDatabases |
List of database resources to link with this database |
LinkedDatabase
Linked Database
| Name | Type | Description |
|---|---|---|
| id |
|
Resource ID of a database resource to link with this database. |
| state |
State of the link between the database resources. |
LinkState
State of the link between the database resources.
| Name | Type | Description |
|---|---|---|
| LinkFailed |
|
|
| Linked |
|
|
| Linking |
|
|
| UnlinkFailed |
|
|
| Unlinking |
|
Module
Module settings
| Name | Type | Description |
|---|---|---|
| args |
|
Configuration options for the module, e.g. 'ERROR_RATE 0.01 INITIAL_SIZE 400'. |
| name |
|
The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries' |
| version |
|
The version of the module, e.g. '1.0'. |
Persistence
Persistence settings
| Name | Type | Description |
|---|---|---|
| aofEnabled |
|
Sets whether AOF is enabled. |
| aofFrequency |
Sets the frequency at which data is written to disk. |
|
| rdbEnabled |
|
Sets whether RDB is enabled. |
| rdbFrequency |
Sets the frequency at which a snapshot of the database is created. |
Protocol
Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
| Name | Type | Description |
|---|---|---|
| Encrypted |
|
|
| Plaintext |
|
ProvisioningState
Current provisioning status
| Name | Type | Description |
|---|---|---|
| Canceled |
|
|
| Creating |
|
|
| Deleting |
|
|
| Failed |
|
|
| Succeeded |
|
|
| Updating |
|
RdbFrequency
Sets the frequency at which a snapshot of the database is created.
| Name | Type | Description |
|---|---|---|
| 12h |
|
|
| 1h |
|
|
| 6h |
|
ResourceState
Current resource status
| Name | Type | Description |
|---|---|---|
| CreateFailed |
|
|
| Creating |
|
|
| DeleteFailed |
|
|
| Deleting |
|
|
| DisableFailed |
|
|
| Disabled |
|
|
| Disabling |
|
|
| EnableFailed |
|
|
| Enabling |
|
|
| Running |
|
|
| UpdateFailed |
|
|
| Updating |
|
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
|
The timestamp of resource creation (UTC). |
| createdBy |
|
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
|
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
|
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |