LinkedServerArgs

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

Response to put/get linked server (with properties) for Redis cache. Uses Azure REST API version 2024-11-01. Other available API versions: 2017-10-01, 2018-03-01, 2019-07-01, 2020-06-01, 2020-12-01, 2021-06-01, 2022-05-01, 2022-06-01, 2023-04-01, 2023-05-01-preview, 2023-08-01, 2024-03-01, 2024-04-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native redis [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

LinkedServer_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var linkedServer = new AzureNative.Redis.LinkedServer("linkedServer", new()
{
LinkedRedisCacheId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
LinkedRedisCacheLocation = "West US",
LinkedServerName = "cache2",
Name = "cache1",
ResourceGroupName = "rg1",
ServerRole = AzureNative.Redis.ReplicationRole.Secondary,
});
});
package main
import (
redis "github.com/pulumi/pulumi-azure-native-sdk/redis/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := redis.NewLinkedServer(ctx, "linkedServer", &redis.LinkedServerArgs{
LinkedRedisCacheId: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2"),
LinkedRedisCacheLocation: pulumi.String("West US"),
LinkedServerName: pulumi.String("cache2"),
Name: pulumi.String("cache1"),
ResourceGroupName: pulumi.String("rg1"),
ServerRole: redis.ReplicationRoleSecondary,
})
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.redis.LinkedServer;
import com.pulumi.azurenative.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 linkedServer = new LinkedServer("linkedServer", LinkedServerArgs.builder()
.linkedRedisCacheId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2")
.linkedRedisCacheLocation("West US")
.linkedServerName("cache2")
.name("cache1")
.resourceGroupName("rg1")
.serverRole("Secondary")
.build());
}
}

Import

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

$ pulumi import azure-native:redis:LinkedServer cache2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}

Constructors

Link copied to clipboard
constructor(linkedRedisCacheId: Output<String>? = null, linkedRedisCacheLocation: Output<String>? = null, linkedServerName: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, serverRole: Output<ReplicationRole>? = null)

Properties

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

Fully qualified resourceId of the linked redis cache.

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

Location of the linked redis cache.

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

The name of the linked server that is being added to the Redis cache.

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

The name of the Redis cache.

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

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

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

Role of the linked server.

Functions

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