Azure Native

v1.87.0 published on Tuesday, Nov 22, 2022 by Pulumi

Database

Describes a database on the RedisEnterprise cluster API Version: 2021-03-01.

Example Usage

RedisEnterpriseDatabasesCreate

using System.Collections.Generic;
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",
    });

});

Coming soon!

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());

    }
}
import pulumi
import pulumi_azure_native as azure_native

database = azure_native.cache.Database("database",
    client_protocol="Encrypted",
    cluster_name="cache1",
    clustering_policy="EnterpriseCluster",
    database_name="default",
    eviction_policy="AllKeysLRU",
    modules=[
        {
            "args": "ERROR_RATE 0.00 INITIAL_SIZE 400",
            "name": "RedisBloom",
        },
        {
            "args": "RETENTION_POLICY 20",
            "name": "RedisTimeSeries",
        },
        {
            "name": "RediSearch",
        },
    ],
    persistence=azure_native.cache.PersistenceArgs(
        aof_enabled=True,
        aof_frequency="1s",
    ),
    port=10000,
    resource_group_name="rg1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const database = new azure_native.cache.Database("database", {
    clientProtocol: "Encrypted",
    clusterName: "cache1",
    clusteringPolicy: "EnterpriseCluster",
    databaseName: "default",
    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,
    resourceGroupName: "rg1",
});
resources:
  database:
    type: azure-native:cache:Database
    properties:
      clientProtocol: Encrypted
      clusterName: cache1
      clusteringPolicy: EnterpriseCluster
      databaseName: default
      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
      resourceGroupName: rg1

Create Database Resource

new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             client_protocol: Optional[Union[str, Protocol]] = None,
             cluster_name: Optional[str] = None,
             clustering_policy: Optional[Union[str, ClusteringPolicy]] = None,
             database_name: Optional[str] = None,
             eviction_policy: Optional[Union[str, EvictionPolicy]] = None,
             modules: Optional[Sequence[ModuleArgs]] = None,
             persistence: Optional[PersistenceArgs] = None,
             port: Optional[int] = None,
             resource_group_name: Optional[str] = None)
