tayganr / purviewcli

Microsoft Purview CLI
https://aka.ms/purviewcli
MIT License
48 stars 27 forks source link

`pv scan createScan` command should be implemented #3

Closed nakazax closed 3 years ago

nakazax commented 3 years ago

It is more convenient to have a command pv scan createScan to copy scans between Purview accounts.

th0ger commented 3 years ago

Agree, there's not much meaning for me to create datasource via CLI, if I can't create scans. Seem like an obvious miss.

th0ger commented 3 years ago

Here is the related endpoint definition https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scans/createorupdate

tayganr commented 3 years ago

Thanks @nakazax and @th0ger. Just updated purviewcli (0.1.15) to align with the recent documentation on the Scanning Data Plane. Please see updated scan notebook which includes a section on Scans.

Example command to create or update a scan pv scan putScan --dataSourceName "DataSource2" --scanName "myScan" --payload-file "C:\Users\tarifat\Downloads\purviewcli\samples\json\scan.json"

nakazax commented 3 years ago

Sorry for delayed comments in closed issue, but I've confirmed that pv scan putScan and some other commands work correctly with the purviewcli 0.1.17. And thanks to your fix, I've been able to create the following migration helper scripts for Purview. Thank you so much 😊 https://github.com/nakazax/purview-migration-helper