Add Get-AzSharedVMExtensionVersion and Set-AzSharedVMExtensionVersionDeprecation cmdlets - #30122
Draft
Audrey Toney (audreyttt) with Copilot wants to merge 2 commits into
Draft
Add Get-AzSharedVMExtensionVersion and Set-AzSharedVMExtensionVersionDeprecation cmdlets#30122Audrey Toney (audreyttt) with Copilot wants to merge 2 commits into
Audrey Toney (audreyttt) with Copilot wants to merge 2 commits into
Conversation
Contributor
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Get and schedule deprecation for Shared VM Extension versions commands
Add Get-AzSharedVMExtensionVersion and Set-AzSharedVMExtensionVersionDeprecation cmdlets
Sep 10, 2026
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.
🤖 PR Validation — ❌ Action needed
️✔️Az.Accounts
❌Az.Compute
️✔️Az.KeyVault
❌Az.Maintenance
️✔️Az.ManagedServiceIdentity
️✔️Az.Monitor
❌Az.Network
️✔️Az.OperationalInsights
️✔️Az.PrivateDns
❌Az.RecoveryServices
❌Az.Security
️✔️Az.Sql
❌Az.Ssh
️✔️Az.Storage
Adds two new Az.Compute cmdlets to read a published Shared VM Extension version and schedule it for graceful deprecation, per the design-reviewed request in the issue.
Cmdlets
Get-AzSharedVMExtensionVersion— reads a specific version via-ResourceGroupName/-SharedVMExtensionName/-Versionor-ResourceId. The underlying SDK has no List operation, so-Versionis mandatory.Set-AzSharedVMExtensionVersionDeprecation— updates-DeprecationState(Active/ScheduledForDeprecation/Deprecated) with optional-DaysUntilDeprecationand-DeprecationType. Supports-ResourceIdand pipeline input (-InputObject) fromGet-AzSharedVMExtensionVersion. Since the API is PUT-only, the cmdlet fetches the full existing object, mutates only the deprecation status, and resubmits it.Deprecation state-transition logic
Extracted into a standalone, unit-testable
ComputeDeprecationStatushelper:-DaysUntilDeprecation(fails fast otherwise).Active) with no overrides clears staleDeprecationTime/DeprecationType.-DaysUntilDeprecationand-DeprecationTypetogether, avoiding a half-set inconsistent state.Supporting changes
PSSharedVMExtensionVersionmodel + AutoMapper mapping,SharedVMExtensionVersionClientaccessor onComputeAutomationBaseCmdlet.ParseSharedVMExtensionVersionResourceIdhelper to avoid duplicating resource-id parsing across both cmdlets.Az.Compute.md/Az.Compute.psd1registration, andChangeLog.mdentry.ComputeDeprecationStatustransition/validation scenarios.