Veritabanı oluşturur
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}?api-version=2025-07-01
URI Parametreleri
| Name |
İçinde |
Gerekli |
Tür |
Description |
|
clusterName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Redis Enterprise kümesinin adı. Ad 1-60 karakter uzunluğunda olmalıdır. İzin verilen karakterler (A-Z, a-z, 0-9) ve kısa çizgi(-). Başta, sonda veya ardışık kısa çizgi olamaz
|
|
databaseName
|
path |
True
|
string
pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$
|
Redis Enterprise veritabanının adı.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
Hedef aboneliğin kimliği.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Bu işlem için kullanılacak API sürümü.
|
İstek Gövdesi
| Name |
Tür |
Description |
|
properties.accessKeysAuthentication
|
accessKeysAuthentication
|
Bu özellik, geçerli erişim anahtarlarıyla erişime izin vermek veya erişimi reddetmek için Etkin/Devre Dışı olabilir. Veritabanı oluşturulduktan sonra bile güncelleştirilebilir. Varsayılan devre dışıdır.
|
|
properties.clientProtocol
|
Protocol
|
Redis istemcilerinin TLS-encrypted veya düz metin redis protokollerini kullanarak bağlanıp bağlanamayacağını belirtir. Varsayılan olarak TLS ile şifrelenmiştir.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
Kümeleme ilkesi - varsayılan değer OSSCluster'dır. Bu özellik yalnızca geçerli değer NoCluster olduğunda güncelleştirilebilir. Değer OSSCluster veya EnterpriseCluster ise, veritabanı silinmeden güncelleştirilemez.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
En yeni sürüm yayınlandığında yükseltmeyi erteleme seçeneği - varsayılan değer NotDeferred'dir. Daha fazla bilgi edinin: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
Redis çıkarma ilkesi - varsayılan değer VolatileLRU'dur
|
|
properties.geoReplication
|
GeoReplication
|
Bu veritabanı için coğrafi çoğaltmayı yapılandırmak için isteğe bağlı özellik kümesi.
|
|
properties.modules
|
Module[]
|
Bu veritabanında etkinleştirmek için isteğe bağlı redis modülleri kümesi - modüller yalnızca oluşturma zamanında eklenebilir.
|
|
properties.persistence
|
Persistence
|
Kalıcılık ayarları
Kalıcılık ayarları
|
|
properties.port
|
integer
(int32)
|
Veritabanı uç noktasının TCP bağlantı noktası. Oluşturma zamanında belirtilir. Varsayılan olarak kullanılabilir bir bağlantı noktasıdır.
|
Yanıtlar
| Name |
Tür |
Description |
|
200 OK
|
Database
|
Veritabanı güncelleniyordu/güncelleniyor. Ayrıntılı durum için provisioningState ve resourceState'i denetleyin.
|
|
201 Created
|
Database
|
Veritabanı oluşturuldu/oluşturuluyor. Ayrıntılı durum için provisioningState ve resourceState'i denetleyin.
|
|
Other Status Codes
|
ErrorResponse
|
İşlemin neden başarısız olduğunu açıklayan hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 Akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name |
Description |
|
user_impersonation
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
RedisEnterpriseDatabasesCreate
Örnek isteği
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
Örnek yanıt
{
"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
Örnek isteği
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
Örnek yanıt
{
"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
Örnek isteği
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
Örnek yanıt
{
"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"
}
}
Tanımlar
| Name |
Description |
|
accessKeysAuthentication
|
Bu özellik, geçerli erişim anahtarlarıyla erişime izin vermek veya erişimi reddetmek için Etkin/Devre Dışı olabilir. Veritabanı oluşturulduktan sonra bile güncelleştirilebilir. Varsayılan devre dışıdır.
|
|
AofFrequency
|
Verilerin diske yazıldığı sıklığı ayarlar. Varsayılan olarak 'her saniye' anlamına gelen '1s'. Performans etkisi nedeniyle 'always' ayarının kullanım dışı bırakıldığını unutmayın.
|
|
ClusteringPolicy
|
Kümeleme ilkesi - varsayılan değer OSSCluster'dır. Bu özellik yalnızca geçerli değer NoCluster olduğunda güncelleştirilebilir. Değer OSSCluster veya EnterpriseCluster ise, veritabanı silinmeden güncelleştirilemez.
|
|
Database
|
Redis Enterprise kümesindeki bir veritabanını açıklar
|
|
DeferUpgradeSetting
|
En yeni sürüm yayınlandığında yükseltmeyi erteleme seçeneği - varsayılan değer NotDeferred'dir. Daha fazla bilgi edinin: https://aka.ms/redisversionupgrade
|
|
ErrorAdditionalInfo
|
Kaynak yönetimi hatası ek bilgileri.
|
|
ErrorDetail
|
Hata ayrıntısı.
|
|
ErrorResponse
|
Hata yanıtı
|
|
EvictionPolicy
|
Redis çıkarma ilkesi - varsayılan değer VolatileLRU'dur
|
|
GeoReplication
|
Bu veritabanı için coğrafi çoğaltmayı yapılandırmak için isteğe bağlı özellik kümesi.
|
|
LinkedDatabase
|
Bağlantılı Veritabanı
|
|
LinkState
|
Veritabanı kaynakları arasındaki bağlantının durumu.
|
|
Module
|
Modül ayarları
|
|
Persistence
|
Kalıcılık ayarları
|
|
Protocol
|
Redis istemcilerinin TLS-encrypted veya düz metin redis protokollerini kullanarak bağlanıp bağlanamayacağını belirtir. Varsayılan olarak TLS ile şifrelenmiştir.
|
|
ProvisioningState
|
Geçerli sağlama durumu
|
|
RdbFrequency
|
Veritabanının anlık görüntüsünün oluşturulma sıklığını ayarlar.
|
|
ResourceState
|
Geçerli kaynak durumu
|
accessKeysAuthentication
Numaralandırma
Bu özellik, geçerli erişim anahtarlarıyla erişime izin vermek veya erişimi reddetmek için Etkin/Devre Dışı olabilir. Veritabanı oluşturulduktan sonra bile güncelleştirilebilir. Varsayılan devre dışıdır.
| Değer |
Description |
|
Disabled
|
|
|
Enabled
|
|
AofFrequency
Numaralandırma
Verilerin diske yazıldığı sıklığı ayarlar. Varsayılan olarak 'her saniye' anlamına gelen '1s'. Performans etkisi nedeniyle 'always' ayarının kullanım dışı bırakıldığını unutmayın.
| Değer |
Description |
|
1s
|
|
|
always
|
|
ClusteringPolicy
Numaralandırma
Kümeleme ilkesi - varsayılan değer OSSCluster'dır. Bu özellik yalnızca geçerli değer NoCluster olduğunda güncelleştirilebilir. Değer OSSCluster veya EnterpriseCluster ise, veritabanı silinmeden güncelleştirilemez.
| Değer |
Description |
|
EnterpriseCluster
|
Kurumsal kümeleme ilkesi yalnızca redis kümesi komutlarını desteklemeyen klasik redis protokolünü kullanır.
|
|
OSSCluster
|
OSS kümeleme ilkesi redis küme belirtimini izler ve tüm istemcilerin redis kümelemesini desteklemesini gerektirir.
|
|
NoCluster
|
NoCluster ilkesi, kümeleme özellikleri gerektirmeyen kümelenmemiş Redis örnekleri için kullanılır.
|
Database
Nesne
Redis Enterprise kümesindeki bir veritabanını açıklar
| Name |
Tür |
Default value |
Description |
|
id
|
string
|
|
Kaynağın tam kaynak kimliği. Örn - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
name
|
string
|
|
Kaynağın adı
|
|
properties.accessKeysAuthentication
|
accessKeysAuthentication
|
Disabled
|
Bu özellik, geçerli erişim anahtarlarıyla erişime izin vermek veya erişimi reddetmek için Etkin/Devre Dışı olabilir. Veritabanı oluşturulduktan sonra bile güncelleştirilebilir. Varsayılan devre dışıdır.
|
|
properties.clientProtocol
|
Protocol
|
|
Redis istemcilerinin TLS-encrypted veya düz metin redis protokollerini kullanarak bağlanıp bağlanamayacağını belirtir. Varsayılan olarak TLS ile şifrelenmiştir.
|
|
properties.clusteringPolicy
|
ClusteringPolicy
|
|
Kümeleme ilkesi - varsayılan değer OSSCluster'dır. Bu özellik yalnızca geçerli değer NoCluster olduğunda güncelleştirilebilir. Değer OSSCluster veya EnterpriseCluster ise, veritabanı silinmeden güncelleştirilemez.
|
|
properties.deferUpgrade
|
DeferUpgradeSetting
|
|
En yeni sürüm yayınlandığında yükseltmeyi erteleme seçeneği - varsayılan değer NotDeferred'dir. Daha fazla bilgi edinin: https://aka.ms/redisversionupgrade
|
|
properties.evictionPolicy
|
EvictionPolicy
|
|
Redis çıkarma ilkesi - varsayılan değer VolatileLRU'dur
|
|
properties.geoReplication
|
GeoReplication
|
|
Bu veritabanı için coğrafi çoğaltmayı yapılandırmak için isteğe bağlı özellik kümesi.
|
|
properties.modules
|
Module[]
|
|
Bu veritabanında etkinleştirmek için isteğe bağlı redis modülleri kümesi - modüller yalnızca oluşturma zamanında eklenebilir.
|
|
properties.persistence
|
Persistence
|
|
Kalıcılık ayarları
Kalıcılık ayarları
|
|
properties.port
|
integer
(int32)
|
|
Veritabanı uç noktasının TCP bağlantı noktası. Oluşturma zamanında belirtilir. Varsayılan olarak kullanılabilir bir bağlantı noktasıdır.
|
|
properties.provisioningState
|
ProvisioningState
|
|
Veritabanının geçerli sağlama durumu
|
|
properties.redisVersion
|
string
|
|
Veritabanının üzerinde çalıştığı Redis sürümü, örneğin '6.0'
|
|
properties.resourceState
|
ResourceState
|
|
Veritabanının geçerli kaynak durumu
|
|
type
|
string
|
|
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"
|
DeferUpgradeSetting
Numaralandırma
En yeni sürüm yayınlandığında yükseltmeyi erteleme seçeneği - varsayılan değer NotDeferred'dir. Daha fazla bilgi edinin: https://aka.ms/redisversionupgrade
| Değer |
Description |
|
Deferred
|
|
|
NotDeferred
|
|
ErrorAdditionalInfo
Nesne
Kaynak yönetimi hatası ek bilgileri.
| Name |
Tür |
Description |
|
info
|
object
|
Ek bilgiler.
|
|
type
|
string
|
Ek bilgi türü.
|
ErrorDetail
Nesne
Hata ayrıntısı.
| Name |
Tür |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgileri.
|
|
code
|
string
|
Hata kodu.
|
|
details
|
ErrorDetail[]
|
Hata ayrıntıları.
|
|
message
|
string
|
Hata iletisi.
|
|
target
|
string
|
Hata hedefi.
|
ErrorResponse
Nesne
Hata yanıtı
EvictionPolicy
Numaralandırma
Redis çıkarma ilkesi - varsayılan değer VolatileLRU'dur
| Değer |
Description |
|
AllKeysLFU
|
|
|
AllKeysLRU
|
|
|
AllKeysRandom
|
|
|
VolatileLRU
|
|
|
VolatileLFU
|
|
|
VolatileTTL
|
|
|
VolatileRandom
|
|
|
NoEviction
|
|
GeoReplication
Nesne
Bu veritabanı için coğrafi çoğaltmayı yapılandırmak için isteğe bağlı özellik kümesi.
| Name |
Tür |
Description |
|
groupNickname
|
string
|
Bağlı veritabanı kaynakları grubunun adı
|
|
linkedDatabases
|
LinkedDatabase[]
|
Bu veritabanına bağlanacak veritabanı kaynaklarının listesi
|
LinkedDatabase
Nesne
Bağlantılı Veritabanı
| Name |
Tür |
Description |
|
id
|
string
(arm-id)
|
Bu veritabanına bağlanacak veritabanı kaynağının kaynak kimliği.
|
|
state
|
LinkState
|
Veritabanı kaynakları arasındaki bağlantının durumu.
|
LinkState
Numaralandırma
Veritabanı kaynakları arasındaki bağlantının durumu.
| Değer |
Description |
|
Linked
|
|
|
Linking
|
|
|
Unlinking
|
|
|
LinkFailed
|
|
|
UnlinkFailed
|
|
Module
Nesne
Modül ayarları
| Name |
Tür |
Description |
|
args
|
string
|
Modül için yapılandırma seçenekleri, örneğin 'ERROR_RATE 0,01 INITIAL_SIZE 400'.
|
|
name
|
string
|
Modülün adı, örneğin 'RedisBloom', 'RediSearch', 'RedisTimeSeries'
|
|
version
|
string
|
Modülün sürümü, örneğin '1.0'.
|
Persistence
Nesne
Kalıcılık ayarları
| Name |
Tür |
Description |
|
aofEnabled
|
boolean
|
AOF'nin etkinleştirilip etkinleştirilmediğini ayarlar. AOF veya RDB kalıcılığının en fazla birinin etkinleştirilebileceğini unutmayın.
|
|
aofFrequency
|
AofFrequency
|
Verilerin diske yazıldığı sıklığı ayarlar. Varsayılan olarak 'her saniye' anlamına gelen '1s'. Performans etkisi nedeniyle 'always' ayarının kullanım dışı bırakıldığını unutmayın.
|
|
rdbEnabled
|
boolean
|
RDB'nin etkinleştirilip etkinleştirilmediğini ayarlar. AOF veya RDB kalıcılığının en fazla birinin etkinleştirilebileceğini unutmayın.
|
|
rdbFrequency
|
RdbFrequency
|
Veritabanının anlık görüntüsünün oluşturulma sıklığını ayarlar.
|
Protocol
Numaralandırma
Redis istemcilerinin TLS-encrypted veya düz metin redis protokollerini kullanarak bağlanıp bağlanamayacağını belirtir. Varsayılan olarak TLS ile şifrelenmiştir.
| Değer |
Description |
|
Encrypted
|
|
|
Plaintext
|
|
ProvisioningState
Numaralandırma
Geçerli sağlama durumu
| Değer |
Description |
|
Succeeded
|
|
|
Failed
|
|
|
Canceled
|
|
|
Creating
|
|
|
Updating
|
|
|
Deleting
|
|
RdbFrequency
Numaralandırma
Veritabanının anlık görüntüsünün oluşturulma sıklığını ayarlar.
| Değer |
Description |
|
1h
|
|
|
6h
|
|
|
12h
|
|
ResourceState
Numaralandırma
Geçerli kaynak durumu
| Değer |
Description |
|
Running
|
|
|
Creating
|
|
|
CreateFailed
|
|
|
Updating
|
|
|
UpdateFailed
|
|
|
Deleting
|
|
|
DeleteFailed
|
|
|
Enabling
|
|
|
EnableFailed
|
|
|
Disabling
|
|
|
DisableFailed
|
|
|
Disabled
|
|
|
Scaling
|
|
|
ScalingFailed
|
|
|
Moving
|
|