Closed irrogozh closed 4 years ago
add to S166.
@irrogozh Is there min API version restricted?
@irrogozh Besides, I think it's possible to merge the response of GET call return into the previous response of POST call. It takes care of backward compatibility, meanwhile supporting new response content without breaking user experience.
What do you think?
@haroldrandom, it's a good idea as a temporary approach. But I don't think it's going to work in a long run. The reason is that
I start thinking that we will need 'update' cmdlet as well like it is done in CLI for other resources.
About your question on min API version. Corresponding API were added into swagger for 2019-11-01 version. But on the backend PUT/GET/DELETE calls will work for any early version.
Sync decision from Teams discussion: we decided not to mess up the output of current show
command (via HTTP POST call).
Instead, we decided to:
--arm
to let user explicitly give us instruction that they want new formatted output of what ARM returns (via HTTP GET call). The default value is ‘false’ for now.show
command to warn user that the current output format will be changed.--arm
option to warn user that the default value of this parameter will be changed from false to true. Such that user don't have to provide this parameter since show command will supports HTTP GET call only (ARM) by then.configure
commandsIn this feature, we will implement new commands CREATE/DELETE/UPDATE and refactor SHOW command.
Sorry, I found --arm is not necessary, new API GET call requires watcher_name and flow_log_name, that's already enough.
FlowLog feature was created around 3 years ago. It allows customer to view information about ingress and egress IP traffic through an NSG. It used to be a proxy child resource of NetworkWatcher. Customer could enable/disable it using POST ConfigureFlowLog call. The problem with this approach was that customers couldn’t deploy flowLogs through template and couldn’t easily track and update them.
So, it was decided to make flowLog a tracked ARM resource and add PUT/GET/DELETE operations.
Now we need to add corresponding cmdlets for CREATE/GET and DELETE
Parameters for CREATE cmdlet should be the same as for this cmdlet: https://docs.microsoft.com/en-us/cli/azure/network/watcher/flow-log?view=azure-cli-latest#az-network-watcher-flow-log-configure
Here is documentation on existing cmdlets (for POST calls): https://docs.microsoft.com/en-us/cli/azure/network/watcher/flow-log?view=azure-cli-latest
Swagger link: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/Microsoft.Network/stable/2019-11-01/networkWatcher.json
Starting from: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}": {
And here is an example for PUT operation: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkWatcherFlowLogCreate.json
ETA
First half of March
Additional context
az network watcher flow-log show
cmdlet. Right now on the backend it makes a POST call and returns this object:In a new cmdlet for GET call we need it to return