Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
374 stars 1.16k forks source link

automation software-update-configuration --included-update-classifications multi choices not support #5822

Open redliu312 opened 1 year ago

redliu312 commented 1 year ago

Related command

 az automation software-update-configuration create --automation-account-name automation-p1beta \
                                                   --configuration-name devsl_test_2 \
                                                   --frequency OneTime \
                                                   --interval 0 \
                                                   --operating-system Windows \
                                                   --resource-group automation-p1beta \
                                                   --included-update-classifications "Critical,Security" \
                                                   --azure-virtual-machines  "xxxx" \
                                                   --reboot-setting Never \
                                                   --start-time "2023-01-30T18:08:00+08:00"

Extension name (the extension in question)

automation

Description of issue (in as much detail as possible)


Hi , teams I am trying to do a windows virtual machine "windows update" with the automation account feature. It is fine on the portal and we can choose multiple "included-update-classifications" , for ex: "Critical,Security".

But when we execute the az cli command to do so, It seems like we can not select multi values for this args. If we execute the command which I paste in this thread, it will throw

az automation software-update-configuration create: 'Critical,Security' is not a valid value for '--included-update-classifications'. Allowed values: Unclassified, Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates.

but in th doc

--included-update-classifications

Update classification included in the software update configuration. A comma separated string with required values.
accepted values: Critical, Definition, FeaturePack, Security, ServicePack, Tools, Unclassified, UpdateRollup, Updates

it said we can use the comma separated string as the multi-choice.

Need you support on this : How could we select multi classifications in the az cli command line?

ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

RakeshMohanMSFT commented 1 year ago

@redliu312 Thank you for reaching out, we are looking into it.

yonzhan commented 1 year ago

route to CXP team

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jaspkaur28.

Issue Details
- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues) ### Related command ``` az automation software-update-configuration create --automation-account-name automation-p1beta \ --configuration-name devsl_test_2 \ --frequency OneTime \ --interval 0 \ --operating-system Windows \ --resource-group automation-p1beta \ --included-update-classifications "Critical,Security" \ --azure-virtual-machines "xxxx" \ --reboot-setting Never \ --start-time "2023-01-30T18:08:00+08:00" ``` ### Extension name (the extension in question) automation ### Description of issue (in as much detail as possible) ----- Hi , teams I am trying to do a windows virtual machine "windows update" with the automation account feature. It is fine on the portal and we can choose multiple "included-update-classifications" , for ex: "Critical,Security". But when we execute the az cli command to do so, It seems like we can not select multi values for this args. If we execute the command which I paste in this thread, it will throw ``` az automation software-update-configuration create: 'Critical,Security' is not a valid value for '--included-update-classifications'. Allowed values: Unclassified, Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates. ``` but in th [doc](https://learn.microsoft.com/en-us/cli/azure/automation/software-update-configuration?view=azure-cli-latest#az- automation-software-update-configuration-create) ``` --included-update-classifications Update classification included in the software update configuration. A comma separated string with required values. accepted values: Critical, Definition, FeaturePack, Security, ServicePack, Tools, Unclassified, UpdateRollup, Updates ``` it said we can use the comma separated string as the multi-choice. Need you support on this : How could we select multi classifications in the az cli command line?
Author: redliu312
Assignees: -
Labels: `question`, `customer-reported`, `Automation`, `Service Attention`
Milestone: -
jaspkaur28 commented 1 year ago

Tagging the right team @riva-yadav for Update management queries.

iTiamo commented 1 year ago

Additionally, specifying only one update classification will result in the following error message:

(BadRequest) {"Message":"The request is invalid.","ModelState":{"softwareUpdateConfiguration.properties.updateConfiguration":["Software update configuration should specify Classification or IncludedPackageNameMask for any reboot setting other than 'RebootOnly'."]}}
Code: BadRequest
Message: {"Message":"The request is invalid.","ModelState":{"softwareUpdateConfiguration.properties.updateConfiguration":["Software update configuration should specify Classification or IncludedPackageNameMask for any reboot setting other than 'RebootOnly'."]}}

Full command I used:

az automation software-update-configuration create --automation-account-name <AUTOMATION_ACCOUNT> --configuration-name WeeklyUpdates --frequency Week --interval 1 --operating-system Linux --resource-group <RESOURCE_GROUP> --included-update-classifications Critical --azure-virtual-machines <VIRTUAL_MACHINE_ID>

For now, since this command is unusable, we can use Azure PowerShell to create this software update configuration.