1. Packages
  2. Azure Native
  3. API Docs
  4. redis
  5. RedisLinkedServer
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi

azure-native.redis.RedisLinkedServer

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi

    Response to put/get linked server (with properties) for Redis cache.

    Uses Azure REST API version 2017-02-01.

    Example Usage

    RedisLinkedServer_Create

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var redisLinkedServer = new AzureNative.Redis.RedisLinkedServer("redisLinkedServer", 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.NewRedisLinkedServer(ctx, "redisLinkedServer", &redis.RedisLinkedServerArgs{
    			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.RedisLinkedServer;
    import com.pulumi.azurenative.redis.RedisLinkedServerArgs;
    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 redisLinkedServer = new RedisLinkedServer("redisLinkedServer", RedisLinkedServerArgs.builder()
                .linkedRedisCacheId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2")
                .linkedRedisCacheLocation("West US")
                .linkedServerName("cache2")
                .name("cache1")
                .resourceGroupName("rg1")
                .serverRole("Secondary")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const redisLinkedServer = new azure_native.redis.RedisLinkedServer("redisLinkedServer", {
        linkedRedisCacheId: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
        linkedRedisCacheLocation: "West US",
        linkedServerName: "cache2",
        name: "cache1",
        resourceGroupName: "rg1",
        serverRole: azure_native.redis.ReplicationRole.Secondary,
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    redis_linked_server = azure_native.redis.RedisLinkedServer("redisLinkedServer",
        linked_redis_cache_id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
        linked_redis_cache_location="West US",
        linked_server_name="cache2",
        name="cache1",
        resource_group_name="rg1",
        server_role=azure_native.redis.ReplicationRole.SECONDARY)
    
    resources:
      redisLinkedServer:
        type: azure-native:redis:RedisLinkedServer
        properties:
          linkedRedisCacheId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2
          linkedRedisCacheLocation: West US
          linkedServerName: cache2
          name: cache1
          resourceGroupName: rg1
          serverRole: Secondary
    

    Create RedisLinkedServer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RedisLinkedServer(name: string, args: RedisLinkedServerArgs, opts?: CustomResourceOptions);
    @overload
    def RedisLinkedServer(resource_name: str,
                          args: RedisLinkedServerArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def RedisLinkedServer(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          linked_redis_cache_id: Optional[str] = None,
                          linked_redis_cache_location: Optional[str] = None,
                          name: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          server_role: Optional[ReplicationRole] = None,
                          linked_server_name: Optional[str] = None)
    func NewRedisLinkedServer(ctx *Context, name string, args RedisLinkedServerArgs, opts ...ResourceOption) (*RedisLinkedServer, error)
    public RedisLinkedServer(string name, RedisLinkedServerArgs args, CustomResourceOptions? opts = null)
    public RedisLinkedServer(String name, RedisLinkedServerArgs args)
    public RedisLinkedServer(String name, RedisLinkedServerArgs args, CustomResourceOptions options)
    
    type: azure-native:redis:RedisLinkedServer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RedisLinkedServerArgs
    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 RedisLinkedServerArgs
    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 RedisLinkedServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RedisLinkedServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RedisLinkedServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var redisLinkedServerResource = new AzureNative.Redis.RedisLinkedServer("redisLinkedServerResource", new()
    {
        LinkedRedisCacheId = "string",
        LinkedRedisCacheLocation = "string",
        Name = "string",
        ResourceGroupName = "string",
        ServerRole = AzureNative.Redis.ReplicationRole.Primary,
        LinkedServerName = "string",
    });
    
    example, err := redis.NewRedisLinkedServer(ctx, "redisLinkedServerResource", &redis.RedisLinkedServerArgs{
    	LinkedRedisCacheId:       pulumi.String("string"),
    	LinkedRedisCacheLocation: pulumi.String("string"),
    	Name:                     pulumi.String("string"),
    	ResourceGroupName:        pulumi.String("string"),
    	ServerRole:               redis.ReplicationRolePrimary,
    	LinkedServerName:         pulumi.String("string"),
    })
    
    var redisLinkedServerResource = new RedisLinkedServer("redisLinkedServerResource", RedisLinkedServerArgs.builder()
        .linkedRedisCacheId("string")
        .linkedRedisCacheLocation("string")
        .name("string")
        .resourceGroupName("string")
        .serverRole("Primary")
        .linkedServerName("string")
        .build());
    
    redis_linked_server_resource = azure_native.redis.RedisLinkedServer("redisLinkedServerResource",
        linked_redis_cache_id="string",
        linked_redis_cache_location="string",
        name="string",
        resource_group_name="string",
        server_role=azure_native.redis.ReplicationRole.PRIMARY,
        linked_server_name="string")
    
    const redisLinkedServerResource = new azure_native.redis.RedisLinkedServer("redisLinkedServerResource", {
        linkedRedisCacheId: "string",
        linkedRedisCacheLocation: "string",
        name: "string",
        resourceGroupName: "string",
        serverRole: azure_native.redis.ReplicationRole.Primary,
        linkedServerName: "string",
    });
    
    type: azure-native:redis:RedisLinkedServer
    properties:
        linkedRedisCacheId: string
        linkedRedisCacheLocation: string
        linkedServerName: string
        name: string
        resourceGroupName: string
        serverRole: Primary
    

    RedisLinkedServer Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RedisLinkedServer resource accepts the following input properties:

    LinkedRedisCacheId string
    Fully qualified resourceId of the linked redis cache.
    LinkedRedisCacheLocation string
    Location of the linked redis cache.
    Name string
    The name of the Redis cache.
    ResourceGroupName string
    The name of the resource group.
    ServerRole Pulumi.AzureNative.Redis.ReplicationRole
    Role of the linked server.
    LinkedServerName string
    The name of the linked server that is being added to the Redis cache.
    LinkedRedisCacheId string
    Fully qualified resourceId of the linked redis cache.
    LinkedRedisCacheLocation string
    Location of the linked redis cache.
    Name string
    The name of the Redis cache.
    ResourceGroupName string
    The name of the resource group.
    ServerRole ReplicationRole
    Role of the linked server.
    LinkedServerName string
    The name of the linked server that is being added to the Redis cache.
    linkedRedisCacheId String
    Fully qualified resourceId of the linked redis cache.
    linkedRedisCacheLocation String
    Location of the linked redis cache.
    name String
    The name of the Redis cache.
    resourceGroupName String
    The name of the resource group.
    serverRole ReplicationRole
    Role of the linked server.
    linkedServerName String
    The name of the linked server that is being added to the Redis cache.
    linkedRedisCacheId string
    Fully qualified resourceId of the linked redis cache.
    linkedRedisCacheLocation string
    Location of the linked redis cache.
    name string
    The name of the Redis cache.
    resourceGroupName string
    The name of the resource group.
    serverRole ReplicationRole
    Role of the linked server.
    linkedServerName string
    The name of the linked server that is being added to the Redis cache.
    linked_redis_cache_id str
    Fully qualified resourceId of the linked redis cache.
    linked_redis_cache_location str
    Location of the linked redis cache.
    name str
    The name of the Redis cache.
    resource_group_name str
    The name of the resource group.
    server_role ReplicationRole
    Role of the linked server.
    linked_server_name str
    The name of the linked server that is being added to the Redis cache.
    linkedRedisCacheId String
    Fully qualified resourceId of the linked redis cache.
    linkedRedisCacheLocation String
    Location of the linked redis cache.
    name String
    The name of the Redis cache.
    resourceGroupName String
    The name of the resource group.
    serverRole "Primary" | "Secondary"
    Role of the linked server.
    linkedServerName String
    The name of the linked server that is being added to the Redis cache.

    Outputs

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

    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisioningState string
    Terminal state of the link between primary and secondary redis cache.
    Type string
    Resource type.
    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisioningState string
    Terminal state of the link between primary and secondary redis cache.
    Type string
    Resource type.
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    provisioningState String
    Terminal state of the link between primary and secondary redis cache.
    type String
    Resource type.
    azureApiVersion string
    The Azure API version of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    provisioningState string
    Terminal state of the link between primary and secondary redis cache.
    type string
    Resource type.
    azure_api_version str
    The Azure API version of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    provisioning_state str
    Terminal state of the link between primary and secondary redis cache.
    type str
    Resource type.
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    provisioningState String
    Terminal state of the link between primary and secondary redis cache.
    type String
    Resource type.

    Supporting Types

    ReplicationRole, ReplicationRoleArgs

    Primary
    Primary
    Secondary
    Secondary
    ReplicationRolePrimary
    Primary
    ReplicationRoleSecondary
    Secondary
    Primary
    Primary
    Secondary
    Secondary
    Primary
    Primary
    Secondary
    Secondary
    PRIMARY
    Primary
    SECONDARY
    Secondary
    "Primary"
    Primary
    "Secondary"
    Secondary

    Import

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

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.3.0 published on Monday, Apr 28, 2025 by Pulumi