Linked Server Args
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 2023-04-01. In version 1.x of the Azure Native provider, it used API version 2020-06-01. Other available API versions: 2023-05-01-preview, 2023-08-01, 2024-03-01, 2024-04-01-preview, 2024-11-01.
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.Cache.LinkedServer("linkedServer", new()
{
LinkedRedisCacheId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
LinkedRedisCacheLocation = "West US",
LinkedServerName = "cache2",
Name = "cache1",
ResourceGroupName = "rg1",
ServerRole = AzureNative.Cache.ReplicationRole.Secondary,
});
});
Content copied to clipboard
package main
import (
cache "github.com/pulumi/pulumi-azure-native-sdk/cache/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cache.NewLinkedServer(ctx, "linkedServer", &cache.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: cache.ReplicationRoleSecondary,
})
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.LinkedServer;
import com.pulumi.azurenative.cache.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());
}
}
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:LinkedServer cache2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}
Content copied to clipboard
Properties
Link copied to clipboard
Fully qualified resourceId of the linked redis cache.
Link copied to clipboard
Location of the linked redis cache.
Link copied to clipboard
The name of the linked server that is being added to the Redis cache.
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
Role of the linked server.