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 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/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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 linkedServer = new azure_native.redis.LinkedServer("linkedServer", {
linkedRedisCacheId: "/subscriptions/00000000-0000-0000-0000-000000000000/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
linked_server = azure_native.redis.LinkedServer("linkedServer",
linked_redis_cache_id="/subscriptions/00000000-0000-0000-0000-000000000000/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:
linkedServer:
type: azure-native:redis:LinkedServer
properties:
linkedRedisCacheId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2
linkedRedisCacheLocation: West US
linkedServerName: cache2
name: cache1
resourceGroupName: rg1
serverRole: Secondary
Create LinkedServer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LinkedServer(name: string, args: LinkedServerArgs, opts?: CustomResourceOptions);@overload
def LinkedServer(resource_name: str,
args: LinkedServerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LinkedServer(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 NewLinkedServer(ctx *Context, name string, args LinkedServerArgs, opts ...ResourceOption) (*LinkedServer, error)public LinkedServer(string name, LinkedServerArgs args, CustomResourceOptions? opts = null)
public LinkedServer(String name, LinkedServerArgs args)
public LinkedServer(String name, LinkedServerArgs args, CustomResourceOptions options)
type: azure-native:redis:LinkedServer
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 LinkedServerArgs
- 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 LinkedServerArgs
- 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 LinkedServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LinkedServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LinkedServerArgs
- 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 linkedServerResource = new AzureNative.Redis.LinkedServer("linkedServerResource", new()
{
LinkedRedisCacheId = "string",
LinkedRedisCacheLocation = "string",
Name = "string",
ResourceGroupName = "string",
ServerRole = AzureNative.Redis.ReplicationRole.Primary,
LinkedServerName = "string",
});
example, err := redis.NewLinkedServer(ctx, "linkedServerResource", &redis.LinkedServerArgs{
LinkedRedisCacheId: pulumi.String("string"),
LinkedRedisCacheLocation: pulumi.String("string"),
Name: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ServerRole: redis.ReplicationRolePrimary,
LinkedServerName: pulumi.String("string"),
})
var linkedServerResource = new LinkedServer("linkedServerResource", LinkedServerArgs.builder()
.linkedRedisCacheId("string")
.linkedRedisCacheLocation("string")
.name("string")
.resourceGroupName("string")
.serverRole("Primary")
.linkedServerName("string")
.build());
linked_server_resource = azure_native.redis.LinkedServer("linkedServerResource",
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 linkedServerResource = new azure_native.redis.LinkedServer("linkedServerResource", {
linkedRedisCacheId: "string",
linkedRedisCacheLocation: "string",
name: "string",
resourceGroupName: "string",
serverRole: azure_native.redis.ReplicationRole.Primary,
linkedServerName: "string",
});
type: azure-native:redis:LinkedServer
properties:
linkedRedisCacheId: string
linkedRedisCacheLocation: string
linkedServerName: string
name: string
resourceGroupName: string
serverRole: Primary
LinkedServer 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 LinkedServer resource accepts the following input properties:
- Linked
Redis stringCache Id - Fully qualified resourceId of the linked redis cache.
- Linked
Redis stringCache Location - Location of the linked redis cache.
- Name string
- The name of the redis cache.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Server
Role Pulumi.Azure Native. Redis. Replication Role - Role of the linked server.
- Linked
Server stringName - The name of the RedisLinkedServerWithProperties
- Linked
Redis stringCache Id - Fully qualified resourceId of the linked redis cache.
- Linked
Redis stringCache Location - Location of the linked redis cache.
- Name string
- The name of the redis cache.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Server
Role ReplicationRole - Role of the linked server.
- Linked
Server stringName - The name of the RedisLinkedServerWithProperties
- linked
Redis StringCache Id - Fully qualified resourceId of the linked redis cache.
- linked
Redis StringCache Location - Location of the linked redis cache.
- name String
- The name of the redis cache.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- server
Role ReplicationRole - Role of the linked server.
- linked
Server StringName - The name of the RedisLinkedServerWithProperties
- linked
Redis stringCache Id - Fully qualified resourceId of the linked redis cache.
- linked
Redis stringCache Location - Location of the linked redis cache.
- name string
- The name of the redis cache.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- server
Role ReplicationRole - Role of the linked server.
- linked
Server stringName - The name of the RedisLinkedServerWithProperties
- linked_
redis_ strcache_ id - Fully qualified resourceId of the linked redis cache.
- linked_
redis_ strcache_ location - Location of the linked redis cache.
- name str
- The name of the redis cache.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- server_
role ReplicationRole - Role of the linked server.
- linked_
server_ strname - The name of the RedisLinkedServerWithProperties
- linked
Redis StringCache Id - Fully qualified resourceId of the linked redis cache.
- linked
Redis StringCache Location - Location of the linked redis cache.
- name String
- The name of the redis cache.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- server
Role "Primary" | "Secondary" - Role of the linked server.
- linked
Server StringName - The name of the RedisLinkedServerWithProperties
Outputs
All input properties are implicitly available as output properties. Additionally, the LinkedServer resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Geo
Replicated stringPrimary Host Name - The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Host stringName - The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
- Provisioning
State string - Terminal state of the link between primary and secondary redis cache.
- System
Data Pulumi.Azure Native. Redis. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Azure
Api stringVersion - The Azure API version of the resource.
- Geo
Replicated stringPrimary Host Name - The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Host stringName - The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
- Provisioning
State string - Terminal state of the link between primary and secondary redis cache.
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- geo
Replicated StringPrimary Host Name - The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
- id String
- The provider-assigned unique ID for this managed resource.
- primary
Host StringName - The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
- provisioning
State String - Terminal state of the link between primary and secondary redis cache.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api stringVersion - The Azure API version of the resource.
- geo
Replicated stringPrimary Host Name - The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
- id string
- The provider-assigned unique ID for this managed resource.
- primary
Host stringName - The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
- provisioning
State string - Terminal state of the link between primary and secondary redis cache.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ strversion - The Azure API version of the resource.
- geo_
replicated_ strprimary_ host_ name - The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
- id str
- The provider-assigned unique ID for this managed resource.
- primary_
host_ strname - The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
- provisioning_
state str - Terminal state of the link between primary and secondary redis cache.
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- geo
Replicated StringPrimary Host Name - The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.
- id String
- The provider-assigned unique ID for this managed resource.
- primary
Host StringName - The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.
- provisioning
State String - Terminal state of the link between primary and secondary redis cache.
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
ReplicationRole, ReplicationRoleArgs
- Primary
- Primary
- Secondary
- Secondary
- Replication
Role Primary - Primary
- Replication
Role Secondary - Secondary
- Primary
- Primary
- Secondary
- Secondary
- Primary
- Primary
- Secondary
- Secondary
- PRIMARY
- Primary
- SECONDARY
- Secondary
- "Primary"
- Primary
- "Secondary"
- Secondary
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
