az vmss lifecycle-hook-event
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage Lifecycle Hook Event.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az vmss lifecycle-hook-event approve |
Approve a virtual machine scale set lifecycle hook event. |
Core | Preview |
| az vmss lifecycle-hook-event list |
List a list of virtual machine scale set lifecycle hook events created for a virtual machine scale set resource. |
Core | Preview |
| az vmss lifecycle-hook-event reject |
Reject a virtual machine scale set lifecycle hook event. |
Core | Preview |
| az vmss lifecycle-hook-event show |
Get a virtual machine scale set lifecycle hook event. |
Core | Preview |
| az vmss lifecycle-hook-event update |
Update a virtual machine scale set lifecycle hook event. |
Core | Preview |
az vmss lifecycle-hook-event approve
Command group 'vmss lifecycle-hook-event' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Approve a virtual machine scale set lifecycle hook event.
az vmss lifecycle-hook-event approve [--acquire-policy-token]
[--change-reference]
[--ids]
[--instance-ids]
[--name]
[--resource-group]
[--subscription]
[--vmss-name]
Examples
Approve all target resources of a lifecycle hook event.
az vmss lifecycle-hook-event approve --vmss-name MyVmss -g MyRg --name {eventGuid}
Approve a subset of target resources.
az vmss lifecycle-hook-event approve --vmss-name MyVmss -g MyRg --name {eventGuid} --instance-ids 0 1 2
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Space-separated list of identifiers for target resources in the lifecycle hook event. For a scale-set-level event such as UpgradeAutoOSScheduling, specify the VM scale set name. For an instance-level event such as UpgradeAutoOSRollingBatchStarting, specify decimal instance IDs for a Uniform scale set (e.g. 0 1 2) or VM names for a Flexible scale set. Each identifier must correspond to a target resource listed by the event. When omitted, the action is applied to all target resources of the event.
The name of the VMScaleSetLifecycleHookEvent.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the VM scale set.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az vmss lifecycle-hook-event list
Command group 'vmss lifecycle-hook-event' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List a list of virtual machine scale set lifecycle hook events created for a virtual machine scale set resource.
az vmss lifecycle-hook-event list --resource-group
--vmss-name
Examples
Gets a list of all lifecycle hook events in a virtual machine scale set.
az vmss lifecycle-hook-event list --resource-group RG01 --vmss-name VMSS01
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
The name of the VM scale set.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az vmss lifecycle-hook-event reject
Command group 'vmss lifecycle-hook-event' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Reject a virtual machine scale set lifecycle hook event.
az vmss lifecycle-hook-event reject [--acquire-policy-token]
[--change-reference]
[--ids]
[--instance-ids]
[--name]
[--resource-group]
[--subscription]
[--vmss-name]
Examples
Reject all target resources of a lifecycle hook event.
az vmss lifecycle-hook-event reject --vmss-name MyVmss -g MyRg --name {eventGuid}
Reject a subset of target resources.
az vmss lifecycle-hook-event reject --vmss-name MyVmss -g MyRg --name {eventGuid} --instance-ids 0 1 2
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Space-separated list of identifiers for target resources in the lifecycle hook event. For a scale-set-level event such as UpgradeAutoOSScheduling, specify the VM scale set name. For an instance-level event such as UpgradeAutoOSRollingBatchStarting, specify decimal instance IDs for a Uniform scale set (e.g. 0 1 2) or VM names for a Flexible scale set. Each identifier must correspond to a target resource listed by the event. When omitted, the action is applied to all target resources of the event.
The name of the VMScaleSetLifecycleHookEvent.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the VM scale set.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az vmss lifecycle-hook-event show
Command group 'vmss lifecycle-hook-event' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a virtual machine scale set lifecycle hook event.
az vmss lifecycle-hook-event show [--ids]
[--name]
[--resource-group]
[--subscription]
[--vmss-name]
Examples
Get a virtual machine scale set lifecycle hook event.
az vmss lifecycle-hook-event show --resource-group RG01 --vmss-name VMSS01 --name 2e2e3046-f85f-4966-8fd2-5fd7bf6ea717
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the VMScaleSetLifecycleHookEvent.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the VM scale set.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az vmss lifecycle-hook-event update
Command group 'vmss lifecycle-hook-event' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a virtual machine scale set lifecycle hook event.
az vmss lifecycle-hook-event update [--acquire-policy-token]
[--action-state {Approved, Rejected}]
[--change-reference]
[--ids]
[--instance-ids]
[--name]
[--resource-group]
[--subscription]
[--vmss-name]
[--wait-until]
Examples
Approve all target resources of a lifecycle hook event.
az vmss lifecycle-hook-event update --vmss-name MyVmss -g MyRg --name {eventGuid} --action-state Approved
Approve a subset of target resources (Uniform decimal instance ids or Flex VM names).
az vmss lifecycle-hook-event update --vmss-name MyVmss -g MyRg --name {eventGuid} --instance-ids 0 1 2 --action-state Approved
Delay the event deadline.
az vmss lifecycle-hook-event update --vmss-name MyVmss -g MyRg --name {eventGuid} --wait-until "2026-05-08T11:00:00Z"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
State of the lifecycle hook for the target resource. The customer can patch this property to move the lifecycle hook to a terminal state.
| Property | Value |
|---|---|
| Accepted values: | Approved, Rejected |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Space-separated list of identifiers for target resources in the lifecycle hook event. For a scale-set-level event such as UpgradeAutoOSScheduling, specify the VM scale set name. For an instance-level event such as UpgradeAutoOSRollingBatchStarting, specify decimal instance IDs for a Uniform scale set (e.g. 0 1 2) or VM names for a Flexible scale set. Each identifier must correspond to a target resource listed by the event. When omitted, the action is applied to all target resources of the event.
The name of the VMScaleSetLifecycleHookEvent.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the VM scale set.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the current lifecycle state waiting for an action from the customer. Beyond this timestamp, the platform will apply the defaultAction for the event.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |