Skapar en databas
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}?api-version=2026-09-01
URI-parametrar
| Name |
I |
Obligatorisk |
Typ |
Description |
|
clusterName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Namnet på Redis Enterprise-klustret. Namnet måste vara 1–60 tecken långt. Tillåtna tecken(A-Z, a-z, 0-9) och bindestreck(-). Det får inte finnas några inledande eller avslutande eller efterföljande bindestreck
|
|
databaseName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Namnet på Redis Enterprise-databasen.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Namnet på resursgruppen. Namnet är skiftlägesokänsligt.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
ID för målprenumerationen. Värdet måste vara ett UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Den API-version som ska användas för den här åtgärden.
|
Begärandetext
| Name |
Typ |
Description |
|
properties.accessKeysAuthentication
|
AccessKeysAuthentication
|
Den här egenskapen kan aktiveras/inaktiveras för att tillåta eller neka åtkomst med de aktuella åtkomstnycklarna. Kan uppdateras även efter att databasen har skapats. Standardvärdet är Inaktiverat.
|
|
properties.clientProtocol
|
Protocol
|
Anger om Redis-klienter kan ansluta med TLS-krypterade eller redis-protokoll i klartext. Standardvärdet är TLS-krypterat.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
Klustringsprincip – standardvärdet är OSSCluster. Den här egenskapen kan bara uppdateras om det aktuella värdet är NoCluster. Om värdet är OSSCluster eller EnterpriseCluster kan det inte uppdateras utan att databasen tas bort.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
Alternativ för att skjuta upp uppgraderingen när den senaste versionen släpps – standardvärdet är NotDeferred. Lära sig mer: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
Redis-borttagningsprincip – standardvärdet är VolatileLRU
|
|
properties.geoReplication
|
DatabasePropertiesGeoReplication
|
Valfri uppsättning egenskaper för att konfigurera geo-replikering för den här databasen.
|
|
properties.modules
|
Module[]
|
Valfri uppsättning redis-moduler som ska aktiveras i den här databasen – moduler kan bara läggas till när de skapas.
|
|
properties.notifyKeyspaceEvents
|
string
|
Specificerar vilka nyckelrymdshändelser som ska utlösa notifikationer. Standard är en tom sträng, vilket betyder att denna funktion är inaktiverad. När det är aktiverat måste minst 'K' (nyckelrymdshändelser) eller 'E' (nyckelhändelser) finnas med. Till exempel aktiverar 'AKE' alla standardhändelser. Se https://redis.io/docs/latest/develop/use/keyspace-notifications/ för den fullständiga listan över evenemangstyper.
|
|
properties.persistence
|
Persistence
|
Inställningar för beständighet
|
|
properties.port
|
integer
(int32)
|
TCP-port för databasslutpunkten. Anges vid skapandetillfället. Standardvärdet är en tillgänglig port.
|
Svar
| Name |
Typ |
Description |
|
200 OK
|
Database
|
Uppdateringsåtgärden för resursen "Databas" lyckades
|
|
201 Created
|
Database
|
Resursen "Databas" har skapats
Sidhuvuden
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Ett oväntat felsvar.
|
Säkerhet
azure_auth
Azure Active Directory OAuth2-flöde.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name |
Description |
|
user_impersonation
|
personifiera ditt användarkonto
|
Exempel
RedisEnterpriseDatabasesCreate
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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
Exempelbegäran
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
Exempelsvar
{
"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"
}
}
Definitioner
| Name |
Description |
|
AccessKeysAuthentication
|
Den här egenskapen kan aktiveras/inaktiveras för att tillåta eller neka åtkomst med de aktuella åtkomstnycklarna. Kan uppdateras även efter att databasen har skapats.
|
|
AofFrequency
|
Anger hur ofta data skrivs till disk. Standardvärdet är "1s", vilket betyder "varje sekund". Observera att inställningen "alltid" är inaktuell på grund av dess prestandapåverkan.
|
|
ClusteringPolicy
|
Klustringsprincip – standardvärdet är OSSCluster. Den här egenskapen kan bara uppdateras om det aktuella värdet är NoCluster. Om värdet är OSSCluster eller EnterpriseCluster kan det inte uppdateras utan att databasen tas bort.
|
|
createdByType
|
Den typ av identitet som skapade resursen.
|
|
Database
|
Beskriver en databas i Redis Enterprise-klustret
|
|
DatabasePropertiesGeoReplication
|
Valfri uppsättning egenskaper för att konfigurera geo-replikering för den här databasen.
|
|
DeferUpgradeSetting
|
Alternativ för att skjuta upp uppgraderingen när den senaste versionen släpps – standardvärdet är NotDeferred. Lära sig mer: https://aka.ms/redisversionupgrade
|
|
ErrorAdditionalInfo
|
Ytterligare information om resurshanteringsfelet.
|
|
ErrorDetail
|
Felinformationen.
|
|
ErrorResponse
|
Felsvar
|
|
EvictionPolicy
|
Redis-borttagningsprincip – standardvärdet är VolatileLRU
|
|
LinkedDatabase
|
Anger information om en länkad databasresurs.
|
|
LinkState
|
Tillståndet för länken mellan databasresurserna.
|
|
Module
|
Anger konfigurationen av en Redis-modul
|
|
Persistence
|
Beständig konfiguration för Redis Enterprise-databasen
|
|
Protocol
|
Anger om Redis-klienter kan ansluta med TLS-krypterade eller redis-protokoll i klartext. Standardvärdet är TLS-krypterat.
|
|
ProvisioningState
|
Aktuell etableringsstatus
|
|
RdbFrequency
|
Anger hur ofta en ögonblicksbild av databasen skapas.
|
|
ResourceState
|
Aktuell resursstatus
|
|
systemData
|
Metadata som rör skapande och senaste ändring av resursen.
|
AccessKeysAuthentication
Uppräkning
Den här egenskapen kan aktiveras/inaktiveras för att tillåta eller neka åtkomst med de aktuella åtkomstnycklarna. Kan uppdateras även efter att databasen har skapats.
| Värde |
Description |
|
Disabled
|
Disabled
|
|
Enabled
|
Enabled
|
AofFrequency
Uppräkning
Anger hur ofta data skrivs till disk. Standardvärdet är "1s", vilket betyder "varje sekund". Observera att inställningen "alltid" är inaktuell på grund av dess prestandapåverkan.
| Värde |
Description |
|
1s
|
1s
|
|
always
|
always
|
ClusteringPolicy
Uppräkning
Klustringsprincip – standardvärdet är OSSCluster. Den här egenskapen kan bara uppdateras om det aktuella värdet är NoCluster. Om värdet är OSSCluster eller EnterpriseCluster kan det inte uppdateras utan att databasen tas bort.
| Värde |
Description |
|
EnterpriseCluster
|
Enterprise-klustringsprincipen använder endast det klassiska Redis-protokollet, som inte stöder Redis-klusterkommandon.
|
|
OSSCluster
|
OSS-klustringsprincipen följer redis-klusterspecifikationen och kräver att alla klienter stöder Redis-klustring.
|
|
NoCluster
|
NoCluster-principen används för redis-instanser som inte kräver klustringsfunktioner.
|
createdByType
Uppräkning
Den typ av identitet som skapade resursen.
| Värde |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Database
Objekt
Beskriver en databas i Redis Enterprise-klustret
| Name |
Typ |
Standardvärde |
Description |
|
id
|
string
(arm-id)
|
|
Fullständigt kvalificerat resurs-ID för resursen. T.ex. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
|
Namnet på resursen
|
|
properties.accessKeysAuthentication
|
AccessKeysAuthentication
|
Disabled
|
Den här egenskapen kan aktiveras/inaktiveras för att tillåta eller neka åtkomst med de aktuella åtkomstnycklarna. Kan uppdateras även efter att databasen har skapats. Standardvärdet är Inaktiverat.
|
|
properties.clientProtocol
|
Protocol
|
|
Anger om Redis-klienter kan ansluta med TLS-krypterade eller redis-protokoll i klartext. Standardvärdet är TLS-krypterat.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
|
Klustringsprincip – standardvärdet är OSSCluster. Den här egenskapen kan bara uppdateras om det aktuella värdet är NoCluster. Om värdet är OSSCluster eller EnterpriseCluster kan det inte uppdateras utan att databasen tas bort.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
|
Alternativ för att skjuta upp uppgraderingen när den senaste versionen släpps – standardvärdet är NotDeferred. Lära sig mer: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
|
Redis-borttagningsprincip – standardvärdet är VolatileLRU
|
|
properties.geoReplication
|
DatabasePropertiesGeoReplication
|
|
Valfri uppsättning egenskaper för att konfigurera geo-replikering för den här databasen.
|
|
properties.modules
|
Module[]
|
|
Valfri uppsättning redis-moduler som ska aktiveras i den här databasen – moduler kan bara läggas till när de skapas.
|
|
properties.notifyKeyspaceEvents
|
string
|
|
Specificerar vilka nyckelrymdshändelser som ska utlösa notifikationer. Standard är en tom sträng, vilket betyder att denna funktion är inaktiverad. När det är aktiverat måste minst 'K' (nyckelrymdshändelser) eller 'E' (nyckelhändelser) finnas med. Till exempel aktiverar 'AKE' alla standardhändelser. Se https://redis.io/docs/latest/develop/use/keyspace-notifications/ för den fullständiga listan över evenemangstyper.
|
|
properties.persistence
|
Persistence
|
|
Inställningar för beständighet
|
|
properties.port
|
integer
(int32)
|
|
TCP-port för databasslutpunkten. Anges vid skapandetillfället. Standardvärdet är en tillgänglig port.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Databasens aktuella etableringsstatus
|
|
properties.redisVersion
|
string
|
|
Version av Redis som databasen körs på, t.ex. "6.0"
|
|
properties.resourceState
|
ResourceState
|
|
Databasens aktuella resursstatus
|
|
systemData
|
systemData
|
|
Azure Resource Manager-metadata som innehåller createdBy och modifiedBy information.
|
|
type
|
string
|
|
Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"
|
DatabasePropertiesGeoReplication
Objekt
Valfri uppsättning egenskaper för att konfigurera geo-replikering för den här databasen.
| Name |
Typ |
Description |
|
groupNickname
|
string
|
Namn på gruppen med länkade databasresurser
|
|
linkedDatabases
|
LinkedDatabase[]
|
Lista över databasresurser som ska länkas till den här databasen
|
DeferUpgradeSetting
Uppräkning
Alternativ för att skjuta upp uppgraderingen när den senaste versionen släpps – standardvärdet är NotDeferred. Lära sig mer: https://aka.ms/redisversionupgrade
| Värde |
Description |
|
Deferred
|
Uppskjuten
|
|
NotDeferred
|
NotDeferred
|
ErrorAdditionalInfo
Objekt
Ytterligare information om resurshanteringsfelet.
| Name |
Typ |
Description |
|
info
|
object
|
Ytterligare information.
|
|
type
|
string
|
Ytterligare informationstyp.
|
ErrorDetail
Objekt
Felinformationen.
| Name |
Typ |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Ytterligare information om felet.
|
|
code
|
string
|
Felkoden.
|
|
details
|
ErrorDetail[]
|
Felinformationen.
|
|
message
|
string
|
Felmeddelandet.
|
|
target
|
string
|
Felmålet.
|
ErrorResponse
Objekt
Felsvar
EvictionPolicy
Uppräkning
Redis-borttagningsprincip – standardvärdet är VolatileLRU
| Värde |
Description |
|
AllKeysLFU
|
AllKeysLFU
|
|
AllKeysLRU
|
AllKeysLRU
|
|
AllKeysRandom
|
AllKeysRandom
|
|
VolatileLRU
|
VolatileLRU
|
|
VolatileLFU
|
VolatileLFU
|
|
VolatileTTL
|
VolatileTTL
|
|
VolatileRandom
|
VolatileRandom
|
|
NoEviction
|
NoEviction
|
LinkedDatabase
Objekt
Anger information om en länkad databasresurs.
| Name |
Typ |
Description |
|
id
|
string
(arm-id)
|
Resurs-ID för en databasresurs som ska länkas till den här databasen.
|
|
state
|
LinkState
|
Tillståndet för länken mellan databasresurserna.
|
LinkState
Uppräkning
Tillståndet för länken mellan databasresurserna.
| Värde |
Description |
|
Linked
|
Länkad
|
|
Linking
|
Länkning
|
|
Unlinking
|
Ta bort länkning
|
|
LinkFailed
|
LinkFailed
|
|
UnlinkFailed
|
UnlinkFailed
|
Module
Objekt
Anger konfigurationen av en Redis-modul
| Name |
Typ |
Description |
|
args
|
string
|
Konfigurationsalternativ för modulen, t.ex. "ERROR_RATE 0.01 INITIAL_SIZE 400".
|
|
name
|
string
|
Namnet på modulen, t.ex. "RedisBloom", "RediSearch", "RedisTimeSeries"
|
|
version
|
string
|
Versionen av modulen, t.ex. "1.0".
|
Persistence
Objekt
Beständig konfiguration för Redis Enterprise-databasen
| Name |
Typ |
Description |
|
aofEnabled
|
boolean
|
Anger om AOF är aktiverat. Observera att högst en av AOF- eller RDB-beständigheterna kan vara aktiverad.
|
|
aofFrequency
|
AofFrequency
|
Anger hur ofta data skrivs till disk. Standardvärdet är "1s", vilket betyder "varje sekund". Observera att inställningen "alltid" är inaktuell på grund av dess prestandapåverkan.
|
|
rdbEnabled
|
boolean
|
Anger om RDB är aktiverat. Observera att högst en av AOF- eller RDB-beständigheterna kan vara aktiverad.
|
|
rdbFrequency
|
RdbFrequency
|
Anger hur ofta en ögonblicksbild av databasen skapas.
|
Protocol
Uppräkning
Anger om Redis-klienter kan ansluta med TLS-krypterade eller redis-protokoll i klartext. Standardvärdet är TLS-krypterat.
| Värde |
Description |
|
Encrypted
|
Krypterad
|
|
Plaintext
|
Klartext
|
ProvisioningState
Uppräkning
Aktuell etableringsstatus
| Värde |
Description |
|
Succeeded
|
lyckades
|
|
Failed
|
Misslyckat
|
|
Canceled
|
Annullerad
|
|
Creating
|
Skapar
|
|
Updating
|
Updating
|
|
Deleting
|
Tas bort
|
RdbFrequency
Uppräkning
Anger hur ofta en ögonblicksbild av databasen skapas.
| Värde |
Description |
|
1h
|
1h
|
|
6h
|
6 timmar
|
|
12h
|
12h
|
ResourceState
Uppräkning
Aktuell resursstatus
| Värde |
Description |
|
Running
|
Running
|
|
Creating
|
Skapar
|
|
CreateFailed
|
CreateFailed
|
|
Updating
|
Updating
|
|
UpdateFailed
|
Uppdatering Misslyckades
|
|
Deleting
|
Tas bort
|
|
DeleteFailed
|
Borttagningen misslyckades
|
|
Enabling
|
Aktivera
|
|
EnableFailed
|
EnableFailed
|
|
Disabling
|
Inaktivera
|
|
DisableFailed
|
DisableFailed
|
|
Disabled
|
Disabled
|
|
Scaling
|
Scaling
|
|
ScalingFailed
|
ScalingFailed
|
|
Moving
|
Rörande
|
systemData
Objekt
Metadata som rör skapande och senaste ändring av resursen.
| Name |
Typ |
Description |
|
createdAt
|
string
(date-time)
|
Tidsstämpeln för resursskapande (UTC).
|
|
createdBy
|
string
|
Identiteten som skapade resursen.
|
|
createdByType
|
createdByType
|
Den typ av identitet som skapade resursen.
|
|
lastModifiedAt
|
string
(date-time)
|
Tidsstämpeln för resursens senaste ändring (UTC)
|
|
lastModifiedBy
|
string
|
Identiteten som senast ändrade resursen.
|
|
lastModifiedByType
|
createdByType
|
Den typ av identitet som senast ändrade resursen.
|