az vmss lifecycle-hook
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage lifecycle hooks on a Virtual Machine Scale Set (preview).
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az vmss lifecycle-hook add |
Add a lifecycle hook to a VMSS. |
Core | Preview |
| az vmss lifecycle-hook list |
List all lifecycle hooks on a VMSS. |
Core | Preview |
| az vmss lifecycle-hook remove |
Remove one lifecycle hook (--type) or all lifecycle hooks (--all) from a VMSS. |
Core | Preview |
| az vmss lifecycle-hook show |
Show the details of a lifecycle hook on a VMSS. |
Core | Preview |
| az vmss lifecycle-hook update |
Update an existing lifecycle hook on a VMSS. |
Core | Preview |
az vmss lifecycle-hook add
Command group 'vmss lifecycle-hook' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a lifecycle hook to a VMSS.
az vmss lifecycle-hook add --resource-group
--type {UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling}
--vmss-name
[--acquire-policy-token]
[--change-reference]
[--default-action {Approve, Reject}]
[--no-wait]
[--wait-duration]
Examples
Add an UpgradeAutoOSScheduling hook with an 8 hour wait.
az vmss lifecycle-hook add -g MyRg --vmss-name MyVmss --type UpgradeAutoOSScheduling --wait-duration PT8H
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Specifies the type of the lifecycle hook.
| Property | Value |
|---|---|
| Accepted values: | UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling |
The name of the VM scale set.
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 |
Specifies the action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.
| Property | Value |
|---|---|
| Accepted values: | Approve, Reject |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Specifies the time duration a virtual machine scale set lifecycle hook event sent to the customer waits for a response from the customer. It should be in ISO 8601 format.
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 list
Command group 'vmss lifecycle-hook' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List all lifecycle hooks on a VMSS.
az vmss lifecycle-hook list --resource-group
--vmss-name
Examples
List hooks.
az vmss lifecycle-hook list -g MyRg --vmss-name MyVmss
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 remove
Command group 'vmss lifecycle-hook' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Remove one lifecycle hook (--type) or all lifecycle hooks (--all) from a VMSS.
az vmss lifecycle-hook remove --resource-group
--vmss-name
[--acquire-policy-token]
[--all]
[--change-reference]
[--no-wait]
[--type {UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling}]
Examples
Remove one hook type.
az vmss lifecycle-hook remove -g MyRg --vmss-name MyVmss --type UpgradeAutoOSScheduling
Remove all hooks.
az vmss lifecycle-hook remove -g MyRg --vmss-name MyVmss --all
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.
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 |
Remove all lifecycle hooks. Mutually exclusive with --type.
| Property | Value |
|---|---|
| Default value: | False |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Specifies the type of the lifecycle hook. Mutually exclusive with --all.
| Property | Value |
|---|---|
| Accepted values: | UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling |
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 show
Command group 'vmss lifecycle-hook' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show the details of a lifecycle hook on a VMSS.
az vmss lifecycle-hook show --resource-group
--type {UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling}
--vmss-name
Examples
Show a hook by type.
az vmss lifecycle-hook show -g MyRg --vmss-name MyVmss --type UpgradeAutoOSScheduling
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Specifies the type of the lifecycle hook.
| Property | Value |
|---|---|
| Accepted values: | UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling |
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 update
Command group 'vmss lifecycle-hook' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update an existing lifecycle hook on a VMSS.
az vmss lifecycle-hook update --resource-group
--type {UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling}
--vmss-name
[--acquire-policy-token]
[--change-reference]
[--default-action {Approve, Reject}]
[--no-wait]
[--wait-duration]
Examples
Change the wait duration of a hook.
az vmss lifecycle-hook update -g MyRg --vmss-name MyVmss --type UpgradeAutoOSScheduling --wait-duration PT2H
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Specifies the type of the lifecycle hook.
| Property | Value |
|---|---|
| Accepted values: | UpgradeAutoOSRollingBatchStarting, UpgradeAutoOSScheduling |
The name of the VM scale set.
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 |
Specifies the action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.
| Property | Value |
|---|---|
| Accepted values: | Approve, Reject |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Specifies the time duration a virtual machine scale set lifecycle hook event sent to the customer waits for a response from the customer. It should be in ISO 8601 format.
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 |