Skip to content

[Redis] Add support for 2022-06-01 API version #20511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a360e75
upgrade to Microsft.Azure.Management.Redis v9.0.0
austintolani Nov 3, 2022
30d739b
add preferredDataArchiveAuthMethod param to import/export
austintolani Dec 22, 2022
f19c22d
Update redis version description
austintolani Dec 22, 2022
f265d31
list additional linked server properties
austintolani Dec 22, 2022
9d930cf
lro updates
austintolani Dec 22, 2022
d042f19
testing
austintolani Dec 24, 2022
dbeaca5
add argument complete to import/export
austintolani Dec 24, 2022
0296122
documentation updates
austintolani Dec 26, 2022
3030c93
update CHANGELOG.md
austintolani Dec 26, 2022
333061d
Merge branch 'Azure:main' into main
austintolani Dec 26, 2022
e75b955
add nuget.org as package source
austintolani Dec 31, 2022
527a3aa
Merge branch 'main' of github.com:austintolani/azure-powershell
austintolani Dec 31, 2022
cf00e55
add azure-powershell key to nuget.config
austintolani Dec 31, 2022
d0338b3
don't specify Az.Storage.psd1
austintolani Dec 31, 2022
c50c0d0
add storage package refrence
austintolani Jan 3, 2023
8349bab
Merge branch 'Azure:main' into main
austintolani Jan 3, 2023
e265bdc
Add storage project
austintolani Jan 3, 2023
76358d5
Merge branch 'main' of github.com:austintolani/azure-powershell
austintolani Jan 3, 2023
e6e0e5f
Update TestImportExportReboot.json
austintolani Jan 3, 2023
f1c8e7c
Update ChangeLog.md
dingmeng-xue Jan 4, 2023
16a5ced
Merge branch 'release-2023-01-10' into main
dingmeng-xue Jan 4, 2023
c96e63d
Merge branch 'release-2023-01-10' into main
dingmeng-xue Jan 4, 2023
4ce51cf
sanitize recordings
austintolani Jan 5, 2023
c0789eb
Merge branch 'main' of github.com:austintolani/azure-powershell
austintolani Jan 5, 2023
f941a81
Merge branch 'release-2023-01-10' into main
dingmeng-xue Jan 5, 2023
af5b750
Merge branch 'release-2023-01-10' into main
dingmeng-xue Jan 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/RedisCache/RedisCache.Test/RedisCache.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Redis" Version="8.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Redis" Version="9.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="25.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ protected RedisCacheTestRunner(ITestOutputHelper output)
.WithNewRmModules(helper => new[]
{
helper.RMProfileModule,
helper.GetRMModulePath("Az.RedisCache.psd1")
helper.GetRMModulePath("Az.RedisCache.psd1"),
helper.GetRMModulePath("Az.Storage.psd1")
})
.WithNewRecordMatcherArguments(
userAgentsToIgnore: new Dictionary<string, string>(),
Expand Down
42 changes: 26 additions & 16 deletions src/RedisCache/RedisCache.Test/ScenarioTests/RedisCacheTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Test-RedisCache
New-AzResourceGroup -Name $resourceGroupName -Location $location

# Creating Cache
$cacheCreated = New-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size P1 -Sku Premium -RedisVersion 6
$cacheCreated = New-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size P1 -Sku Premium -RedisVersion latest

Assert-AreEqual $cacheName $cacheCreated.Name
Assert-AreEqual $location $cacheCreated.Location
Expand All @@ -25,7 +25,7 @@ function Test-RedisCache
Assert-AreEqual "creating" $cacheCreated.ProvisioningState
Assert-AreEqual "6GB" $cacheCreated.Size
Assert-AreEqual "Premium" $cacheCreated.Sku
Assert-AreEqual "6" $cacheCreated.RedisVersion.split(".")[0]
Assert-AreEqual "6" $cacheCreated.RedisVersion.split(".")[0] # May need to update if 'latest' is > 6

Assert-NotNull $cacheCreated.PrimaryKey "PrimaryKey do not exists"
Assert-NotNull $cacheCreated.SecondaryKey "SecondaryKey do not exists"
Expand Down Expand Up @@ -530,14 +530,17 @@ function Test-ImportExportReboot

# Tests ExportRMAzureRedisCache
Export-AzRedisCache -Name $cacheName -Prefix $prefix -Container $sasKeyForContainer
# Tests export with ManagedIdentity fails when managed identity not enabled on storage account/cache
Assert-Throws {Export-AzRedisCache -Name $cacheName -Prefix $prefix -Container $sasKeyForContainer -PreferredDataArchiveAuthMethod ManagedIdentity}

# Get SAS token for blob
$sasKeyForBlob = ""
Get-SasForBlob $resourceGroupName $storageName $storageContainerName $prefix ([ref]$sasKeyForBlob)

# Tests ImportAzureRmRedisCache
Import-AzRedisCache -Name $cacheName -Files @($sasKeyForBlob) -Force

# Tests import with ManagedIdentity fails when managed identity not enabled on storage account/cache
Assert-Throws {Import-AzRedisCache -Name $cacheName -Files @($sasKeyForBlob) -Force -PreferredDataArchiveAuthMethod ManagedIdentity}
############################# Tests ResetRMAzureRedisCache #############################
$rebootType = "PrimaryNode"
Reset-AzRedisCache -Name $cacheName -RebootType $rebootType -Force
Expand Down Expand Up @@ -647,6 +650,10 @@ function Test-GeoReplication
Assert-AreEqual "creating" $linkCreated.ProvisioningState
Assert-AreEqual $cacheName1 $linkCreated.PrimaryServerName
Assert-AreEqual $cacheName2 $linkCreated.SecondaryServerName
Assert-NotNull $linkCreated.PrimaryHostName
Assert-NotNull $linkCreated.GeoReplicatedPrimaryHostName
Assert-NotNull $linkCreated.ServerRole
Assert-NotNull $linkCreated.LinkedRedisCacheLocation

############################# GetAzureRedisCacheLink #############################
# Get single links and wait for creation to comeplte
Expand All @@ -667,10 +674,13 @@ function Test-GeoReplication
$linkGet = Get-AzRedisCacheLink -Name $cacheName1
Assert-AreEqual $cacheName1 $linkGet[0].PrimaryServerName
Assert-AreEqual $cacheName2 $linkGet[0].SecondaryServerName
Assert-AreEqual $linkGet.ServerRole "Secondary"
Assert-AreEqual $linkGet.LinkedRedisCacheLocation $location2
$linkGet = Get-AzRedisCacheLink -Name $cacheName2
Assert-AreEqual $cacheName1 $linkGet[0].PrimaryServerName
Assert-AreEqual $cacheName2 $linkGet[0].SecondaryServerName

Assert-AreEqual $linkGet.ServerRole "Primary"
Assert-AreEqual $linkGet.LinkedRedisCacheLocation $location1
# Get links where server is primary
$linkGet = Get-AzRedisCacheLink -PrimaryServerName $cacheName1
Assert-AreEqual $cacheName1 $linkGet[0].PrimaryServerName
Expand Down Expand Up @@ -894,7 +904,7 @@ function Test-ManagedIdentity
New-AzResourceGroup -Name $resourceGroupName -Location $location

# Creating Cache
$cacheCreated = New-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 1GB -Sku Standard -IdentityType SystemAssignedUserAssigned -UserAssignedIdentity "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test","/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2"
$cacheCreated = New-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 1GB -Sku Standard -IdentityType SystemAssignedUserAssigned -UserAssignedIdentity "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami","/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2"

Assert-AreEqual $cacheName $cacheCreated.Name
Assert-AreEqual $location $cacheCreated.Location
Expand All @@ -904,8 +914,8 @@ function Test-ManagedIdentity
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("PrincipalId")
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("TenantId")
Assert-AreEqual 2 $cacheCreated.UserAssignedIdentity.Count
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2")


$cacheCreated = Get-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName
Expand All @@ -914,8 +924,8 @@ function Test-ManagedIdentity
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("PrincipalId")
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("TenantId")
Assert-AreEqual 2 $cacheCreated.UserAssignedIdentity.Count
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2")


# In loop to check if cache exists
Expand All @@ -932,15 +942,15 @@ function Test-ManagedIdentity


# Test updating user assigned identity
$cacheCreated = Set-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -IdentityType SystemAssignedUserAssigned -UserAssignedIdentity "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2"
$cacheCreated = Set-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -IdentityType SystemAssignedUserAssigned -UserAssignedIdentity "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2"

Assert-AreEqual "SystemAssignedUserAssigned" $cacheCreated.IdentityType
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("PrincipalId")
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("TenantId")
Assert-AreEqual 1 $cacheCreated.UserAssignedIdentity.Count
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2")

Start-TestSleep -Seconds 60
Start-TestSleep -Seconds 200
# Test removing user assigned identity
$cacheCreated = Set-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -IdentityType SystemAssigned

Expand All @@ -949,16 +959,16 @@ function Test-ManagedIdentity
Assert-NotNull $cacheCreated.SystemAssignedIdentity.Item("TenantId")
Assert-Null $cacheCreated.UserAssignedIdentity

Start-TestSleep -Seconds 60
Start-TestSleep -Seconds 200
# Test removing system assigned identity
$cacheCreated = Set-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -IdentityType UserAssigned -UserAssignedIdentity "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2"
$cacheCreated = Set-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -IdentityType UserAssigned -UserAssignedIdentity "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2"

Assert-AreEqual "UserAssigned" $cacheCreated.IdentityType
Assert-Null $cacheCreated.SystemAssignedIdentity
Assert-AreEqual 1 $cacheCreated.UserAssignedIdentity.Count
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/0ee2a145-4d40-44f4-b764-67b40274f1ac/resourceGroups/prn-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test2")
Assert-AreEqual $True ($cacheCreated.UserAssignedIdentity -contains "/subscriptions/3919658b-68ae-4509-8c17-6a2238340ae7/resourcegroups/tolani-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami2")

Start-TestSleep -Seconds 60
Start-TestSleep -Seconds 200
# Test removing identity
$cacheCreated = Set-AzRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -IdentityType None

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/RedisCache/RedisCache.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2042
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RedisCache", "RedisCache\RedisCache.csproj", "{C972E3EF-4461-4758-BA31-93E0947B1253}"
EndProject
Expand All @@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScenarioTest.ResourceManage
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFx", "..\..\tools\TestFx\TestFx.csproj", "{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage", "..\Storage\Storage\Storage.csproj", "{A2591FA5-BF93-4358-9097-E6D58FE1DDC4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -38,6 +40,10 @@ Global
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.Build.0 = Release|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
3 changes: 3 additions & 0 deletions src/RedisCache/RedisCache/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- Additional information about change #1
-->
## Upcoming Release
* Added optional parameter `PreferredDataArchiveAuthMethod` in `Export-AzRedisCache`
* Added optional parameter `PreferredDataArchiveAuthMethod` in `Import-AzRedisCache`
* Added 4 additional properties for a geo replication link: `PrimaryHostName`, `GeoReplicatedPrimaryHostName`, `ServerRole`, and `LinkedRedisCacheLocation`in `Get-AzRedisCacheLink` and `New-AzRedisCacheLink`

## Version 1.6.0
* Added `IdentityType` and `UserAssignedIdentity` parameter in `New-AzRedisCache` and `Set-AzRedisCache` cmdlets.
Expand Down
6 changes: 5 additions & 1 deletion src/RedisCache/RedisCache/Commands/ExportAzureRedisCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public class ExportAzureRedisCache : RedisCacheCmdletBase
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Format for import operation.")]
public string Format { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS.")]
[PSArgumentCompleter("SAS", "ManagedIdentity")]
public string PreferredDataArchiveAuthMethod { get; set; }

[Parameter(Mandatory = false)]
public SwitchParameter PassThru { get; set; }

Expand All @@ -56,7 +60,7 @@ public override void ExecuteCmdlet()
Name,
() =>
{
CacheClient.ExportToCache(ResourceGroupName, Name, Container, Prefix, Format);
CacheClient.ExportToCache(ResourceGroupName, Name, Container, Prefix, Format,PreferredDataArchiveAuthMethod);
if (PassThru)
{
WriteObject(true);
Expand Down
6 changes: 5 additions & 1 deletion src/RedisCache/RedisCache/Commands/ImportAzureRedisCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public class ImportAzureRedisCache : RedisCacheCmdletBase
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Format for import operation.")]
public string Format { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS.")]
[PSArgumentCompleter("SAS", "ManagedIdentity")]
public string PreferredDataArchiveAuthMethod { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")]
public SwitchParameter Force { get; set; }

Expand All @@ -55,7 +59,7 @@ public override void ExecuteCmdlet()
string.Format(Resources.ImportingRedisCache, Name),
string.Format(Resources.ImportRedisCache, Name),
Name,
() => CacheClient.ImportToCache(ResourceGroupName, Name, Files, Format));
() => CacheClient.ImportToCache(ResourceGroupName, Name, Files, Format,PreferredDataArchiveAuthMethod));

if (PassThru)
{
Expand Down
2 changes: 1 addition & 1 deletion src/RedisCache/RedisCache/Commands/NewAzureRedisCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class NewAzureRedisCache : RedisCacheCmdletBase
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "List of Azure regions with Availability zones.")]
public string[] Zone { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Redis version. Valid values: 4, 6")]
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'.")]
public string RedisVersion { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Specifies the type of identity used for the Azure Cache for Redis. Valid values: \"SystemAssigned\" or \"UserAssigned\" or \"SystemAssignedUserAssigned\" or \"None\" ")]
Expand Down
2 changes: 1 addition & 1 deletion src/RedisCache/RedisCache/Commands/SetAzureRedisCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class SetAzureRedisCache : RedisCacheCmdletBase
[PSArgumentCompleter(TlsStrings.OneFullStopZero, TlsStrings.OneFullStopOne, TlsStrings.OneFullStopTwo)]
public string MinimumTlsVersion { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Redis version. Valid values: 4, 6")]
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'.")]
public string RedisVersion { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "A hash table which represents tags.")]
Expand Down
8 changes: 8 additions & 0 deletions src/RedisCache/RedisCache/Models/PSRedisLinkedServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public class PSRedisLinkedServer
public string PrimaryServerName { get; set; }
public string SecondaryServerName { get; set; }
public string ProvisioningState { get; set; }
public string LinkedRedisCacheLocation { get; set; }
public string ServerRole { get; set; }
public string PrimaryHostName { get; set; }
public string GeoReplicatedPrimaryHostName { get; set; }

public PSRedisLinkedServer() { }

Expand All @@ -48,6 +52,10 @@ internal PSRedisLinkedServer(RedisLinkedServerWithProperties redisLinkedServer)
PrimaryServerName = ele[8];
SecondaryServerName = ele[10];
}
LinkedRedisCacheLocation = redisLinkedServer.LinkedRedisCacheLocation;
ServerRole = redisLinkedServer.ServerRole.ToString();
PrimaryHostName = redisLinkedServer.PrimaryHostName;
GeoReplicatedPrimaryHostName = redisLinkedServer.GeoReplicatedPrimaryHostName;
}
}
}
Loading