Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

[Backup] Strongly typed policy create/update commands #4504

Open tjprescott opened 7 years ago

tjprescott commented 7 years ago

Looking at the structure of the backup policy object, it seems like a strongly typed create/update command could be created for this scenario.

There are no collections of complex objects, which is typically the reason that JSON objects are used. As far as I can tell, there are only single (albeit polymorphic) objects and some simple collections that could easily be handled with nargs='+'.

A true create/update experience would be preferable to a JSON object set experience as policies could be configured in the script rather than JSON files needing to be saved as artifacts. It would also allow for simple updating of existing policies without have to download, modify, save and re-set it.


Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: WGET

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: azure-cli (2.0.17+dev)

acr (2.0.11+dev) acs (2.0.15+dev) appservice (0.1.16+dev) backup (1.0.0+dev) batch (3.1.3+dev) billing (0.1.4+dev) cdn (0.0.8+dev) cloud (2.0.7+dev) cognitiveservices (0.1.7+dev) command-modules-nspkg (2.0.1+dev) component (2.0.7+dev) configure (2.0.10+dev) consumption (0.1.4+dev) container (0.1.10+dev) core (2.0.16+dev) cosmosdb (0.1.12+dev) dla (0.0.11+dev) dls (0.0.13+dev) eventgrid (0.1.3+dev) extension (0.0.2+dev) feedback (2.0.6+dev) find (0.2.6+dev) interactive (0.3.9+dev) iot (0.1.11+dev) keyvault (2.0.10+dev) lab (0.0.10+dev) monitor (0.0.9+dev) network (2.0.14+dev) nspkg (3.0.1+dev) profile (2.0.12+dev) rdbms (0.0.6+dev) redis (0.2.8+dev) resource (2.0.14+dev) role (2.0.11+dev) servicefabric (0.0.3+dev) sql (2.0.11+dev) storage (2.0.15+dev) vm (2.0.14+dev)

OS Version: What OS and version are you using?
Answer here: WSL

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: Bash on Windows

pvrk commented 6 years ago

Need more information on how does the new command look like with this recommendation. @tjprescott : Can you please help us out here? You can email us or we can discuss this over a short skype call

pvrk commented 5 years ago

Will design the new commands after the SDKs get finalized. This may take some time, Q4, CY, 2019 i,e., between Nov-Dec, 2019