Get-AzRedisCacheLink
Get geo replication link for Redis Cache.
Syntax
AllLinksForCache (Default)
Get-AzRedisCacheLink
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
AllLinksForPrimaryCache
Get-AzRedisCacheLink
-PrimaryServerName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SingleLink
Get-AzRedisCacheLink
-PrimaryServerName <String>
-SecondaryServerName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
AllLinksForSecondaryCache
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
Get-AzRedisCacheLink -Name "mycache1"
PrimaryServerName : mycache1
SecondaryServerName : mycache2
ProvisioningState : Succeeded
LinkedRedisCacheLocation : East US
ServerRole : Secondary
PrimaryHostName : mycache1.redis.cache.windows.net
GeoReplicatedPrimaryHostName : mycache2.geo.redis.cache.windows.net
This command gets all geo-replication links for Redis Cache named mycache1.
Example 2: Get using parameter set AllLinksForPrimaryCache
Get-AzRedisCacheLink -PrimaryServerName "mycache1"
PrimaryServerName : mycache1
SecondaryServerName : mycache2
ProvisioningState : Succeeded
LinkedRedisCacheLocation : East US
ServerRole : Secondary
PrimaryHostName : mycache1.redis.cache.windows.net
GeoReplicatedPrimaryHostName : mycache2.geo.redis.cache.windows.net
This command gets geo-replication links where Redis Cache named mycache1 is primary.
Example 3: Get using parameter set AllLinksForSecondaryCache
Get-AzRedisCacheLink -SecondaryServerName "mycache2"
PrimaryServerName : mycache1
SecondaryServerName : mycache2
ProvisioningState : Succeeded
LinkedRedisCacheLocation : East US
ServerRole : Secondary
PrimaryHostName : mycache1.redis.cache.windows.net
GeoReplicatedPrimaryHostName : mycache2.geo.redis.cache.windows.net
This command gets geo-replication links where Redis Cache named mycache2 is secondary.
Example 4: Get using parameter set SingleLink
Get-AzRedisCacheLink -PrimaryServerName "mycache1" -SecondaryServerName "mycache2"
PrimaryServerName : mycache1
SecondaryServerName : mycache2
ProvisioningState : Succeeded
LinkedRedisCacheLocation : East US
ServerRole : Secondary
PrimaryHostName : mycache1.redis.cache.windows.net
GeoReplicatedPrimaryHostName : mycache2.geo.redis.cache.windows.net
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.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Name of redis cache.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
AllLinksForCache
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-PrimaryServerName
Name of primary redis cache in link.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
AllLinksForPrimaryCache
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
SingleLink
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-SecondaryServerName
Name of secondary redis cache in link.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
SingleLink
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
AllLinksForSecondaryCache
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.