Database
Describes a database on the RedisEnterprise cluster API Version: 2021-03-01.
Example Usage
RedisEnterpriseDatabasesCreate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var database = new AzureNative.Cache.Database("database", new()
{
ClientProtocol = "Encrypted",
ClusterName = "cache1",
ClusteringPolicy = "EnterpriseCluster",
DatabaseName = "default",
EvictionPolicy = "AllKeysLRU",
Modules = new[]
{
new AzureNative.Cache.Inputs.ModuleArgs
{
Args = "ERROR_RATE 0.00 INITIAL_SIZE 400",
Name = "RedisBloom",
},
new AzureNative.Cache.Inputs.ModuleArgs
{
Args = "RETENTION_POLICY 20",
Name = "RedisTimeSeries",
},
new AzureNative.Cache.Inputs.ModuleArgs
{
Name = "RediSearch",
},
},
Persistence = new AzureNative.Cache.Inputs.PersistenceArgs
{
AofEnabled = true,
AofFrequency = "1s",
},
Port = 10000,
ResourceGroupName = "rg1",
});
});
Content copied to clipboard
package main
import (
cache "github.com/pulumi/pulumi-azure-native-sdk/cache"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cache.NewDatabase(ctx, "database", &cache.DatabaseArgs{
ClientProtocol: pulumi.String("Encrypted"),
ClusterName: pulumi.String("cache1"),
ClusteringPolicy: pulumi.String("EnterpriseCluster"),
DatabaseName: pulumi.String("default"),
EvictionPolicy: pulumi.String("AllKeysLRU"),
Modules: []cache.ModuleArgs{
{
Args: pulumi.String("ERROR_RATE 0.00 INITIAL_SIZE 400"),
Name: pulumi.String("RedisBloom"),
},
{
Args: pulumi.String("RETENTION_POLICY 20"),
Name: pulumi.String("RedisTimeSeries"),
},
{
Name: pulumi.String("RediSearch"),
},
},
Persistence: &cache.PersistenceArgs{
AofEnabled: pulumi.Bool(true),
AofFrequency: pulumi.String("1s"),
},
Port: pulumi.Int(10000),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cache.Database;
import com.pulumi.azurenative.cache.DatabaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var database = new Database("database", DatabaseArgs.builder()
.clientProtocol("Encrypted")
.clusterName("cache1")
.clusteringPolicy("EnterpriseCluster")
.databaseName("default")
.evictionPolicy("AllKeysLRU")
.modules(
Map.ofEntries(
Map.entry("args", "ERROR_RATE 0.00 INITIAL_SIZE 400"),
Map.entry("name", "RedisBloom")
),
Map.ofEntries(
Map.entry("args", "RETENTION_POLICY 20"),
Map.entry("name", "RedisTimeSeries")
),
Map.of("name", "RediSearch"))
.persistence(Map.ofEntries(
Map.entry("aofEnabled", true),
Map.entry("aofFrequency", "1s")
))
.port(10000)
.resourceGroupName("rg1")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:cache:Database cache1/default /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default
Content copied to clipboard
Properties
Link copied to clipboard
Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
Link copied to clipboard
Clustering policy - default is OSSCluster. Specified at create time.
Link copied to clipboard
Redis eviction policy - default is VolatileLRU
Link copied to clipboard
Optional set of redis modules to enable in this database - modules can only be added at creation time.
Link copied to clipboard
Persistence settings
Link copied to clipboard
Current provisioning status of the database
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Current resource status of the database