@overload
def Database(resource_name: str,
             args: DatabaseArgs,
             opts: Optional[ResourceOptions] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: azure-native:cache:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Database Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Database resource accepts the following input properties:

ClusterName string

The name of the RedisEnterprise cluster.

ResourceGroupName string

The name of the resource group. The name is case insensitive.

ClientProtocol string | Pulumi.AzureNative.Cache.Protocol

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.

ClusteringPolicy string | Pulumi.AzureNative.Cache.ClusteringPolicy

Clustering policy - default is OSSCluster. Specified at create time.

DatabaseName string

The name of the database.

EvictionPolicy string | Pulumi.AzureNative.Cache.EvictionPolicy

Redis eviction policy - default is VolatileLRU

Modules List<Pulumi.AzureNative.Cache.Inputs.ModuleArgs>

Optional set of redis modules to enable in this database - modules can only be added at creation time.

Persistence Pulumi.AzureNative.Cache.Inputs.PersistenceArgs

Persistence settings

Port int

TCP port of the database endpoint. Specified at create time. Defaults to an available port.

ClusterName string

The name of the RedisEnterprise cluster.

ResourceGroupName string

The name of the resource group. The name is case insensitive.

ClientProtocol string | Protocol

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.

ClusteringPolicy string | ClusteringPolicy

Clustering policy - default is OSSCluster. Specified at create time.

DatabaseName string

The name of the database.

EvictionPolicy string | EvictionPolicy

Redis eviction policy - default is VolatileLRU

Modules []ModuleArgs

Optional set of redis modules to enable in this database - modules can only be added at creation time.

Persistence PersistenceArgs

Persistence settings

Port int

TCP port of the database endpoint. Specified at create time. Defaults to an available port.

clusterName String

The name of the RedisEnterprise cluster.

resourceGroupName String

The name of the resource group. The name is case insensitive.

clientProtocol String | Protocol

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.

clusteringPolicy String | ClusteringPolicy

Clustering policy - default is OSSCluster. Specified at create time.

databaseName String

The name of the database.

evictionPolicy String | EvictionPolicy

Redis eviction policy - default is VolatileLRU

modules List<ModuleArgs>

Optional set of redis modules to enable in this database - modules can only be added at creation time.

persistence PersistenceArgs

Persistence settings

port Integer

TCP port of the database endpoint. Specified at create time. Defaults to an available port.

clusterName string

The name of the RedisEnterprise cluster.

resourceGroupName string

The name of the resource group. The name is case insensitive.

clientProtocol string | Protocol

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.

clusteringPolicy string | ClusteringPolicy

Clustering policy - default is OSSCluster. Specified at create time.

databaseName string

The name of the database.

evictionPolicy string | EvictionPolicy

Redis eviction policy - default is VolatileLRU

modules ModuleArgs[]

Optional set of redis modules to enable in this database - modules can only be added at creation time.

persistence PersistenceArgs

Persistence settings

port number

TCP port of the database endpoint. Specified at create time. Defaults to an available port.

cluster_name str

The name of the RedisEnterprise cluster.

resource_group_name str

The name of the resource group. The name is case insensitive.

client_protocol str | Protocol

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.

clustering_policy str | ClusteringPolicy

Clustering policy - default is OSSCluster. Specified at create time.

database_name str

The name of the database.

eviction_policy str | EvictionPolicy

Redis eviction policy - default is VolatileLRU

modules Sequence[ModuleArgs]

Optional set of redis modules to enable in this database - modules can only be added at creation time.

persistence PersistenceArgs

Persistence settings

port int

TCP port of the database endpoint. Specified at create time. Defaults to an available port.

clusterName String

The name of the RedisEnterprise cluster.

resourceGroupName String

The name of the resource group. The name is case insensitive.

clientProtocol String | "Encrypted" | "Plaintext"

Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.

clusteringPolicy String | "EnterpriseCluster" | "OSSCluster"

Clustering policy - default is OSSCluster. Specified at create time.

databaseName String

The name of the database.

evictionPolicy String | "AllKeysLFU" | "AllKeysLRU" | "AllKeysRandom" | "VolatileLRU" | "VolatileLFU" | "VolatileTTL" | "VolatileRandom" | "NoEviction"

Redis eviction policy - default is VolatileLRU

modules List<Property Map>

Optional set of redis modules to enable in this database - modules can only be added at creation time.

persistence Property Map

Persistence settings

port Number

TCP port of the database endpoint. Specified at create time. Defaults to an available port.

Outputs

All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource

ProvisioningState string

Current provisioning status of the database

ResourceState string

Current resource status of the database

Type string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource

ProvisioningState string

Current provisioning status of the database

ResourceState string

Current resource status of the database

Type string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource

provisioningState String

Current provisioning status of the database

resourceState String

Current resource status of the database

type String

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the resource

provisioningState string

Current provisioning status of the database

resourceState string

Current resource status of the database

type string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the resource

provisioning_state str

Current provisioning status of the database

resource_state str

Current resource status of the database

type str

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource

provisioningState String

Current provisioning status of the database

resourceState String

Current resource status of the database

type String

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

AofFrequency

AofFrequency_1s
1s
Always
always
AofFrequency_1s
1s
AofFrequencyAlways
always
_1s
1s
Always
always
AofFrequency_1s
1s
Always
always
AOF_FREQUENCY_1S
1s
ALWAYS
always
"1s"
1s
"always"
always

ClusteringPolicy

EnterpriseCluster
EnterpriseCluster
OSSCluster
OSSCluster
ClusteringPolicyEnterpriseCluster
EnterpriseCluster
ClusteringPolicyOSSCluster
OSSCluster
EnterpriseCluster
EnterpriseCluster
OSSCluster
OSSCluster
EnterpriseCluster
EnterpriseCluster
OSSCluster
OSSCluster
ENTERPRISE_CLUSTER
EnterpriseCluster
OSS_CLUSTER
OSSCluster
"EnterpriseCluster"
EnterpriseCluster
"OSSCluster"
OSSCluster

EvictionPolicy

AllKeysLFU
AllKeysLFU
AllKeysLRU
AllKeysLRU
AllKeysRandom
AllKeysRandom
VolatileLRU
VolatileLRU
VolatileLFU
VolatileLFU
VolatileTTL
VolatileTTL
VolatileRandom
VolatileRandom
NoEviction
NoEviction
EvictionPolicyAllKeysLFU
AllKeysLFU
EvictionPolicyAllKeysLRU
AllKeysLRU
EvictionPolicyAllKeysRandom
AllKeysRandom
EvictionPolicyVolatileLRU
VolatileLRU
EvictionPolicyVolatileLFU
VolatileLFU
EvictionPolicyVolatileTTL
VolatileTTL
EvictionPolicyVolatileRandom
VolatileRandom
EvictionPolicyNoEviction
NoEviction
AllKeysLFU
AllKeysLFU
AllKeysLRU
AllKeysLRU
AllKeysRandom
AllKeysRandom
VolatileLRU
VolatileLRU
VolatileLFU
VolatileLFU
VolatileTTL
VolatileTTL
VolatileRandom
VolatileRandom
NoEviction
NoEviction
AllKeysLFU
AllKeysLFU
AllKeysLRU
AllKeysLRU
AllKeysRandom
AllKeysRandom
VolatileLRU
VolatileLRU
VolatileLFU
VolatileLFU
VolatileTTL
VolatileTTL
VolatileRandom
VolatileRandom
NoEviction
NoEviction
ALL_KEYS_LFU
AllKeysLFU
ALL_KEYS_LRU
AllKeysLRU
ALL_KEYS_RANDOM
AllKeysRandom
VOLATILE_LRU
VolatileLRU
VOLATILE_LFU
VolatileLFU
VOLATILE_TTL
VolatileTTL
VOLATILE_RANDOM
VolatileRandom
NO_EVICTION
NoEviction
"AllKeysLFU"
AllKeysLFU
"AllKeysLRU"
AllKeysLRU
"AllKeysRandom"
AllKeysRandom
"VolatileLRU"
VolatileLRU
"VolatileLFU"
VolatileLFU
"VolatileTTL"
VolatileTTL
"VolatileRandom"
VolatileRandom
"NoEviction"
NoEviction

Module

Name string

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

Args string

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

Name string

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

Args string

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name String

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

args String

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name string

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

args string

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name str

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

args str

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name String

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

args String

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

ModuleResponse

Name string

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

Version string

The version of the module, e.g. '1.0'.

Args string

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

Name string

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

Version string

The version of the module, e.g. '1.0'.

Args string

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name String

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

version String

The version of the module, e.g. '1.0'.

args String

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name string

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

version string

The version of the module, e.g. '1.0'.

args string

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name str

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

version str

The version of the module, e.g. '1.0'.

args str

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

name String

The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries'

version String

The version of the module, e.g. '1.0'.

args String

Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'.

Persistence

AofEnabled bool

Sets whether AOF is enabled.

AofFrequency string | Pulumi.AzureNative.Cache.AofFrequency

Sets the frequency at which data is written to disk.

RdbEnabled bool

Sets whether RDB is enabled.

RdbFrequency string | Pulumi.AzureNative.Cache.RdbFrequency

Sets the frequency at which a snapshot of the database is created.

AofEnabled bool

Sets whether AOF is enabled.

AofFrequency string | AofFrequency

Sets the frequency at which data is written to disk.

RdbEnabled bool

Sets whether RDB is enabled.

RdbFrequency string | RdbFrequency

Sets the frequency at which a snapshot of the database is created.

aofEnabled Boolean

Sets whether AOF is enabled.

aofFrequency String | AofFrequency

Sets the frequency at which data is written to disk.

rdbEnabled Boolean

Sets whether RDB is enabled.

rdbFrequency String | RdbFrequency

Sets the frequency at which a snapshot of the database is created.

aofEnabled boolean

Sets whether AOF is enabled.

aofFrequency string | AofFrequency

Sets the frequency at which data is written to disk.

rdbEnabled boolean

Sets whether RDB is enabled.

rdbFrequency string | RdbFrequency

Sets the frequency at which a snapshot of the database is created.

aof_enabled bool

Sets whether AOF is enabled.

aof_frequency str | AofFrequency

Sets the frequency at which data is written to disk.

rdb_enabled bool

Sets whether RDB is enabled.

rdb_frequency str | RdbFrequency

Sets the frequency at which a snapshot of the database is created.

aofEnabled Boolean

Sets whether AOF is enabled.

aofFrequency String | "1s" | "always"

Sets the frequency at which data is written to disk.

rdbEnabled Boolean

Sets whether RDB is enabled.

rdbFrequency String | "1h" | "6h" | "12h"

Sets the frequency at which a snapshot of the database is created.

PersistenceResponse

AofEnabled bool

Sets whether AOF is enabled.

AofFrequency string

Sets the frequency at which data is written to disk.

RdbEnabled bool

Sets whether RDB is enabled.

RdbFrequency string

Sets the frequency at which a snapshot of the database is created.

AofEnabled bool

Sets whether AOF is enabled.

AofFrequency string

Sets the frequency at which data is written to disk.

RdbEnabled bool

Sets whether RDB is enabled.

RdbFrequency string

Sets the frequency at which a snapshot of the database is created.

aofEnabled Boolean

Sets whether AOF is enabled.

aofFrequency String

Sets the frequency at which data is written to disk.

rdbEnabled Boolean

Sets whether RDB is enabled.

rdbFrequency String

Sets the frequency at which a snapshot of the database is created.

aofEnabled boolean

Sets whether AOF is enabled.

aofFrequency string

Sets the frequency at which data is written to disk.

rdbEnabled boolean

Sets whether RDB is enabled.

rdbFrequency string

Sets the frequency at which a snapshot of the database is created.

aof_enabled bool

Sets whether AOF is enabled.

aof_frequency str

Sets the frequency at which data is written to disk.

rdb_enabled bool

Sets whether RDB is enabled.

rdb_frequency str

Sets the frequency at which a snapshot of the database is created.

aofEnabled Boolean

Sets whether AOF is enabled.

aofFrequency String

Sets the frequency at which data is written to disk.

rdbEnabled Boolean

Sets whether RDB is enabled.

rdbFrequency String

Sets the frequency at which a snapshot of the database is created.

Protocol

Encrypted
Encrypted
Plaintext
Plaintext
ProtocolEncrypted
Encrypted
ProtocolPlaintext
Plaintext
Encrypted
Encrypted
Plaintext
Plaintext
Encrypted
Encrypted
Plaintext
Plaintext
ENCRYPTED
Encrypted
PLAINTEXT
Plaintext
"Encrypted"
Encrypted
"Plaintext"
Plaintext

RdbFrequency

RdbFrequency_1h
1h
RdbFrequency_6h
6h
RdbFrequency_12h
12h
RdbFrequency_1h
1h
RdbFrequency_6h
6h
RdbFrequency_12h
12h
_1h
1h
_6h
6h
_12h
12h
RdbFrequency_1h
1h
RdbFrequency_6h
6h
RdbFrequency_12h
12h
RDB_FREQUENCY_1H
1h
RDB_FREQUENCY_6H
6h
RDB_FREQUENCY_12H
12h
"1h"
1h
"6h"
6h
"12h"
12h

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cache:Database cache1/db1 /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/db1 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0