RedisArgs

data class RedisArgs(val enableNonSslPort: Output<Boolean>? = null, val location: Output<String>? = null, val minimumTlsVersion: Output<Either<String, TlsVersion>>? = null, val name: Output<String>? = null, val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, val redisConfiguration: Output<RedisCommonPropertiesRedisConfigurationArgs>? = null, val replicasPerMaster: Output<Int>? = null, val resourceGroupName: Output<String>? = null, val shardCount: Output<Int>? = null, val sku: Output<SkuArgs>? = null, val staticIP: Output<String>? = null, val subnetId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val tenantSettings: Output<Map<String, String>>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<RedisArgs>

A single Redis item in List or Get Operation. API Version: 2020-06-01.

Example Usage

RedisCacheCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var redis = new AzureNative.Cache.Redis("redis", new()
{
EnableNonSslPort = true,
Location = "West US",
MinimumTlsVersion = "1.2",
Name = "cache1",
RedisConfiguration = new AzureNative.Cache.Inputs.RedisCommonPropertiesRedisConfigurationArgs
{
MaxmemoryPolicy = "allkeys-lru",
},
ReplicasPerMaster = 2,
ResourceGroupName = "rg1",
ShardCount = 2,
Sku = new AzureNative.Cache.Inputs.SkuArgs
{
Capacity = 1,
Family = "P",
Name = "Premium",
},
StaticIP = "192.168.0.5",
SubnetId = "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1",
Zones = new[]
{
"1",
},
});
});
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.NewRedis(ctx, "redis", &cache.RedisArgs{
EnableNonSslPort: pulumi.Bool(true),
Location: pulumi.String("West US"),
MinimumTlsVersion: pulumi.String("1.2"),
Name: pulumi.String("cache1"),
RedisConfiguration: &cache.RedisCommonPropertiesRedisConfigurationArgs{
MaxmemoryPolicy: pulumi.String("allkeys-lru"),
},
ReplicasPerMaster: pulumi.Int(2),
ResourceGroupName: pulumi.String("rg1"),
ShardCount: pulumi.Int(2),
Sku: &cache.SkuArgs{
Capacity: pulumi.Int(1),
Family: pulumi.String("P"),
Name: pulumi.String("Premium"),
},
StaticIP: pulumi.String("192.168.0.5"),
SubnetId: pulumi.String("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1"),
Zones: pulumi.StringArray{
pulumi.String("1"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cache.Redis;
import com.pulumi.azurenative.cache.RedisArgs;
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 redis = new Redis("redis", RedisArgs.builder()
.enableNonSslPort(true)
.location("West US")
.minimumTlsVersion("1.2")
.name("cache1")
.redisConfiguration(Map.of("maxmemoryPolicy", "allkeys-lru"))
.replicasPerMaster(2)
.resourceGroupName("rg1")
.shardCount(2)
.sku(Map.ofEntries(
Map.entry("capacity", 1),
Map.entry("family", "P"),
Map.entry("name", "Premium")
))
.staticIP("192.168.0.5")
.subnetId("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1")
.zones("1")
.build());
}
}

Import

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

$ pulumi import azure-native:cache:Redis cache1 /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1

Constructors

Link copied to clipboard
constructor(enableNonSslPort: Output<Boolean>? = null, location: Output<String>? = null, minimumTlsVersion: Output<Either<String, TlsVersion>>? = null, name: Output<String>? = null, publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, redisConfiguration: Output<RedisCommonPropertiesRedisConfigurationArgs>? = null, replicasPerMaster: Output<Int>? = null, resourceGroupName: Output<String>? = null, shardCount: Output<Int>? = null, sku: Output<SkuArgs>? = null, staticIP: Output<String>? = null, subnetId: Output<String>? = null, tags: Output<Map<String, String>>? = null, tenantSettings: Output<Map<String, String>>? = null, zones: Output<List<String>>? = null)

Properties

Link copied to clipboard
val enableNonSslPort: Output<Boolean>? = null

Specifies whether the non-ssl Redis server port (6379) is enabled.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard
val minimumTlsVersion: Output<Either<String, TlsVersion>>? = null

Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')

Link copied to clipboard
val name: Output<String>? = null

The name of the Redis cache.

Link copied to clipboard
val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null

Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

Link copied to clipboard

All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.

Link copied to clipboard
val replicasPerMaster: Output<Int>? = null

The number of replicas to be created per master.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val shardCount: Output<Int>? = null

The number of shards to be created on a Premium Cluster Cache.

Link copied to clipboard
val sku: Output<SkuArgs>? = null

The SKU of the Redis cache to deploy.

Link copied to clipboard
val staticIP: Output<String>? = null

Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default.

Link copied to clipboard
val subnetId: Output<String>? = null

The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val tenantSettings: Output<Map<String, String>>? = null

A dictionary of tenant settings

Link copied to clipboard
val zones: Output<List<String>>? = null

A list of availability zones denoting where the resource needs to come from.

Functions

Link copied to clipboard
open override fun toJava(): RedisArgs