Skip to content

Commit

Permalink
Migrate RedisEnterpriseCache from generation to main (Azure#26350)
Browse files Browse the repository at this point in the history
* Move RedisEnterpriseCache to main

* Update ChangeLog.md

---------

Co-authored-by: azure-powershell-bot <[email protected]>
Co-authored-by: NanxiangLiu <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent fc9eee8 commit 6eb2159
Show file tree
Hide file tree
Showing 16 changed files with 296 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ if(-not $Isolated -and -not $Debugger) {
$binFolder = Join-Path $PSScriptRoot 'bin'
$objFolder = Join-Path $PSScriptRoot 'obj'

$isAzure = [System.Convert]::ToBoolean('true')

if(-not $Debugger) {
Write-Host -ForegroundColor Green 'Cleaning build folders...'
$null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
Expand Down Expand Up @@ -143,7 +145,7 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
$addComplexInterfaceInfo = !$isAzure
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}

Expand Down Expand Up @@ -178,5 +180,4 @@ if (-not $DisableAfterBuildTasks){
}
}


Write-Host -ForegroundColor Green '-------------Done-------------'
Write-Host -ForegroundColor Green '-------------Done-------------'
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,17 @@ function New-AzRedisEnterpriseCache {
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName]
# The type of Redis Enterprise cluster to deploy.
# Allowed values: Enterprise_E1, Enterprise_E5, Enterprise_E10, Enterprise_E20, Enterprise_E50, Enterprise_E100, Enterprise_E200, Enterprise_E400,EnterpriseFlash_F300, EnterpriseFlash_F700, EnterpriseFlash_F1500
# The type of RedisEnterprise cluster to deploy.
# Accepted values: Balanced_B0, Balanced_B1, Balanced_B10, Balanced_B100, Balanced_B1000, Balanced_B150, Balanced_B20, Balanced_B250, Balanced_B3, Balanced_B350, Balanced_B5, Balanced_B50, Balanced_B500, Balanced_B700, ComputeOptimized_X10, ComputeOptimized_X100, ComputeOptimized_X150, ComputeOptimized_X20, ComputeOptimized_X250, ComputeOptimized_X3, ComputeOptimized_X350, ComputeOptimized_X5, ComputeOptimized_X50, ComputeOptimized_X500, ComputeOptimized_X700, EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E1, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50, FlashOptimized_A1000, FlashOptimized_A1500, FlashOptimized_A2000, FlashOptimized_A250, FlashOptimized_A4500, FlashOptimized_A500, FlashOptimized_A700, MemoryOptimized_M10, MemoryOptimized_M100, MemoryOptimized_M1000, MemoryOptimized_M150, MemoryOptimized_M1500, MemoryOptimized_M20, MemoryOptimized_M2000, MemoryOptimized_M250, MemoryOptimized_M350, MemoryOptimized_M50, MemoryOptimized_M500, MemoryOptimized_M700
${Sku},

[Parameter()]
[Alias('SkuCapacity')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[System.Int32]
# The size of the Redis Enterprise cluster - defaults to 2 or 3 depending on SKU.
# Allowed values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs.
# The size of the RedisEnterprise cluster.
# Defaults to 2 or 3 or not applicable depending on SKU.Valid values are (2, 4, 6, ...) for Enterprise_* SKUs and (3, 9, 15, ...) for EnterpriseFlash_* SKUs.
# For other SKUs capacity argument is not supported.
${Capacity},

[Parameter()]
Expand Down Expand Up @@ -168,12 +169,29 @@ function New-AzRedisEnterpriseCache {
# Allowed values: EnterpriseCluster, OSSCluster
${ClusteringPolicy},

[Parameter(ParameterSetName='CreateClusterWithDatabase')]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[System.String]
# Key encryption key Url versioned only. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78"
${CustomerManagedKeyEncryptionKeyUrl},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability]
# Enabled by default. Can only be updated from disabled to enabled.
# If highAvailability is disabled, the data set is not replicated.
# This affects the availability SLA, and increases the risk of data loss.
${HighAvailability},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.ManagedServiceIdentityType])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
Expand Down Expand Up @@ -321,6 +339,7 @@ function New-AzRedisEnterpriseCache {
$null = $GetPSBoundParameters.Remove("RdbPersistenceFrequency")
$null = $GetPSBoundParameters.Remove("GroupNickname")
$null = $GetPSBoundParameters.Remove("LinkedDatabase")
$null = $GetPSBoundParameters.Remove("AccessKeysAuthentication")
$cluster = Az.RedisEnterpriseCache.internal\New-AzRedisEnterpriseCache @GetPSBoundParameters

if (('CreateClusterOnly') -contains $PSCmdlet.ParameterSetName)
Expand All @@ -341,6 +360,7 @@ function New-AzRedisEnterpriseCache {
$null = $PSBoundParameters.Remove("CustomerManagedKeyEncryptionKeyUrl")
$null = $PSBoundParameters.Remove("KeyEncryptionKeyIdentityType")
$null = $PSBoundParameters.Remove("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")
$null = $PSBoundParameters.Remove("HighAvailability")
$null = $PSBoundParameters.Add("DatabaseName", "default")
$database = Az.RedisEnterpriseCache.internal\New-AzRedisEnterpriseCacheDatabase @PSBoundParameters
$cluster.Database = @{$database.Name = $database}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ function New-AzRedisEnterpriseCacheDatabase {
# The ID of the target subscription.
${SubscriptionId},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ function Update-AzRedisEnterpriseCacheDatabase {
# The ID of the target subscription.
${SubscriptionId},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.IRedisEnterpriseCacheIdentity]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,17 @@ param(
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName]
# The type of Redis Enterprise cluster to deploy.
# Allowed values: Enterprise_E1, Enterprise_E5, Enterprise_E10, Enterprise_E20, Enterprise_E50, Enterprise_E100, Enterprise_E200, Enterprise_E400,EnterpriseFlash_F300, EnterpriseFlash_F700, EnterpriseFlash_F1500
# The type of RedisEnterprise cluster to deploy.
# Accepted values: Balanced_B0, Balanced_B1, Balanced_B10, Balanced_B100, Balanced_B1000, Balanced_B150, Balanced_B20, Balanced_B250, Balanced_B3, Balanced_B350, Balanced_B5, Balanced_B50, Balanced_B500, Balanced_B700, ComputeOptimized_X10, ComputeOptimized_X100, ComputeOptimized_X150, ComputeOptimized_X20, ComputeOptimized_X250, ComputeOptimized_X3, ComputeOptimized_X350, ComputeOptimized_X5, ComputeOptimized_X50, ComputeOptimized_X500, ComputeOptimized_X700, EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E1, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50, FlashOptimized_A1000, FlashOptimized_A1500, FlashOptimized_A2000, FlashOptimized_A250, FlashOptimized_A4500, FlashOptimized_A500, FlashOptimized_A700, MemoryOptimized_M10, MemoryOptimized_M100, MemoryOptimized_M1000, MemoryOptimized_M150, MemoryOptimized_M1500, MemoryOptimized_M20, MemoryOptimized_M2000, MemoryOptimized_M250, MemoryOptimized_M350, MemoryOptimized_M50, MemoryOptimized_M500, MemoryOptimized_M700
${Sku},

[Parameter()]
[Alias('SkuCapacity')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[System.Int32]
# The size of the Redis Enterprise cluster - defaults to 2 or 3 depending on SKU.
# Allowed values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs.
# The size of the RedisEnterprise cluster.
# Defaults to 2 or 3 or not applicable depending on SKU.Valid values are (2, 4, 6, ...) for Enterprise_* SKUs and (3, 9, 15, ...) for EnterpriseFlash_* SKUs.
# For other SKUs capacity argument is not supported.
${Capacity},

[Parameter()]
Expand Down Expand Up @@ -167,13 +168,31 @@ param(
# Allowed values: EnterpriseCluster, OSSCluster
${ClusteringPolicy},

[Parameter(ParameterSetName='CreateClusterWithDatabase')]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[System.String]
# Key encryption key Url versioned only.
# Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78"
${CustomerManagedKeyEncryptionKeyUrl},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability]
# Enabled by default.
# Can only be updated from disabled to enabled.
# If highAvailability is disabled, the data set is not replicated.
# This affects the availability SLA, and increases the risk of data loss.
${HighAvailability},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.ManagedServiceIdentityType])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ param(
# Allowed values: 1h, 6h, 12h
${RdbPersistenceFrequency},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3310,16 +3310,17 @@ param(
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName]
# The type of Redis Enterprise cluster to deploy.
# Allowed values: Enterprise_E1, Enterprise_E5, Enterprise_E10, Enterprise_E20, Enterprise_E50, Enterprise_E100, Enterprise_E200, Enterprise_E400,EnterpriseFlash_F300, EnterpriseFlash_F700, EnterpriseFlash_F1500
# The type of RedisEnterprise cluster to deploy.
# Accepted values: Balanced_B0, Balanced_B1, Balanced_B10, Balanced_B100, Balanced_B1000, Balanced_B150, Balanced_B20, Balanced_B250, Balanced_B3, Balanced_B350, Balanced_B5, Balanced_B50, Balanced_B500, Balanced_B700, ComputeOptimized_X10, ComputeOptimized_X100, ComputeOptimized_X150, ComputeOptimized_X20, ComputeOptimized_X250, ComputeOptimized_X3, ComputeOptimized_X350, ComputeOptimized_X5, ComputeOptimized_X50, ComputeOptimized_X500, ComputeOptimized_X700, EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E1, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50, FlashOptimized_A1000, FlashOptimized_A1500, FlashOptimized_A2000, FlashOptimized_A250, FlashOptimized_A4500, FlashOptimized_A500, FlashOptimized_A700, MemoryOptimized_M10, MemoryOptimized_M100, MemoryOptimized_M1000, MemoryOptimized_M150, MemoryOptimized_M1500, MemoryOptimized_M20, MemoryOptimized_M2000, MemoryOptimized_M250, MemoryOptimized_M350, MemoryOptimized_M50, MemoryOptimized_M500, MemoryOptimized_M700
${Sku},

[Parameter()]
[Alias('SkuCapacity')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[System.Int32]
# The size of the Redis Enterprise cluster - defaults to 2 or 3 depending on SKU.
# Allowed values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs.
# The size of the RedisEnterprise cluster.
# Defaults to 2 or 3 or not applicable depending on SKU.Valid values are (2, 4, 6, ...) for Enterprise_* SKUs and (3, 9, 15, ...) for EnterpriseFlash_* SKUs.
# For other SKUs capacity argument is not supported.
${Capacity},

[Parameter()]
Expand Down Expand Up @@ -3397,13 +3398,31 @@ param(
# Allowed values: EnterpriseCluster, OSSCluster
${ClusteringPolicy},

[Parameter(ParameterSetName='CreateClusterWithDatabase')]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[System.String]
# Key encryption key Url versioned only.
# Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78"
${CustomerManagedKeyEncryptionKeyUrl},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability]
# Enabled by default.
# Can only be updated from disabled to enabled.
# If highAvailability is disabled, the data set is not replicated.
# This affects the availability SLA, and increases the risk of data loss.
${HighAvailability},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.ManagedServiceIdentityType])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
Expand Down Expand Up @@ -3758,6 +3777,14 @@ param(
# Allowed values: 1h, 6h, 12h
${RdbPersistenceFrequency},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
Expand Down Expand Up @@ -4382,6 +4409,14 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.Protocol])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AccessKeysAuthentication]
# This property can be Enabled/Disabled to allow or deny access with the current access keys.
# Can be updated even after database is created.
${AccessKeysAuthentication},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.Protocol])]
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
Expand Down
Loading

0 comments on commit 6eb2159

Please sign in to comment.