Need to add validation to packet capture, connectivity check and connection monitor
Is your feature request related to a problem? Please describe. A lot of exception came when customer try to create new packet capture if packet capture already exists (resource with the same name). Would be great if before making a call we could validate packet capture name. For this we could try to get packet capture, and proceed to "create" call only if "get" returns null.
Another problem occurs when customer tries to test connectivity or create connection monitor for not existing source. So, before making call, would be great to validate if source exists.
Also, customers often try to test connectivity and create connection monitor for the same source and destination which cause an exception.
Describe the solution you'd like
- az network watcher packet-capture create. Need to validate if the packet capture with the same name already exists.
- az network watcher test-connectivity --source-resource [--dest-address] [--dest-port] [--dest-resource] [--headers] [--method {Get}] [--protocol {Http, Https, Icmp, Tcp}] [--resource-group] [--source-port] [--valid-status-codes]. Validate if source-resource exists. Validate if source != destination.
- az network watcher connection-monitor create --name --source-resource [--dest-address] [--dest-port] [--dest-resource] [--do-not-start] [--monitoring-interval] [--resource-group] [--source-port] [--tags]. Validate if source-resource exists. Validate if source != destination
Describe alternatives you've considered
Additional context
The service error is the appropriate behavior from the CLI's perspective and is wasteful of customer API quota, so we do not plan to implement this.