[RedisEnterpriseCache] Add migration cmdlets, maintenance window, and keyspace notifications support for API versions-> 2025-08-01-preview and 2026-02-01-preview#29760
Open
koderjoker wants to merge 15 commits into
Open
Conversation
- Update AutoRest config to target 2026-02-01-preview spec - Add swagger transforms to enforce required properties (UserObjectId, GroupNickname, LinkedDatabase) - Add required: true directives for parameter-level enforcement - Rename Upgrade variants to Update for DatabaseDbRedisVersion backward compatibility - Add NotifyKeyspaceEvents to New/Update-Database custom cmdlets - Add MaintenanceConfigurationMaintenanceWindow to New-AzRedisEnterpriseCache - Regenerate code, docs, help, exports, and tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fill in example stubs for Get/Start/Stop/Test-AzRedisEnterpriseCacheMigration - Remove Update-AzRedisEnterpriseCacheMigration (no PATCH API exists for migration) - Regenerate docs and help Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pdate-Migration example - New-AzRedisEnterpriseCache: add maintenance window example - Update-AzRedisEnterpriseCache: add maintenance window example - New-AzRedisEnterpriseCacheDatabase: add keyspace notifications example - Update-AzRedisEnterpriseCacheDatabase: add keyspace notifications example - Remove Update-AzRedisEnterpriseCacheMigration example (cmdlet removed) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Member
Author
|
Consulting what branch to push these changes to |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Az.RedisEnterpriseCache module to align with newer Redis Enterprise Cache API previews, adding migration cmdlets and exposing new configuration surfaces (maintenance windows and keyspace notifications), along with regenerated help/docs and updated scenario tests.
Changes:
- Added migration cmdlets:
Get-AzRedisEnterpriseCacheMigration,Start-AzRedisEnterpriseCacheMigration,Stop-AzRedisEnterpriseCacheMigration,Test-AzRedisEnterpriseCacheMigration. - Added support for configuring maintenance windows on clusters and keyspace notifications on databases.
- Updated help/docs/examples and extended scenario tests to cover new behaviors.
Reviewed changes
Copilot reviewed 64 out of 65 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion.md | Regenerated cmdlet help (syntax/parameter sets) for Redis version upgrade cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Update-AzRedisEnterpriseCacheDatabase.md | Updated help to include -NotifyKeyspaceEvents and a new example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Update-AzRedisEnterpriseCache.md | Updated help to include maintenance window parameter and examples. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Test-AzRedisEnterpriseCacheMigration.md | Added help for new migration validation cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Stop-AzRedisEnterpriseCacheMigration.md | Added help for new migration cancel/rollback cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Start-AzRedisEnterpriseCacheMigration.md | Added help for new migration start cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Remove-AzRedisEnterpriseCacheAccessPolicyAssignment.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Remove-AzRedisEnterpriseCache.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/New-AzRedisEnterpriseCacheDatabase.md | Updated help to include -NotifyKeyspaceEvents and example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/New-AzRedisEnterpriseCacheAccessPolicyAssignment.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/New-AzRedisEnterpriseCache.md | Updated help to include maintenance window parameter and example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Invoke-AzRedisEnterpriseCacheForceDatabaseUnlink.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Invoke-AzRedisEnterpriseCacheDatabaseFlush.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Get-AzRedisEnterpriseCacheSku.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Get-AzRedisEnterpriseCacheOperationStatus.md | Help regeneration (minor text + subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Get-AzRedisEnterpriseCacheMigration.md | Added help for new migration GET cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Get-AzRedisEnterpriseCacheAccessPolicyAssignment.md | Help regeneration (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/Az.RedisEnterpriseCache.md | Module cmdlet index updated for new cmdlets and revised descriptions. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/ChangeLog.md | Changelog updated for new API previews/cmdlets/parameters. |
| src/RedisEnterpriseCache/RedisEnterpriseCache/Az.RedisEnterpriseCache.psd1 | Module manifest updated to export new migration cmdlets and regenerated metadata. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.sln | Solution updated (project GUID refresh). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/utils.ps1 | Test environment setup updated (new OSS cache creation + location change). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/Test-AzRedisEnterpriseCacheMigration.Tests.ps1 | Added generated test stub for migration validation cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/Stop-AzRedisEnterpriseCacheMigration.Tests.ps1 | Added generated test stub for migration cancel cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/Start-AzRedisEnterpriseCacheMigration.Tests.ps1 | Added generated test stub for migration start cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/localEnv.json | Updated local test environment values to include migration OSS cache name. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/Get-AzRedisEnterpriseCacheMigration.Tests.ps1 | Added generated test stub for migration get cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/env.json | Updated recorded test environment values to include migration OSS cache name. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/AzRedisEnterpriseCacheScenario.Tests.ps1 | Scenario tests extended to validate maintenance windows, keyspace notifications, and migration flows. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/README.md | AutoRest configuration updated to newer preview swagger and directives for cmdlet shaping. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/Properties/AssemblyInfo.cs | Assembly version bumped to 2.0.0. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/generate-info.json | Regeneration metadata updated. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/Update-AzRedisEnterpriseCacheDatabase.md | Added keyspace notifications example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/Update-AzRedisEnterpriseCache.md | Added maintenance window example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/Test-AzRedisEnterpriseCacheMigration.md | Added migration validation example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/Stop-AzRedisEnterpriseCacheMigration.md | Added migration cancel example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/Start-AzRedisEnterpriseCacheMigration.md | Added migration start example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/New-AzRedisEnterpriseCacheDatabase.md | Added keyspace notifications example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/New-AzRedisEnterpriseCache.md | Added maintenance window example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/examples/Get-AzRedisEnterpriseCacheMigration.md | Added migration get example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion.md | Regenerated reference doc including new identity parameter set. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Update-AzRedisEnterpriseCacheDatabase.md | Regenerated reference doc including keyspace notifications parameter and example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Update-AzRedisEnterpriseCache.md | Regenerated reference doc including maintenance window parameter and example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Test-AzRedisEnterpriseCacheMigration.md | Added reference doc for migration validation cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Stop-AzRedisEnterpriseCacheMigration.md | Added reference doc for migration cancel cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Start-AzRedisEnterpriseCacheMigration.md | Added reference doc for migration start cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Remove-AzRedisEnterpriseCacheAccessPolicyAssignment.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Remove-AzRedisEnterpriseCache.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/New-AzRedisEnterpriseCacheDatabase.md | Regenerated reference doc including keyspace notifications parameter and example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/New-AzRedisEnterpriseCacheAccessPolicyAssignment.md | Regenerated reference doc (minor synopsis change + subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/New-AzRedisEnterpriseCache.md | Regenerated reference doc including maintenance window parameter and example. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Invoke-AzRedisEnterpriseCacheForceDatabaseUnlink.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Invoke-AzRedisEnterpriseCacheDatabaseFlush.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Get-AzRedisEnterpriseCacheSku.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Get-AzRedisEnterpriseCacheOperationStatus.md | Regenerated reference doc (minor text + subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Get-AzRedisEnterpriseCacheMigration.md | Added reference doc for migration get cmdlet. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Get-AzRedisEnterpriseCacheAccessPolicyAssignment.md | Regenerated reference doc (subscription ID note). |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/docs/Az.RedisEnterpriseCache.md | Regenerated module cmdlet index for updated surface area. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/Update-AzRedisEnterpriseCacheDatabase.ps1 | Exposed -NotifyKeyspaceEvents on database update wrapper. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/Test-AzRedisEnterpriseCacheMigration.ps1 | Added custom wrapper to fix ARM request body serialization for migration validation. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/New-AzRedisEnterpriseCacheDatabase.ps1 | Exposed -NotifyKeyspaceEvents on database create wrapper. |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/New-AzRedisEnterpriseCache.ps1 | Exposed maintenance window parameter on cluster creation and ensured it isn’t passed to DB creation. |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Comment on lines
+178
to
+186
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')] | ||
| [System.String] | ||
| # Specifies which keyspace events should trigger notifications. | ||
| # Default is an empty string, meaning this feature is disabled. | ||
| # When enabled, at least 'K' (keyspace events) or 'E' (keyevent events) must be present. | ||
| # For example, 'AKE' enables all standard events. | ||
| # See https://redis.io/docs/latest/develop/use/keyspace-notifications/ for the complete list of event types. | ||
| ${NotifyKeyspaceEvents}, |
Comment on lines
+154
to
+162
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')] | ||
| [System.String] | ||
| # Specifies which keyspace events should trigger notifications. | ||
| # Default is an empty string, meaning this feature is disabled. | ||
| # When enabled, at least 'K' (keyspace events) or 'E' (keyevent events) must be present. | ||
| # For example, 'AKE' enables all standard events. | ||
| # See https://redis.io/docs/latest/develop/use/keyspace-notifications/ for the complete list of event types. | ||
| ${NotifyKeyspaceEvents}, |
Comment on lines
+48
to
+50
| # Create an OSS Redis cache for migration tests (requires Az.RedisCache module) | ||
| Import-Module Az.RedisCache -ErrorAction SilentlyContinue | ||
| New-AzRedisCache -ResourceGroupName $env.ResourceGroupName -Name $env.OssCacheName -Location $env.Location -Sku "Basic" -Size "C0" | Out-Null |
Comment on lines
42
to
43
| module-version: 1.0.0 | ||
| title: RedisEnterpriseCache |
Comment on lines
+17
to
+22
| .Synopsis | ||
| Validates if a source Azure Cache for Redis resource can be migrated to a target Azure Managed Redis resource. | ||
| .Description | ||
| Validates if a source Azure Cache for Redis resource can be migrated to a target Azure Managed Redis resource. | ||
| This custom wrapper fixes a serialization issue where the request body must nest properties under a | ||
| "properties" envelope for the ARM API, but the generated Expanded variant serializes them flat. |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
…preview - Add NotifyKeyspaceEvents parameter rename directive (replaces runtime hack) - Add custom Test-AzRedisEnterpriseCacheMigration wrapper fixing ARM properties serialization bug - Fix MaintenanceConfigurationMaintenanceWindow PSBoundParameters leak in New-AzRedisEnterpriseCache - Unskip 7 tests: SKU listing, AccessPolicy CRUD, ForceUnlink, UpdateNotifyKeyspaceEvents, Test-Migration - Comment out UpgradeDbRedisVersion test (cluster already at latest version) - Use New-AzRedisEnterpriseCacheDatabase (PUT) for DB updates since PATCH is not implemented - Recording: 25 tests passing in both record and playback modes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…disCache import Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ming Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Output captured from real Azure command execution against Balanced_B10 caches. Examples updated: New/Update-AzRedisEnterpriseCache (maintenance window), New-AzRedisEnterpriseCacheDatabase (keyspace notifications), and all 4 migration cmdlets (Test/Start/Get/Stop). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…g change Adds remove directive in AutoRest config to prevent generation of UpdateViaIdentity and UpdateViaIdentityRedisEnterprise parameter sets, preserving the original single __AllParameterSets behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… parameters Replace raw JSON-based Start-Migration with a custom cmdlet that exposes individual parameters (-SourceResourceId, -SwitchDns, -SkipDataMigration, -ForceMigrate) following the Az.Migrate pattern. - Add custom/Start-AzRedisEnterpriseCacheMigration.ps1 with friendly params - Add README.md directives to hide generated variants - Update scenario test to use friendly params instead of -JsonString - Regenerate docs and help files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Recorded HTTP interactions from successful test run against Azure. Test passes in both Record and Playback modes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update module-version in README.md from 1.0.0 to 3.0.0 to match manifest - Change Import-Module Az.RedisCache to -ErrorAction Stop (fail fast) - Use 'Azure Managed Redis' consistently in migration example descriptions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove variant rename directives for DatabaseDbRedisVersion; only remove the new UpgradeViaIdentity variant (not in published v2.0.0) - Restores Upgrade + UpgradeViaIdentityRedisEnterprise parameter sets and RedisEnterpriseInputObject parameter - Fix Start-Migration docs example from -JsonString to friendly params - Use 'Azure Managed Redis' consistently in docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The scenario test recording had keys indexed with 'StartViaJsonString' (the internal variant name) but the test's It block is named 'StartExpanded'. Updated recording keys to match, fixing playback failure in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
028509b to
f2cb881
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.