Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/azure-cli/azure/cli/command_modules/vm/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4085,12 +4085,19 @@ def update_vmss(cmd, resource_group_name, name, license_type=None, no_wait=False
if not vmss.protection_policy:
vmss.protection_policy = VMProtectionPolicy()

if protect_from_scale_in is not None:
vmss.protection_policy.protect_from_scale_in = protect_from_scale_in

if protect_from_scale_set_actions is not None:
vmss.protection_policy.protect_from_scale_set_actions = protect_from_scale_set_actions

if protect_from_scale_in is not None:
vmss.protection_policy.protect_from_scale_in = protect_from_scale_in
VirtualMachineScaleSetVM = cmd.get_models('VirtualMachineScaleSetVM')
kwargs['parameters'] = VirtualMachineScaleSetVM(protection_policy=kwargs['parameters'].protection_policy,
location=kwargs['parameters'].location,
license_type=kwargs['parameters'].license_type,
user_data=kwargs['parameters'].user_data)
return sdk_no_wait(no_wait, client.virtual_machine_scale_set_vms.begin_update,
resource_group_name, name, instance_id, **kwargs)

return sdk_no_wait(no_wait, client.virtual_machine_scale_set_vms.begin_update,
resource_group_name, name, instance_id, **kwargs)

Expand Down
Loading