[Compute] Add VMSS Lifecycle Hooks cmdlets (Az.Compute preview)#29574
Draft
Copilot wants to merge 3 commits into
Draft
[Compute] Add VMSS Lifecycle Hooks cmdlets (Az.Compute preview)#29574Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Agent-Logs-Url: https://github.com/Azure/azure-powershell/sessions/acc4bc7b-f36c-4fff-9e3c-33762db3b176 Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/azure-powershell/sessions/acc4bc7b-f36c-4fff-9e3c-33762db3b176 Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement VMSS lifecycle hooks for Az.Compute
[Compute] Add VMSS Lifecycle Hooks cmdlets (Az.Compute preview)
May 12, 2026
| { | ||
| Type = this.Type, | ||
| WaitDuration = waitDuration, | ||
| DefaultAction = string.IsNullOrEmpty(this.DefaultAction) ? DefaultDefaultAction : this.DefaultAction |
There was a problem hiding this comment.
@copilot add a comment that "Since currently in production, if the customer does no pass defaultAction, we use "Approve" for these types, this works. In the future if we change the default defaultAction in production for any existing / future types, this needs to change"
|
|
||
| The cmdlet accepts pipeline input from **Get-AzVmssLifecycleHookEvent**. | ||
|
|
||
| > **Preview note:** `-ActionState Rejected` returns a server-side validation error during preview. No client change is required at GA. |
There was a problem hiding this comment.
@copilot reject is now available, remove this comment
|
|
||
| When `-InstanceId` is not specified, the action is applied to all target resources in the event. When `-InstanceId` is specified, only the matching targets are updated. | ||
|
|
||
| > **Preview note:** 'Rejected' returns a server error during preview. |
There was a problem hiding this comment.
@copilot reject is now available, remove this comment
parahluwalia
suggested changes
Jun 17, 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.
Implements the VMSS Lifecycle Hooks feature for Az.Compute (public preview), which lets customers register hooks that fire before Auto OS Upgrade phases and respond (approve/reject/delay) on a per-VM basis before the platform proceeds.
New cmdlets
New-AzVmssLifecycleHookConfigLifecycleHookobject (no Azure call)Set-AzVmssLifecycleHooksProfileSet-AzVmssOsProfilepattern)Remove-AzVmssLifecycleHook-Typeor remove all with-AllGet-AzVmssLifecycleHookEventUpdate-AzVmssLifecycleHookEvent-InstanceIdfor per-VM subset; accepts pipeline fromGet-AzVmssLifecycleHookEventChanged cmdlet
New-AzVmssConfig: Added optional-LifecycleHooksProfile <LifecycleHooksProfile>— backward compatible, mirrors how-UpgradePolicy,-AutomaticRepairsPolicyare exposed today.SDK dependency
All required SDK types (
LifecycleHook,LifecycleHooksProfile,VMScaleSetLifecycleHookEvent,VMScaleSetLifecycleHookEventUpdate,VirtualMachineScaleSetLifeCycleHookEventsOperations) are already present in the generated SDK layer.PSVirtualMachineScaleSetgets a newLifecycleHooksProfileproperty so AutoMapper round-trips it transparently.End-to-end usage
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1n8vsblobprodwus2184.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)5o1vsblobprodwus2115.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)6yfvsblobprodwus2121.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)7q7vsblobprodwus2144.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)7t8vsblobprodwus2168.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)84hvsblobprodwus2148.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)8wdvsblobprodwus2137.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)9yyvsblobprodwus2157.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)b53vsblobprodwus2154.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)ba0vsblobprodwus2130.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)balvsblobprodwus2129.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)cbvvsblobprodwus2131.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)cffvsblobprodwus218.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)d94vsblobprodwus2119.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)ezcvsblobprodwus2170.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)faxvsblobprodwus2122.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)g3xvsblobprodwus2151.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)i01vsblobprodwus216.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)isvvsblobprodwus2147.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)jhgvsblobprodwus2167.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)k4pvsblobprodwus2140.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)ldhvsblobprodwus2153.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)mt2vsblobprodwus2110.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)nudvsblobprodwus214.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)p2tvsblobprodwus2189.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)s8nvsblobprodwus2158.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)tn2vsblobprodwus2124.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)wlnvsblobprodwus2188.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)x0dvsblobprodwus2111.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)y5lvsblobprodwus2179.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)zd2vsblobprodwus2156.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)zt8vsblobprodwus2176.vsblob.vsassets.io/usr/bin/dotnet dotnet build(dns block)If you need me to access, download, or install something from one of these locations, you can either: