LinkedServerArgs

data class LinkedServerArgs(val linkedRedisCacheId: Output<String>? = null, val linkedRedisCacheLocation: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serverRole: Output<String>? = null, val targetRedisCacheName: Output<String>? = null) : ConvertibleToJava<LinkedServerArgs>

Manages a Redis Linked Server (ie Geo Location)

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.redis.Cache;
import com.pulumi.azure.redis.CacheArgs;
import com.pulumi.azure.redis.inputs.CacheRedisConfigurationArgs;
import com.pulumi.azure.redis.LinkedServer;
import com.pulumi.azure.redis.LinkedServerArgs;
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 example_primary = new ResourceGroup("example-primary", ResourceGroupArgs.builder()
.name("example-resources-primary")
.location("East US")
.build());
var example_primaryCache = new Cache("example-primaryCache", CacheArgs.builder()
.name("example-cache1")
.location(example_primary.location())
.resourceGroupName(example_primary.name())
.capacity(1)
.family("P")
.skuName("Premium")
.enableNonSslPort(false)
.redisConfiguration(CacheRedisConfigurationArgs.builder()
.maxmemoryReserved(2)
.maxmemoryDelta(2)
.maxmemoryPolicy("allkeys-lru")
.build())
.build());
var example_secondary = new ResourceGroup("example-secondary", ResourceGroupArgs.builder()
.name("example-resources-secondary")
.location("West US")
.build());
var example_secondaryCache = new Cache("example-secondaryCache", CacheArgs.builder()
.name("example-cache2")
.location(example_secondary.location())
.resourceGroupName(example_secondary.name())
.capacity(1)
.family("P")
.skuName("Premium")
.enableNonSslPort(false)
.redisConfiguration(CacheRedisConfigurationArgs.builder()
.maxmemoryReserved(2)
.maxmemoryDelta(2)
.maxmemoryPolicy("allkeys-lru")
.build())
.build());
var example_link = new LinkedServer("example-link", LinkedServerArgs.builder()
.targetRedisCacheName(example_primaryCache.name())
.resourceGroupName(example_primaryCache.resourceGroupName())
.linkedRedisCacheId(example_secondaryCache.id())
.linkedRedisCacheLocation(example_secondaryCache.location())
.serverRole("Secondary")
.build());
}
}

Import

Redis can be imported using the resource id, e.g.

$ pulumi import azure:redis/linkedServer:LinkedServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/linkedServers/cache2

Constructors

Link copied to clipboard
fun LinkedServerArgs(linkedRedisCacheId: Output<String>? = null, linkedRedisCacheLocation: Output<String>? = null, resourceGroupName: Output<String>? = null, serverRole: Output<String>? = null, targetRedisCacheName: Output<String>? = null)

Functions

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

Properties

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

The ID of the linked Redis cache. Changing this forces a new Redis to be created.

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

The location of the linked Redis cache. Changing this forces a new Redis to be created.

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

The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created.

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

The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary.

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

The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role)