Vytvoří databázi
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}?api-version=2025-07-01
Parametry identifikátoru URI
| Name |
V |
Vyžadováno |
Typ |
Description |
|
clusterName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Název clusteru Redis Enterprise. Název musí mít délku 1 až 60 znaků. Povolené znaky(A-Z, a-z, 0-9) a spojovník(-). Nesmí existovat žádné úvodní ani koncové ani po sobě jdoucí pomlčky.
|
|
databaseName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Název databáze Redis Enterprise.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Název skupiny prostředků. Název nerozlišuje malá a velká písmena.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
ID cílového předplatného.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Verze rozhraní API, která se má použít pro tuto operaci.
|
Text požadavku
| Name |
Typ |
Description |
|
properties.accessKeysAuthentication
|
accessKeysAuthentication
|
Tuto vlastnost lze povolit nebo zakázat, pokud chcete povolit nebo odepřít přístup pomocí aktuálních přístupových klíčů. Je možné je aktualizovat i po vytvoření databáze. Výchozí hodnota je zakázaná.
|
|
properties.clientProtocol
|
Protocol
|
Určuje, jestli se klienti Redis mohou připojit pomocí protokolů REDIS šifrovaných pomocí protokolu TLS nebo prostého textu. Výchozí hodnota je zašifrovaná protokolem TLS.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
Zásady clusteringu – výchozí hodnota je OSSCluster. Tuto vlastnost lze aktualizovat pouze v případě, že aktuální hodnota je NoCluster. Pokud je hodnota OSSCluster nebo EnterpriseCluster, nelze ji aktualizovat bez odstranění databáze.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
Možnost odložení upgradu při vydání nejnovější verze – výchozí hodnota NotDeferred. Víc se uč: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
Zásada vyřazení Redis – výchozí hodnota je VolatileLRU
|
|
properties.geoReplication
|
GeoReplication
|
Volitelná sada vlastností pro konfiguraci geografické replikace pro tuto databázi
|
|
properties.modules
|
Module[]
|
Volitelná sada modulů Redis pro povolení v této databázi – moduly je možné přidat pouze při vytváření.
|
|
properties.persistence
|
Persistence
|
Nastavení trvalosti
Nastavení trvalosti
|
|
properties.port
|
integer
(int32)
|
Port TCP koncového bodu databáze. Zadané při vytvoření. Výchozí hodnota je dostupný port.
|
Odpovědi
| Name |
Typ |
Description |
|
200 OK
|
Database
|
Databáze byla/je aktualizována. Podrobný stav najdete v provisioningState a resourceState.
|
|
201 Created
|
Database
|
Databáze byla/je vytvářena. Podrobný stav najdete v provisioningState a resourceState.
|
|
Other Status Codes
|
ErrorResponse
|
Chybová odpověď popisující, proč operace selhala.
|
Zabezpečení
azure_auth
Tok OAuth2 v Azure Active Directory
Typ:
oauth2
Tok:
implicit
URL autorizace:
https://login.microsoftonline.com/common/oauth2/authorize
Rozsahy
| Name |
Description |
|
user_impersonation
|
zosobnění uživatelského účtu
|
Příklady
RedisEnterpriseDatabasesCreate
Ukázkový požadavek
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2025-07-01
{
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20"
},
{
"name": "RediSearch"
}
],
"deferUpgrade": "NotDeferred",
"accessKeysAuthentication": "Enabled"
}
}
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:
* specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/
* 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")
.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)
.withAccessKeysAuthentication(AccessKeysAuthentication.ENABLED).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="e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f",
)
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"},
],
"persistence": {"aofEnabled": True, "aofFrequency": "1s"},
"port": 10000,
}
},
).result()
print(response)
# x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3855ffb4be0cd4d227b130b67d874fa816736c04/specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/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("<subscription-id>", 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),
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 pull 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.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),
// 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.ProvisioningStateSucceeded),
// 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");
require("dotenv/config");
/**
* This sample demonstrates how to Creates a database
*
* @summary Creates a database
* x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesCreate.json
*/
async function redisEnterpriseDatabasesCreate() {
const subscriptionId =
process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1";
const clusterName = "cache1";
const databaseName = "default";
const parameters = {
accessKeysAuthentication: "Enabled",
clientProtocol: "Encrypted",
clusteringPolicy: "EnterpriseCluster",
deferUpgrade: "NotDeferred",
evictionPolicy: "AllKeysLRU",
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,
};
const credential = new DefaultAzureCredential();
const client = new RedisEnterpriseManagementClient(credential, subscriptionId);
const result = await client.databases.beginCreateAndWait(
resourceGroupName,
clusterName,
databaseName,
parameters,
);
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/2025-07-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
Ukázková odpověď
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Updating",
"resourceState": "Updating",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400",
"version": "1.0.0"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20",
"version": "1.0.0"
},
{
"name": "RediSearch",
"args": "",
"version": "1.0.0"
}
],
"deferUpgrade": "NotDeferred",
"accessKeysAuthentication": "Enabled",
"redisVersion": "6.0"
}
}
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1",
"name": "cache1/db1",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Creating",
"resourceState": "Creating",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "AllKeysLRU",
"persistence": {
"aofEnabled": true,
"aofFrequency": "1s"
},
"port": 10000,
"modules": [
{
"name": "RedisBloom",
"args": "ERROR_RATE 0.00 INITIAL_SIZE 400",
"version": "1.0.0"
},
{
"name": "RedisTimeSeries",
"args": "RETENTION_POLICY 20",
"version": "1.0.0"
},
{
"name": "RediSearch",
"args": "",
"version": "1.0.0"
}
],
"accessKeysAuthentication": "Enabled"
}
}
RedisEnterpriseDatabasesCreate No Cluster Cache
Ukázkový požadavek
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2025-07-01
{
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "NoCluster",
"evictionPolicy": "NoEviction",
"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:
* specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/
* 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).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="e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f",
)
response = client.databases.begin_create(
resource_group_name="rg1",
cluster_name="cache1",
database_name="default",
parameters={
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "NoCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
}
},
).result()
print(response)
# x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3855ffb4be0cd4d227b130b67d874fa816736c04/specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/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("<subscription-id>", 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),
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 pull 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.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),
// Port: to.Ptr[int32](10000),
// ProvisioningState: to.Ptr(armredisenterprise.ProvisioningStateSucceeded),
// 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");
require("dotenv/config");
/**
* This sample demonstrates how to Creates a database
*
* @summary Creates a database
* x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesNoClusterCacheCreate.json
*/
async function redisEnterpriseDatabasesCreateNoClusterCache() {
const subscriptionId =
process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1";
const clusterName = "cache1";
const databaseName = "default";
const parameters = {
clientProtocol: "Encrypted",
clusteringPolicy: "NoCluster",
evictionPolicy: "NoEviction",
port: 10000,
};
const credential = new DefaultAzureCredential();
const client = new RedisEnterpriseManagementClient(credential, subscriptionId);
const result = await client.databases.beginCreateAndWait(
resourceGroupName,
clusterName,
databaseName,
parameters,
);
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/2025-07-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
Ukázková odpověď
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"clientProtocol": "Encrypted",
"port": 10000,
"provisioningState": "Creating",
"resourceState": "Creating",
"clusteringPolicy": "NoCluster",
"evictionPolicy": "NoEviction",
"deferUpgrade": "NotDeferred",
"redisVersion": "7.2",
"accessKeysAuthentication": "Enabled"
}
}
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"clientProtocol": "Encrypted",
"port": 10000,
"provisioningState": "Updating",
"resourceState": "Updating",
"clusteringPolicy": "NoCluster",
"evictionPolicy": "NoEviction",
"deferUpgrade": "NotDeferred",
"redisVersion": "7.2",
"accessKeysAuthentication": "Enabled"
}
}
RedisEnterpriseDatabasesCreate With Active Geo Replication
Ukázkový požadavek
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default?api-version=2025-07-01
{
"properties": {
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
"accessKeysAuthentication": "Enabled",
"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"
}
]
}
}
}
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:
* specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/
* 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")
.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"))))
.withAccessKeysAuthentication(AccessKeysAuthentication.ENABLED).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="e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f",
)
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"
},
],
},
"port": 10000,
}
},
).result()
print(response)
# x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/3855ffb4be0cd4d227b130b67d874fa816736c04/specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/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("<subscription-id>", 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.DatabaseCommonPropertiesGeoReplication{
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"),
}},
},
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 pull 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.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.DatabaseCommonPropertiesGeoReplication{
// 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),
// }},
// },
// Port: to.Ptr[int32](10000),
// ProvisioningState: to.Ptr(armredisenterprise.ProvisioningStateSucceeded),
// 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");
require("dotenv/config");
/**
* This sample demonstrates how to Creates a database
*
* @summary Creates a database
* x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json
*/
async function redisEnterpriseDatabasesCreateWithActiveGeoReplication() {
const subscriptionId =
process.env["REDISENTERPRISE_SUBSCRIPTION_ID"] || "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f";
const resourceGroupName = process.env["REDISENTERPRISE_RESOURCE_GROUP"] || "rg1";
const clusterName = "cache1";
const databaseName = "default";
const parameters = {
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",
},
],
},
port: 10000,
};
const credential = new DefaultAzureCredential();
const client = new RedisEnterpriseManagementClient(credential, subscriptionId);
const result = await client.databases.beginCreateAndWait(
resourceGroupName,
clusterName,
databaseName,
parameters,
);
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/2025-07-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
Ukázková odpověď
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default",
"name": "cache1/default",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Updating",
"resourceState": "Updating",
"clientProtocol": "Encrypted",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/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"
}
]
},
"deferUpgrade": "NotDeferred",
"accessKeysAuthentication": "Enabled",
"redisVersion": "6.0"
}
}
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1",
"name": "cache1/db1",
"type": "Microsoft.Cache/redisEnterprise/databases",
"properties": {
"provisioningState": "Creating",
"resourceState": "Creating",
"clientProtocol": "Plaintext",
"clusteringPolicy": "EnterpriseCluster",
"evictionPolicy": "NoEviction",
"port": 10000,
"geoReplication": {
"groupNickname": "groupName",
"linkedDatabases": [
{
"id": "/subscriptions/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"
}
]
},
"deferUpgrade": "NotDeferred",
"accessKeysAuthentication": "Enabled",
"redisVersion": "6.0"
}
}
Definice
| Name |
Description |
|
accessKeysAuthentication
|
Tuto vlastnost lze povolit nebo zakázat, pokud chcete povolit nebo odepřít přístup pomocí aktuálních přístupových klíčů. Je možné je aktualizovat i po vytvoření databáze. Výchozí hodnota je zakázaná.
|
|
AofFrequency
|
Nastaví frekvenci zápisu dat na disk. Výchozí hodnota je 1s, což znamená každou sekundu. Mějte na paměti, že nastavení Always je zastaralé kvůli jeho dopadu na výkon.
|
|
ClusteringPolicy
|
Zásady clusteringu – výchozí hodnota je OSSCluster. Tuto vlastnost lze aktualizovat pouze v případě, že aktuální hodnota je NoCluster. Pokud je hodnota OSSCluster nebo EnterpriseCluster, nelze ji aktualizovat bez odstranění databáze.
|
|
Database
|
Popisuje databázi v clusteru Redis Enterprise
|
|
DeferUpgradeSetting
|
Možnost odložení upgradu při vydání nejnovější verze – výchozí hodnota NotDeferred. Víc se uč: https://aka.ms/redisversionupgrade
|
|
ErrorAdditionalInfo
|
Další informace o chybě správy prostředků
|
|
ErrorDetail
|
Podrobnosti o chybě.
|
|
ErrorResponse
|
Chybová odpověď
|
|
EvictionPolicy
|
Zásada vyřazení Redis – výchozí hodnota je VolatileLRU
|
|
GeoReplication
|
Volitelná sada vlastností pro konfiguraci geografické replikace pro tuto databázi
|
|
LinkedDatabase
|
Propojená databáze
|
|
LinkState
|
Stav vazby mezi databázovými prostředky.
|
|
Module
|
Nastavení modulu
|
|
Persistence
|
Nastavení trvalosti
|
|
Protocol
|
Určuje, jestli se klienti Redis mohou připojit pomocí protokolů REDIS šifrovaných pomocí protokolu TLS nebo prostého textu. Výchozí hodnota je zašifrovaná protokolem TLS.
|
|
ProvisioningState
|
Aktuální stav zřizování
|
|
RdbFrequency
|
Nastaví frekvenci vytvoření snímku databáze.
|
|
ResourceState
|
Aktuální stav zdroje
|
accessKeysAuthentication
Výčet
Tuto vlastnost lze povolit nebo zakázat, pokud chcete povolit nebo odepřít přístup pomocí aktuálních přístupových klíčů. Je možné je aktualizovat i po vytvoření databáze. Výchozí hodnota je zakázaná.
| Hodnota |
Description |
|
Disabled
|
|
|
Enabled
|
|
AofFrequency
Výčet
Nastaví frekvenci zápisu dat na disk. Výchozí hodnota je 1s, což znamená každou sekundu. Mějte na paměti, že nastavení Always je zastaralé kvůli jeho dopadu na výkon.
| Hodnota |
Description |
|
1s
|
|
|
always
|
|
ClusteringPolicy
Výčet
Zásady clusteringu – výchozí hodnota je OSSCluster. Tuto vlastnost lze aktualizovat pouze v případě, že aktuální hodnota je NoCluster. Pokud je hodnota OSSCluster nebo EnterpriseCluster, nelze ji aktualizovat bez odstranění databáze.
| Hodnota |
Description |
|
EnterpriseCluster
|
Podnikové zásady clusteringu používají pouze klasický protokol Redis, který nepodporuje příkazy clusteru Redis.
|
|
OSSCluster
|
Zásady clusteringu OSS se řídí specifikací clusteru Redis a vyžadují, aby všichni klienti podporovali clustering Redis.
|
|
NoCluster
|
Zásada NoCluster se používá pro neclusterované instance Redis, které nevyžadují funkce clusteringu.
|
Database
Objekt
Popisuje databázi v clusteru Redis Enterprise
| Name |
Typ |
Default value |
Description |
|
id
|
string
|
|
Plně kvalifikované ID prostředku pro prostředek. Příklad : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
name
|
string
|
|
Název prostředku
|
|
properties.accessKeysAuthentication
|
accessKeysAuthentication
|
Disabled
|
Tuto vlastnost lze povolit nebo zakázat, pokud chcete povolit nebo odepřít přístup pomocí aktuálních přístupových klíčů. Je možné je aktualizovat i po vytvoření databáze. Výchozí hodnota je zakázaná.
|
|
properties.clientProtocol
|
Protocol
|
|
Určuje, jestli se klienti Redis mohou připojit pomocí protokolů REDIS šifrovaných pomocí protokolu TLS nebo prostého textu. Výchozí hodnota je zašifrovaná protokolem TLS.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
|
Zásady clusteringu – výchozí hodnota je OSSCluster. Tuto vlastnost lze aktualizovat pouze v případě, že aktuální hodnota je NoCluster. Pokud je hodnota OSSCluster nebo EnterpriseCluster, nelze ji aktualizovat bez odstranění databáze.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
|
Možnost odložení upgradu při vydání nejnovější verze – výchozí hodnota NotDeferred. Víc se uč: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
|
Zásada vyřazení Redis – výchozí hodnota je VolatileLRU
|
|
properties.geoReplication
|
GeoReplication
|
|
Volitelná sada vlastností pro konfiguraci geografické replikace pro tuto databázi
|
|
properties.modules
|
Module[]
|
|
Volitelná sada modulů Redis pro povolení v této databázi – moduly je možné přidat pouze při vytváření.
|
|
properties.persistence
|
Persistence
|
|
Nastavení trvalosti
Nastavení trvalosti
|
|
properties.port
|
integer
(int32)
|
|
Port TCP koncového bodu databáze. Zadané při vytvoření. Výchozí hodnota je dostupný port.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Aktuální stav zřizování databáze
|
|
properties.redisVersion
|
string
|
|
Verze Redis, na které databáze běží, např. "6.0"
|
|
properties.resourceState
|
ResourceState
|
|
Aktuální stav zdrojů databáze
|
|
type
|
string
|
|
Typ prostředku. Například Microsoft.Compute/virtualMachines nebo Microsoft.Storage/storageAccounts
|
DeferUpgradeSetting
Výčet
Možnost odložení upgradu při vydání nejnovější verze – výchozí hodnota NotDeferred. Víc se uč: https://aka.ms/redisversionupgrade
| Hodnota |
Description |
|
Deferred
|
|
|
NotDeferred
|
|
ErrorAdditionalInfo
Objekt
Další informace o chybě správy prostředků
| Name |
Typ |
Description |
|
info
|
object
|
Další informace.
|
|
type
|
string
|
Další typ informací.
|
ErrorDetail
Objekt
Podrobnosti o chybě.
| Name |
Typ |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Další informace o chybě.
|
|
code
|
string
|
Kód chyby.
|
|
details
|
ErrorDetail[]
|
Podrobnosti o chybě.
|
|
message
|
string
|
Chybová zpráva.
|
|
target
|
string
|
Cíl chyby.
|
ErrorResponse
Objekt
Chybová odpověď
EvictionPolicy
Výčet
Zásada vyřazení Redis – výchozí hodnota je VolatileLRU
| Hodnota |
Description |
|
AllKeysLFU
|
|
|
AllKeysLRU
|
|
|
AllKeysRandom
|
|
|
VolatileLRU
|
|
|
VolatileLFU
|
|
|
VolatileTTL
|
|
|
VolatileRandom
|
|
|
NoEviction
|
|
GeoReplication
Objekt
Volitelná sada vlastností pro konfiguraci geografické replikace pro tuto databázi
| Name |
Typ |
Description |
|
groupNickname
|
string
|
Název skupiny propojených databázových prostředků
|
|
linkedDatabases
|
LinkedDatabase[]
|
Seznam databázových prostředků pro propojení s touto databází
|
LinkedDatabase
Objekt
Propojená databáze
| Name |
Typ |
Description |
|
id
|
string
(arm-id)
|
ID prostředku databáze pro propojení s touto databází
|
|
state
|
LinkState
|
Stav vazby mezi databázovými prostředky.
|
LinkState
Výčet
Stav vazby mezi databázovými prostředky.
| Hodnota |
Description |
|
Linked
|
|
|
Linking
|
|
|
Unlinking
|
|
|
LinkFailed
|
|
|
UnlinkFailed
|
|
Module
Objekt
Nastavení modulu
| Name |
Typ |
Description |
|
args
|
string
|
Možnosti konfigurace pro modul, například "ERROR_RATE 0.01 INITIAL_SIZE 400".
|
|
name
|
string
|
Název modulu, například RedisBloom, RediSearch, RedisTimeSeries
|
|
version
|
string
|
Verze modulu, např. '1.0'.
|
Persistence
Objekt
Nastavení trvalosti
| Name |
Typ |
Description |
|
aofEnabled
|
boolean
|
Nastaví, jestli je povolená funkce AOF. Mějte na paměti, že je možné povolit maximálně jednu z možností trvalosti AOF nebo RDB.
|
|
aofFrequency
|
AofFrequency
|
Nastaví frekvenci zápisu dat na disk. Výchozí hodnota je 1s, což znamená každou sekundu. Mějte na paměti, že nastavení Always je zastaralé kvůli jeho dopadu na výkon.
|
|
rdbEnabled
|
boolean
|
Nastaví, jestli je povolená sada RDB. Mějte na paměti, že je možné povolit maximálně jednu z možností trvalosti AOF nebo RDB.
|
|
rdbFrequency
|
RdbFrequency
|
Nastaví frekvenci vytvoření snímku databáze.
|
Protocol
Výčet
Určuje, jestli se klienti Redis mohou připojit pomocí protokolů REDIS šifrovaných pomocí protokolu TLS nebo prostého textu. Výchozí hodnota je zašifrovaná protokolem TLS.
| Hodnota |
Description |
|
Encrypted
|
|
|
Plaintext
|
|
ProvisioningState
Výčet
Aktuální stav zřizování
| Hodnota |
Description |
|
Succeeded
|
|
|
Failed
|
|
|
Canceled
|
|
|
Creating
|
|
|
Updating
|
|
|
Deleting
|
|
RdbFrequency
Výčet
Nastaví frekvenci vytvoření snímku databáze.
| Hodnota |
Description |
|
1h
|
|
|
6h
|
|
|
12h
|
|
ResourceState
Výčet
Aktuální stav zdroje
| Hodnota |
Description |
|
Running
|
|
|
Creating
|
|
|
CreateFailed
|
|
|
Updating
|
|
|
UpdateFailed
|
|
|
Deleting
|
|
|
DeleteFailed
|
|
|
Enabling
|
|
|
EnableFailed
|
|
|
Disabling
|
|
|
DisableFailed
|
|
|
Disabled
|
|
|
Scaling
|
|
|
ScalingFailed
|
|
|
Moving
|
|