Get-AzRedisCacheLink

Get geo replication link for Redis Cache.

Syntax

Get-AzRedisCacheLink
   -Name <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRedisCacheLink
   -PrimaryServerName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRedisCacheLink
   -PrimaryServerName <String>
   -SecondaryServerName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRedisCacheLink
   -SecondaryServerName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

There are four different ways to get geo-replication link detail. Either provide parameter Name or PrimaryServerName and/or SecondaryServerName. Name is given then all link where cache exists will be returned. If only PrimaryServerName is given then all links where cache is primary will be returned. If only SecondaryServerName is given then all links where cache is secondary will be returned. If PrimaryServerName and SecondaryServerName both are given then specific link with correct role will be returned.

Examples

Example 1: Get using parameter set AllLinksForCache

PS C:\>Get-AzRedisCacheLink -Name "mycache1"

        PrimaryServerName   : mycache1
        SecondaryServerName : mycache2
        ProvisioningState   : Succeeded

This command gets all geo-replication links for Redis Cache named mycache1.

Example 2: Get using parameter set AllLinksForPrimaryCache

PS C:\>Get-AzRedisCacheLink -PrimaryServerName "mycache1"

        PrimaryServerName   : mycache1
        SecondaryServerName : mycache2
        ProvisioningState   : Succeeded

This command gets geo-replication links where Redis Cache named mycache1 is primary.

Example 3: Get using parameter set AllLinksForSecondaryCache

PS C:\>Get-AzRedisCacheLink -SecondaryServerName "mycache2"

        PrimaryServerName   : mycache1
        SecondaryServerName : mycache2
        ProvisioningState   : Succeeded

This command gets geo-replication links where Redis Cache named mycache2 is secondary.

Example 4: Get using parameter set SingleLink

PS C:\>Get-AzRedisCacheLink -PrimaryServerName "mycache1" -SecondaryServerName "mycache2"

        PrimaryServerName   : mycache1
        SecondaryServerName : mycache2
        ProvisioningState   : Succeeded

This command gets a single geo-replication links where Redis Cache named mycache1 is primary and Redis Cache named mycache2 is secondary.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Name of redis cache.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PrimaryServerName

Name of primary redis cache in link.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SecondaryServerName

Name of secondary redis cache in link.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

String

Outputs

PSRedisLinkedServer