Создает базу данных.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}?api-version=2026-09-01
Параметры URI
| Имя. |
В |
Обязательно |
Тип |
Описание |
|
clusterName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Имя кластера Redis Enterprise. Имя должно иметь длину 1–60 символов. Допустимые символы (A-Z, a-z, 0-9) и дефис(-). Не может быть ни ведущих, ни конечных, ни последовательных дефисов
|
|
databaseName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Имя базы данных Redis Enterprise.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Имя группы ресурсов. Имя нечувствительно к регистру.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Идентификатор целевой подписки. Значение должно быть Универсальным Уникальным Идентификатором (UUID).
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Версия API, используемая для данной операции.
|
Текст запроса
| Имя. |
Тип |
Описание |
|
properties.accessKeysAuthentication
|
AccessKeysAuthentication
|
Это свойство можно включить или отключить, чтобы разрешить или запретить доступ с помощью текущих ключей доступа. Можно обновлять даже после создания базы данных. Значение по умолчанию — "Отключено".
|
|
properties.clientProtocol
|
Protocol
|
Указывает, могут ли клиенты redis подключаться с помощью протоколов redis с шифрованием TLS или с открытым текстом. По умолчанию используется шифрование TLS.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
Политика кластеризации — по умолчанию — OSSCluster. Это свойство можно обновить только в том случае, если текущее значение равно NoCluster. Если значение равно OSSCluster или EnterpriseCluster, его нельзя обновить, не удаляя базу данных.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
Возможность отложить обновление при выпуске последней версии — значение по умолчанию — NotDeferred. Подробнее: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
Политика вытеснения Redis — по умолчанию — VolatileLRU
|
|
properties.geoReplication
|
DatabasePropertiesGeoReplication
|
Необязательный набор свойств для настройки георепликации для этой базы данных.
|
|
properties.modules
|
Module[]
|
Необязательный набор модулей Redis для включения в этой базе данных — модули можно добавлять только во время создания.
|
|
properties.notifyKeyspaceEvents
|
string
|
Указывает, какие события в ключевом пространстве должны запускать уведомления. По умолчанию строка пустая, то есть эта функция отключена. При включении должны быть как минимум 'K' (ключевые события) или 'E' (ключевые события). Например, 'AKE' активирует все стандартные события. См. https://redis.io/docs/latest/develop/use/keyspace-notifications/ полный список типов мероприятий.
|
|
properties.persistence
|
Persistence
|
Параметры сохраняемости
|
|
properties.port
|
integer
(int32)
|
TCP-порт конечной точки базы данных. Указан во время создания. По умолчанию используется доступный порт.
|
Ответы
| Имя. |
Тип |
Описание |
|
200 OK
|
Database
|
Операция обновления ресурса "База данных" выполнена успешно
|
|
201 Created
|
Database
|
Операция по созданию ресурса "База данных" выполнена успешно
Заголовки
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Непредвиденное сообщение об ошибке.
|
Безопасность
azure_auth
Поток OAuth2 в Azure Active Directory.
Тип:
oauth2
Flow:
implicit
URL-адрес авторизации:
https://login.microsoftonline.com/common/oauth2/authorize
Области
| Имя. |
Описание |
|
user_impersonation
|
выдать себя за учетную запись пользователя
|
Примеры
RedisEnterpriseDatabasesCreate
Образец запроса
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2026-09-01
{
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "AllKeysLRU",
"notifyKeyspaceEvents": "KEA",
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20"
},
{
"name": "RediSearch"
}
],
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000
}
}
import com.azure.resourcemanager.redisenterprise.models.AccessKeysAuthentication;
import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
import com.azure.resourcemanager.redisenterprise.models.DeferUpgradeSetting;
import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
import com.azure.resourcemanager.redisenterprise.models.Module;
import com.azure.resourcemanager.redisenterprise.models.Persistence;
import com.azure.resourcemanager.redisenterprise.models.Protocol;
import java.util.Arrays;
/**
* Samples for Databases Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesCreate.json
*/
/**
* Sample code: RedisEnterpriseDatabasesCreate.
*
* @param manager Entry point to RedisEnterpriseManager.
*/
public static void
redisEnterpriseDatabasesCreate(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
manager.databases().define("default").withExistingRedisEnterprise("rg1", "cache1")
.withAccessKeysAuthentication(AccessKeysAuthentication.ENABLED).withClientProtocol(Protocol.ENCRYPTED)
.withPort(10000).withClusteringPolicy(ClusteringPolicy.ENTERPRISE_CLUSTER)
.withEvictionPolicy(EvictionPolicy.ALL_KEYS_LRU)
.withPersistence(new Persistence().withAofEnabled(true).withAofFrequency(AofFrequency.ONES))
.withModules(Arrays.asList(new Module().withName("RedisBloom").withArgs("ERROR_RATE 0.00 INITIAL_SIZE 400"),
new Module().withName("RedisTimeSeries").withArgs("RETENTION_POLICY 20"),
new Module().withName("RediSearch")))
.withDeferUpgrade(DeferUpgradeSetting.NOT_DEFERRED).withNotifyKeyspaceEvents("KEA").create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.redisenterprise import RedisEnterpriseManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-redisenterprise
# USAGE
python redis_enterprise_databases_create.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RedisEnterpriseManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.databases.begin_create(
resource_group_name="rg1",
cluster_name="cache1",
database_name="default",
parameters={
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "AllKeysLRU",
"modules": [
{"args": "ERROR_RATE 0.00 INITIAL_SIZE 400", "name": "RedisBloom"},
{"args": "RETENTION_POLICY 20", "name": "RedisTimeSeries"},
{"name": "RediSearch"},
],
"notifyKeyspaceEvents": "KEA",
"persistence": {"aofEnabled": True, "aofFrequency": "1s"},
"port": 10000,
}
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armredisenterprise_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redisenterprise/armredisenterprise/v4"
)
// Generated from example definition: 2026-09-01/RedisEnterpriseDatabasesCreate.json
func ExampleDatabasesClient_BeginCreate_redisEnterpriseDatabasesCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredisenterprise.NewClientFactory("e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDatabasesClient().BeginCreate(ctx, "rg1", "cache1", "default", armredisenterprise.Database{
Properties: &armredisenterprise.DatabaseCreateProperties{
AccessKeysAuthentication: to.Ptr(armredisenterprise.AccessKeysAuthenticationEnabled),
ClientProtocol: to.Ptr(armredisenterprise.ProtocolEncrypted),
ClusteringPolicy: to.Ptr(armredisenterprise.ClusteringPolicyEnterpriseCluster),
DeferUpgrade: to.Ptr(armredisenterprise.DeferUpgradeSettingNotDeferred),
EvictionPolicy: to.Ptr(armredisenterprise.EvictionPolicyAllKeysLRU),
NotifyKeyspaceEvents: to.Ptr("KEA"),
Modules: []*armredisenterprise.Module{
{
Name: to.Ptr("RedisBloom"),
Args: to.Ptr("ERROR_RATE 0.00 INITIAL_SIZE 400"),
},
{
Name: to.Ptr("RedisTimeSeries"),
Args: to.Ptr("RETENTION_POLICY 20"),
},
{
Name: to.Ptr("RediSearch"),
},
},
Persistence: &armredisenterprise.Persistence{
AofEnabled: to.Ptr(true),
AofFrequency: to.Ptr(armredisenterprise.AofFrequencyOneS),
},
Port: to.Ptr[int32](10000),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armredisenterprise.DatabasesClientCreateResponse{
// Database: armredisenterprise.Database{
// Name: to.Ptr("cache1/default"),
// Type: to.Ptr("Microsoft.Cache/redisEnterprise/databases"),
// ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
// Properties: &armredisenterprise.DatabaseCreateProperties{
// AccessKeysAuthentication: to.Ptr(armredisenterprise.AccessKeysAuthenticationEnabled),
// ClientProtocol: to.Ptr(armredisenterprise.ProtocolEncrypted),
// ClusteringPolicy: to.Ptr(armredisenterprise.ClusteringPolicyEnterpriseCluster),
// DeferUpgrade: to.Ptr(armredisenterprise.DeferUpgradeSettingNotDeferred),
// EvictionPolicy: to.Ptr(armredisenterprise.EvictionPolicyAllKeysLRU),
// NotifyKeyspaceEvents: to.Ptr("KEA"),
// Modules: []*armredisenterprise.Module{
// {
// Name: to.Ptr("RedisBloom"),
// Args: to.Ptr("ERROR_RATE 0.00 INITIAL_SIZE 400"),
// Version: to.Ptr("1.0.0"),
// },
// {
// Name: to.Ptr("RedisTimeSeries"),
// Args: to.Ptr("RETENTION_POLICY 20"),
// Version: to.Ptr("1.0.0"),
// },
// {
// Name: to.Ptr("RediSearch"),
// Args: to.Ptr(""),
// Version: to.Ptr("1.0.0"),
// },
// },
// Persistence: &armredisenterprise.Persistence{
// AofEnabled: to.Ptr(true),
// AofFrequency: to.Ptr(armredisenterprise.AofFrequencyOneS),
// },
// Port: to.Ptr[int32](10000),
// ProvisioningState: to.Ptr(armredisenterprise.ProvisioningStateUpdating),
// RedisVersion: to.Ptr("6.0"),
// ResourceState: to.Ptr(armredisenterprise.ResourceStateUpdating),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a database
*
* @summary creates a database
* x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesCreate.json
*/
async function redisEnterpriseDatabasesCreate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
const client = new RedisEnterpriseManagementClient(credential, subscriptionId);
const result = await client.databases.create("rg1", "cache1", "default", {
accessKeysAuthentication: "Enabled",
clientProtocol: "Encrypted",
clusteringPolicy: "EnterpriseCluster",
deferUpgrade: "NotDeferred",
evictionPolicy: "AllKeysLRU",
notifyKeyspaceEvents: "KEA",
modules: [
{ name: "RedisBloom", args: "ERROR_RATE 0.00 INITIAL_SIZE 400" },
{ name: "RedisTimeSeries", args: "RETENTION_POLICY 20" },
{ name: "RediSearch" },
],
persistence: { aofEnabled: true, aofFrequency: "1s" },
port: 10000,
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RedisEnterprise.Models;
using Azure.ResourceManager.RedisEnterprise;
// Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2026-09-01/examples/RedisEnterpriseDatabasesCreate.json
// this example is just showing the usage of "Databases_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this RedisEnterpriseClusterResource created on azure
// for more information of creating RedisEnterpriseClusterResource, please refer to the document of RedisEnterpriseClusterResource
string subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
string resourceGroupName = "rg1";
string clusterName = "cache1";
ResourceIdentifier redisEnterpriseClusterResourceId = RedisEnterpriseClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName);
RedisEnterpriseClusterResource redisEnterpriseCluster = client.GetRedisEnterpriseClusterResource(redisEnterpriseClusterResourceId);
// get the collection of this RedisEnterpriseDatabaseResource
RedisEnterpriseDatabaseCollection collection = redisEnterpriseCluster.GetRedisEnterpriseDatabases();
// invoke the operation
string databaseName = "default";
RedisEnterpriseDatabaseData data = new RedisEnterpriseDatabaseData
{
ClientProtocol = RedisEnterpriseClientProtocol.Encrypted,
Port = 10000,
ClusteringPolicy = RedisEnterpriseClusteringPolicy.EnterpriseCluster,
EvictionPolicy = RedisEnterpriseEvictionPolicy.AllKeysLru,
Persistence = new RedisPersistenceSettings
{
IsAofEnabled = true,
AofFrequency = PersistenceSettingAofFrequency.OneSecond,
},
Modules = {new RedisEnterpriseModule("RedisBloom")
{
Args = "ERROR_RATE 0.00 INITIAL_SIZE 400",
}, new RedisEnterpriseModule("RedisTimeSeries")
{
Args = "RETENTION_POLICY 20",
}, new RedisEnterpriseModule("RediSearch")},
DeferUpgrade = DeferUpgradeSetting.NotDeferred,
AccessKeysAuthentication = AccessKeysAuthentication.Enabled,
};
ArmOperation<RedisEnterpriseDatabaseResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data);
RedisEnterpriseDatabaseResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
RedisEnterpriseDatabaseData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Пример ответа
{
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "AllKeysLRU",
"notifyKeyspaceEvents": "KEA",
"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"
}
],
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"provisioningState": "Updating",
"redisVersion": "6.0",
"resourceState": "Updating"
}
}
{
"name": "cache1/db1",
"type": "Microsoft.Cache/redisEnterprise/databases",
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1",
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"notifyKeyspaceEvents": "KEA",
"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"
}
],
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"provisioningState": "Creating",
"resourceState": "Creating"
}
}
RedisEnterpriseDatabasesCreate No Cluster Cache
Образец запроса
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2026-09-01
{
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "NoCluster",
"evictionPolicy": "NoEviction",
"notifyKeyspaceEvents": "",
"port": 10000
}
}
import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
import com.azure.resourcemanager.redisenterprise.models.Protocol;
/**
* Samples for Databases Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesNoClusterCacheCreate.json
*/
/**
* Sample code: RedisEnterpriseDatabasesCreate No Cluster Cache.
*
* @param manager Entry point to RedisEnterpriseManager.
*/
public static void redisEnterpriseDatabasesCreateNoClusterCache(
com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
manager.databases().define("default").withExistingRedisEnterprise("rg1", "cache1")
.withClientProtocol(Protocol.ENCRYPTED).withPort(10000).withClusteringPolicy(ClusteringPolicy.NO_CLUSTER)
.withEvictionPolicy(EvictionPolicy.NO_EVICTION).withNotifyKeyspaceEvents("").create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.redisenterprise import RedisEnterpriseManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-redisenterprise
# USAGE
python redis_enterprise_databases_no_cluster_cache_create.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RedisEnterpriseManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.databases.begin_create(
resource_group_name="rg1",
cluster_name="cache1",
database_name="default",
parameters={
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "NoCluster",
"evictionPolicy": "NoEviction",
"notifyKeyspaceEvents": "",
"port": 10000,
}
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesNoClusterCacheCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armredisenterprise_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redisenterprise/armredisenterprise/v4"
)
// Generated from example definition: 2026-09-01/RedisEnterpriseDatabasesNoClusterCacheCreate.json
func ExampleDatabasesClient_BeginCreate_redisEnterpriseDatabasesCreateNoClusterCache() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredisenterprise.NewClientFactory("e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDatabasesClient().BeginCreate(ctx, "rg1", "cache1", "default", armredisenterprise.Database{
Properties: &armredisenterprise.DatabaseCreateProperties{
ClientProtocol: to.Ptr(armredisenterprise.ProtocolEncrypted),
ClusteringPolicy: to.Ptr(armredisenterprise.ClusteringPolicyNoCluster),
EvictionPolicy: to.Ptr(armredisenterprise.EvictionPolicyNoEviction),
NotifyKeyspaceEvents: to.Ptr(""),
Port: to.Ptr[int32](10000),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armredisenterprise.DatabasesClientCreateResponse{
// Database: armredisenterprise.Database{
// Name: to.Ptr("cache1/default"),
// Type: to.Ptr("Microsoft.Cache/redisEnterprise/databases"),
// ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
// Properties: &armredisenterprise.DatabaseCreateProperties{
// AccessKeysAuthentication: to.Ptr(armredisenterprise.AccessKeysAuthenticationEnabled),
// ClientProtocol: to.Ptr(armredisenterprise.ProtocolEncrypted),
// ClusteringPolicy: to.Ptr(armredisenterprise.ClusteringPolicyNoCluster),
// DeferUpgrade: to.Ptr(armredisenterprise.DeferUpgradeSettingNotDeferred),
// EvictionPolicy: to.Ptr(armredisenterprise.EvictionPolicyNoEviction),
// NotifyKeyspaceEvents: to.Ptr(""),
// Port: to.Ptr[int32](10000),
// ProvisioningState: to.Ptr(armredisenterprise.ProvisioningStateUpdating),
// RedisVersion: to.Ptr("7.2"),
// ResourceState: to.Ptr(armredisenterprise.ResourceStateUpdating),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a database
*
* @summary creates a database
* x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesNoClusterCacheCreate.json
*/
async function redisEnterpriseDatabasesCreateNoClusterCache() {
const credential = new DefaultAzureCredential();
const subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
const client = new RedisEnterpriseManagementClient(credential, subscriptionId);
const result = await client.databases.create("rg1", "cache1", "default", {
clientProtocol: "Encrypted",
clusteringPolicy: "NoCluster",
evictionPolicy: "NoEviction",
notifyKeyspaceEvents: "",
port: 10000,
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RedisEnterprise.Models;
using Azure.ResourceManager.RedisEnterprise;
// Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2026-09-01/examples/RedisEnterpriseDatabasesNoClusterCacheCreate.json
// this example is just showing the usage of "Databases_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this RedisEnterpriseClusterResource created on azure
// for more information of creating RedisEnterpriseClusterResource, please refer to the document of RedisEnterpriseClusterResource
string subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
string resourceGroupName = "rg1";
string clusterName = "cache1";
ResourceIdentifier redisEnterpriseClusterResourceId = RedisEnterpriseClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName);
RedisEnterpriseClusterResource redisEnterpriseCluster = client.GetRedisEnterpriseClusterResource(redisEnterpriseClusterResourceId);
// get the collection of this RedisEnterpriseDatabaseResource
RedisEnterpriseDatabaseCollection collection = redisEnterpriseCluster.GetRedisEnterpriseDatabases();
// invoke the operation
string databaseName = "default";
RedisEnterpriseDatabaseData data = new RedisEnterpriseDatabaseData
{
ClientProtocol = RedisEnterpriseClientProtocol.Encrypted,
Port = 10000,
ClusteringPolicy = RedisEnterpriseClusteringPolicy.NoCluster,
EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction,
};
ArmOperation<RedisEnterpriseDatabaseResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data);
RedisEnterpriseDatabaseResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
RedisEnterpriseDatabaseData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Пример ответа
{
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "NoCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "NoEviction",
"notifyKeyspaceEvents": "",
"port": 10000,
"provisioningState": "Updating",
"redisVersion": "7.2",
"resourceState": "Updating"
}
}
{
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "NoCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "NoEviction",
"notifyKeyspaceEvents": "",
"port": 10000,
"provisioningState": "Creating",
"redisVersion": "7.2",
"resourceState": "Creating"
}
}
RedisEnterpriseDatabasesCreate With Active Geo Replication
Образец запроса
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2026-09-01
{
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"
},
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"
}
]
},
"notifyKeyspaceEvents": "KEA",
"port": 10000
}
}
import com.azure.resourcemanager.redisenterprise.models.AccessKeysAuthentication;
import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
import com.azure.resourcemanager.redisenterprise.models.LinkedDatabase;
import com.azure.resourcemanager.redisenterprise.models.Protocol;
import java.util.Arrays;
/**
* Samples for Databases Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesCreateWithGeoReplication.json
*/
/**
* Sample code: RedisEnterpriseDatabasesCreate With Active Geo Replication.
*
* @param manager Entry point to RedisEnterpriseManager.
*/
public static void redisEnterpriseDatabasesCreateWithActiveGeoReplication(
com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
manager.databases().define("default").withExistingRedisEnterprise("rg1", "cache1")
.withAccessKeysAuthentication(AccessKeysAuthentication.ENABLED).withClientProtocol(Protocol.ENCRYPTED)
.withPort(10000).withClusteringPolicy(ClusteringPolicy.ENTERPRISE_CLUSTER)
.withEvictionPolicy(EvictionPolicy.NO_EVICTION)
.withGeoReplication(new DatabasePropertiesGeoReplication().withGroupNickname("groupName")
.withLinkedDatabases(Arrays.asList(new LinkedDatabase().withId(
"/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
new LinkedDatabase().withId(
"/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"))))
.withNotifyKeyspaceEvents("KEA").create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.redisenterprise import RedisEnterpriseManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-redisenterprise
# USAGE
python redis_enterprise_databases_create_with_geo_replication.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RedisEnterpriseManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.databases.begin_create(
resource_group_name="rg1",
cluster_name="cache1",
database_name="default",
parameters={
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"
},
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"
},
],
},
"notifyKeyspaceEvents": "KEA",
"port": 10000,
}
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesCreateWithGeoReplication.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armredisenterprise_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redisenterprise/armredisenterprise/v4"
)
// Generated from example definition: 2026-09-01/RedisEnterpriseDatabasesCreateWithGeoReplication.json
func ExampleDatabasesClient_BeginCreate_redisEnterpriseDatabasesCreateWithActiveGeoReplication() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armredisenterprise.NewClientFactory("e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDatabasesClient().BeginCreate(ctx, "rg1", "cache1", "default", armredisenterprise.Database{
Properties: &armredisenterprise.DatabaseCreateProperties{
AccessKeysAuthentication: to.Ptr(armredisenterprise.AccessKeysAuthenticationEnabled),
ClientProtocol: to.Ptr(armredisenterprise.ProtocolEncrypted),
ClusteringPolicy: to.Ptr(armredisenterprise.ClusteringPolicyEnterpriseCluster),
EvictionPolicy: to.Ptr(armredisenterprise.EvictionPolicyNoEviction),
GeoReplication: &armredisenterprise.DatabasePropertiesGeoReplication{
GroupNickname: to.Ptr("groupName"),
LinkedDatabases: []*armredisenterprise.LinkedDatabase{
{
ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
},
{
ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"),
},
},
},
NotifyKeyspaceEvents: to.Ptr("KEA"),
Port: to.Ptr[int32](10000),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armredisenterprise.DatabasesClientCreateResponse{
// Database: armredisenterprise.Database{
// Name: to.Ptr("cache1/default"),
// Type: to.Ptr("Microsoft.Cache/redisEnterprise/databases"),
// ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
// Properties: &armredisenterprise.DatabaseCreateProperties{
// AccessKeysAuthentication: to.Ptr(armredisenterprise.AccessKeysAuthenticationEnabled),
// ClientProtocol: to.Ptr(armredisenterprise.ProtocolEncrypted),
// ClusteringPolicy: to.Ptr(armredisenterprise.ClusteringPolicyEnterpriseCluster),
// DeferUpgrade: to.Ptr(armredisenterprise.DeferUpgradeSettingNotDeferred),
// EvictionPolicy: to.Ptr(armredisenterprise.EvictionPolicyNoEviction),
// GeoReplication: &armredisenterprise.DatabasePropertiesGeoReplication{
// GroupNickname: to.Ptr("groupName"),
// LinkedDatabases: []*armredisenterprise.LinkedDatabase{
// {
// ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
// State: to.Ptr(armredisenterprise.LinkStateLinking),
// },
// {
// ID: to.Ptr("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"),
// State: to.Ptr(armredisenterprise.LinkStateLinking),
// },
// },
// },
// NotifyKeyspaceEvents: to.Ptr("KEA"),
// Port: to.Ptr[int32](10000),
// ProvisioningState: to.Ptr(armredisenterprise.ProvisioningStateUpdating),
// RedisVersion: to.Ptr("6.0"),
// ResourceState: to.Ptr(armredisenterprise.ResourceStateUpdating),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RedisEnterpriseManagementClient } = require("@azure/arm-redisenterprisecache");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a database
*
* @summary creates a database
* x-ms-original-file: 2026-09-01/RedisEnterpriseDatabasesCreateWithGeoReplication.json
*/
async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() {
const credential = new DefaultAzureCredential();
const subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
const client = new RedisEnterpriseManagementClient(credential, subscriptionId);
const result = await client.databases.create("rg1", "cache1", "default", {
accessKeysAuthentication: "Enabled",
clientProtocol: "Encrypted",
clusteringPolicy: "EnterpriseCluster",
evictionPolicy: "NoEviction",
geoReplication: {
groupNickname: "groupName",
linkedDatabases: [
{
id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
},
{
id: "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default",
},
],
},
notifyKeyspaceEvents: "KEA",
port: 10000,
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RedisEnterprise.Models;
using Azure.ResourceManager.RedisEnterprise;
// Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2026-09-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json
// this example is just showing the usage of "Databases_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this RedisEnterpriseClusterResource created on azure
// for more information of creating RedisEnterpriseClusterResource, please refer to the document of RedisEnterpriseClusterResource
string subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
string resourceGroupName = "rg1";
string clusterName = "cache1";
ResourceIdentifier redisEnterpriseClusterResourceId = RedisEnterpriseClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName);
RedisEnterpriseClusterResource redisEnterpriseCluster = client.GetRedisEnterpriseClusterResource(redisEnterpriseClusterResourceId);
// get the collection of this RedisEnterpriseDatabaseResource
RedisEnterpriseDatabaseCollection collection = redisEnterpriseCluster.GetRedisEnterpriseDatabases();
// invoke the operation
string databaseName = "default";
RedisEnterpriseDatabaseData data = new RedisEnterpriseDatabaseData
{
ClientProtocol = RedisEnterpriseClientProtocol.Encrypted,
Port = 10000,
ClusteringPolicy = RedisEnterpriseClusteringPolicy.EnterpriseCluster,
EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction,
GeoReplication = new RedisEnterpriseDatabaseGeoReplication
{
GroupNickname = "groupName",
LinkedDatabases = {new RedisEnterpriseLinkedDatabase
{
Id = new ResourceIdentifier("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
}, new RedisEnterpriseLinkedDatabase
{
Id = new ResourceIdentifier("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"),
}},
},
AccessKeysAuthentication = AccessKeysAuthentication.Enabled,
};
ArmOperation<RedisEnterpriseDatabaseResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data);
RedisEnterpriseDatabaseResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
RedisEnterpriseDatabaseData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Пример ответа
{
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "NoEviction",
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"state": "Linking"
},
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default",
"state": "Linking"
}
]
},
"notifyKeyspaceEvents": "KEA",
"port": 10000,
"provisioningState": "Updating",
"redisVersion": "6.0",
"resourceState": "Updating"
}
}
{
"name": "cache1/db1",
"type": "Microsoft.Cache/redisEnterprise/databases",
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1",
"properties": {
"accessKeysAuthentication": "Enabled",
"clientProtocol": "Plaintext",
"clusteringPolicy": "EnterpriseCluster",
"deferUpgrade": "NotDeferred",
"evictionPolicy": "NoEviction",
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8e/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"state": "Linking"
},
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default",
"state": "Linking"
}
]
},
"notifyKeyspaceEvents": "KEA",
"port": 10000,
"provisioningState": "Creating",
"redisVersion": "6.0",
"resourceState": "Creating"
}
}
Определения
| Имя. |
Описание |
|
AccessKeysAuthentication
|
Это свойство можно включить или отключить, чтобы разрешить или запретить доступ с помощью текущих ключей доступа. Можно обновлять даже после создания базы данных.
|
|
AofFrequency
|
Задает частоту записи данных на диск. По умолчанию используется значение "1s", то есть "каждую секунду". Обратите внимание, что параметр always устарел из-за его влияния на производительность.
|
|
ClusteringPolicy
|
Политика кластеризации — по умолчанию — OSSCluster. Это свойство можно обновить только в том случае, если текущее значение равно NoCluster. Если значение равно OSSCluster или EnterpriseCluster, его нельзя обновить, не удаляя базу данных.
|
|
createdByType
|
Тип учётной записи, создавшей ресурс.
|
|
Database
|
Описание базы данных в кластере Redis Enterprise
|
|
DatabasePropertiesGeoReplication
|
Необязательный набор свойств для настройки георепликации для этой базы данных.
|
|
DeferUpgradeSetting
|
Возможность отложить обновление при выпуске последней версии — значение по умолчанию — NotDeferred. Подробнее: https://aka.ms/redisversionupgrade
|
|
ErrorAdditionalInfo
|
Дополнительные сведения об ошибке управления ресурсами.
|
|
ErrorDetail
|
Подробности ошибки.
|
|
ErrorResponse
|
Ответ на ошибку
|
|
EvictionPolicy
|
Политика вытеснения Redis — по умолчанию — VolatileLRU
|
|
LinkedDatabase
|
Указывает сведения о ресурсе связанной базы данных.
|
|
LinkState
|
Состояние связи между ресурсами базы данных.
|
|
Module
|
Указывает конфигурацию модуля Redis
|
|
Persistence
|
Конфигурация сохраняемости для базы данных Redis Enterprise
|
|
Protocol
|
Указывает, могут ли клиенты redis подключаться с помощью протоколов redis с шифрованием TLS или с открытым текстом. По умолчанию используется шифрование TLS.
|
|
ProvisioningState
|
Текущее состояние подготовки
|
|
RdbFrequency
|
Задает частоту создания моментального снимка базы данных.
|
|
ResourceState
|
Текущее состояние ресурсов
|
|
systemData
|
Метаданные, относящиеся к созданию и последнему изменении ресурса.
|
AccessKeysAuthentication
Перечисление
Это свойство можно включить или отключить, чтобы разрешить или запретить доступ с помощью текущих ключей доступа. Можно обновлять даже после создания базы данных.
| Значение |
Описание |
|
Disabled
|
Disabled
|
|
Enabled
|
Enabled
|
AofFrequency
Перечисление
Задает частоту записи данных на диск. По умолчанию используется значение "1s", то есть "каждую секунду". Обратите внимание, что параметр always устарел из-за его влияния на производительность.
| Значение |
Описание |
|
1s
|
1с
|
|
always
|
Всегда
|
ClusteringPolicy
Перечисление
Политика кластеризации — по умолчанию — OSSCluster. Это свойство можно обновить только в том случае, если текущее значение равно NoCluster. Если значение равно OSSCluster или EnterpriseCluster, его нельзя обновить, не удаляя базу данных.
| Значение |
Описание |
|
EnterpriseCluster
|
Политика кластеризации предприятия использует только классический протокол redis, который не поддерживает команды кластера Redis.
|
|
OSSCluster
|
Политика кластеризации OSS соответствует спецификации кластера Redis и требует, чтобы все клиенты поддерживали кластеризацию redis.
|
|
NoCluster
|
Политика NoCluster используется для некластеризованных экземпляров Redis, для которых не требуются функции кластеризации.
|
createdByType
Перечисление
Тип учётной записи, создавшей ресурс.
| Значение |
Описание |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Database
Объект
Описание базы данных в кластере Redis Enterprise
| Имя. |
Тип |
Значение по умолчанию |
Описание |
|
id
|
string
(arm-id)
|
|
Полный идентификатор ресурса. Например, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
|
Имя ресурса.
|
|
properties.accessKeysAuthentication
|
AccessKeysAuthentication
|
Disabled
|
Это свойство можно включить или отключить, чтобы разрешить или запретить доступ с помощью текущих ключей доступа. Можно обновлять даже после создания базы данных. Значение по умолчанию — "Отключено".
|
|
properties.clientProtocol
|
Protocol
|
|
Указывает, могут ли клиенты redis подключаться с помощью протоколов redis с шифрованием TLS или с открытым текстом. По умолчанию используется шифрование TLS.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
|
Политика кластеризации — по умолчанию — OSSCluster. Это свойство можно обновить только в том случае, если текущее значение равно NoCluster. Если значение равно OSSCluster или EnterpriseCluster, его нельзя обновить, не удаляя базу данных.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
|
Возможность отложить обновление при выпуске последней версии — значение по умолчанию — NotDeferred. Подробнее: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
|
Политика вытеснения Redis — по умолчанию — VolatileLRU
|
|
properties.geoReplication
|
DatabasePropertiesGeoReplication
|
|
Необязательный набор свойств для настройки георепликации для этой базы данных.
|
|
properties.modules
|
Module[]
|
|
Необязательный набор модулей Redis для включения в этой базе данных — модули можно добавлять только во время создания.
|
|
properties.notifyKeyspaceEvents
|
string
|
|
Указывает, какие события в ключевом пространстве должны запускать уведомления. По умолчанию строка пустая, то есть эта функция отключена. При включении должны быть как минимум 'K' (ключевые события) или 'E' (ключевые события). Например, 'AKE' активирует все стандартные события. См. https://redis.io/docs/latest/develop/use/keyspace-notifications/ полный список типов мероприятий.
|
|
properties.persistence
|
Persistence
|
|
Параметры сохраняемости
|
|
properties.port
|
integer
(int32)
|
|
TCP-порт конечной точки базы данных. Указан во время создания. По умолчанию используется доступный порт.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Текущее состояние подготовки базы данных
|
|
properties.redisVersion
|
string
|
|
Версия Redis, на которой работает база данных, например, «6.0»
|
|
properties.resourceState
|
ResourceState
|
|
Текущее состояние ресурсов базы данных
|
|
systemData
|
systemData
|
|
Метаданные Azure Resource Manager, содержащие данные createdBy и modifiedBy.
|
|
type
|
string
|
|
Тип ресурса. Например, "Microsoft.Compute/virtualMachines" или "Microsoft.Storage/storageAccounts"
|
DatabasePropertiesGeoReplication
Объект
Необязательный набор свойств для настройки георепликации для этой базы данных.
| Имя. |
Тип |
Описание |
|
groupNickname
|
string
|
Имя группы ресурсов связанной базы данных
|
|
linkedDatabases
|
LinkedDatabase[]
|
Список ресурсов базы данных для связи с этой базой данных
|
DeferUpgradeSetting
Перечисление
Возможность отложить обновление при выпуске последней версии — значение по умолчанию — NotDeferred. Подробнее: https://aka.ms/redisversionupgrade
| Значение |
Описание |
|
Deferred
|
Действие отложено
|
|
NotDeferred
|
NotDeferred
|
ErrorAdditionalInfo
Объект
Дополнительные сведения об ошибке управления ресурсами.
| Имя. |
Тип |
Описание |
|
info
|
object
|
Дополнительные сведения.
|
|
type
|
string
|
Тип дополнительных сведений.
|
ErrorDetail
Объект
Подробности ошибки.
| Имя. |
Тип |
Описание |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Дополнительные сведения об ошибке.
|
|
code
|
string
|
Код ошибки.
|
|
details
|
ErrorDetail[]
|
Сведения об ошибке.
|
|
message
|
string
|
Сообщение об ошибке.
|
|
target
|
string
|
Целевой объект ошибки.
|
ErrorResponse
Объект
Ответ на ошибку
EvictionPolicy
Перечисление
Политика вытеснения Redis — по умолчанию — VolatileLRU
| Значение |
Описание |
|
AllKeysLFU
|
AllKeysLFU
|
|
AllKeysLRU
|
AllKeysLRU
|
|
AllKeysRandom
|
AllKeysRandom
|
|
VolatileLRU
|
VolatileLRU
|
|
VolatileLFU
|
ПеременнаяLFU
|
|
VolatileTTL
|
VolatileTTL
|
|
VolatileRandom
|
VolatileRandom
|
|
NoEviction
|
NoEviction
|
LinkedDatabase
Объект
Указывает сведения о ресурсе связанной базы данных.
| Имя. |
Тип |
Описание |
|
id
|
string
(arm-id)
|
Идентификатор ресурса базы данных для связи с этой базой данных.
|
|
state
|
LinkState
|
Состояние связи между ресурсами базы данных.
|
LinkState
Перечисление
Состояние связи между ресурсами базы данных.
| Значение |
Описание |
|
Linked
|
Связан
|
|
Linking
|
Связывание
|
|
Unlinking
|
Отмена связывания
|
|
LinkFailed
|
LinkFailed
|
|
UnlinkFailed
|
Отмена связи
|
Module
Объект
Указывает конфигурацию модуля Redis
| Имя. |
Тип |
Описание |
|
args
|
string
|
Параметры конфигурации модуля, например "ERROR_RATE 0.01 INITIAL_SIZE 400".
|
|
name
|
string
|
Имя модуля, например RedisBloom, RediSearch, RedisTimeSeries.
|
|
version
|
string
|
Версия модуля, например "1.0".
|
Persistence
Объект
Конфигурация сохраняемости для базы данных Redis Enterprise
| Имя. |
Тип |
Описание |
|
aofEnabled
|
boolean
|
Задает, включен ли AOF. Обратите внимание, что может быть включена не более одного из сохраняемости AOF или RDB.
|
|
aofFrequency
|
AofFrequency
|
Задает частоту записи данных на диск. По умолчанию используется значение "1s", то есть "каждую секунду". Обратите внимание, что параметр always устарел из-за его влияния на производительность.
|
|
rdbEnabled
|
boolean
|
Задает, включен ли RDB. Обратите внимание, что может быть включена не более одного из сохраняемости AOF или RDB.
|
|
rdbFrequency
|
RdbFrequency
|
Задает частоту создания моментального снимка базы данных.
|
Protocol
Перечисление
Указывает, могут ли клиенты redis подключаться с помощью протоколов redis с шифрованием TLS или с открытым текстом. По умолчанию используется шифрование TLS.
| Значение |
Описание |
|
Encrypted
|
Зашифровано
|
|
Plaintext
|
Открытый текст
|
ProvisioningState
Перечисление
Текущее состояние подготовки
| Значение |
Описание |
|
Succeeded
|
Succeeded
|
|
Failed
|
Сбой
|
|
Canceled
|
Canceled
|
|
Creating
|
Создавать
|
|
Updating
|
Updating
|
|
Deleting
|
Удаление
|
RdbFrequency
Перечисление
Задает частоту создания моментального снимка базы данных.
| Значение |
Описание |
|
1h
|
1ч
|
|
6h
|
6 часов
|
|
12h
|
12 часов
|
ResourceState
Перечисление
Текущее состояние ресурсов
| Значение |
Описание |
|
Running
|
Running
|
|
Creating
|
Создавать
|
|
CreateFailed
|
CreateFailed
|
|
Updating
|
Updating
|
|
UpdateFailed
|
Обновление не удалось
|
|
Deleting
|
Удаление
|
|
DeleteFailed
|
Не удалось удалить
|
|
Enabling
|
Включение
|
|
EnableFailed
|
EnableFailed
|
|
Disabling
|
Отключение
|
|
DisableFailed
|
DisableFailed (Не удалось)
|
|
Disabled
|
Disabled
|
|
Scaling
|
Scaling
|
|
ScalingFailed
|
МасштабированиеFailed
|
|
Moving
|
Трогательный
|
systemData
Объект
Метаданные, относящиеся к созданию и последнему изменении ресурса.
| Имя. |
Тип |
Описание |
|
createdAt
|
string
(date-time)
|
Метка времени создания ресурса (UTC).
|
|
createdBy
|
string
|
Идентификатор, создавший ресурс.
|
|
createdByType
|
createdByType
|
Тип учётной записи, создавшей ресурс.
|
|
lastModifiedAt
|
string
(date-time)
|
Метка времени последнего изменения ресурса (UTC)
|
|
lastModifiedBy
|
string
|
Идентификатор, который последний раз изменил ресурс.
|
|
lastModifiedByType
|
createdByType
|
Тип удостоверения, который последний раз изменил ресурс.
|