@@ -146,3 +146,59 @@ Create a flow log on a network security group.
146146 ` ` ` bash
147147 network watcher flow-log create --location westus --resource-group MtRGContainingVNet --name MyVNetName-flowlog --vnet MyVNetName --storage-account MyStorageAccountName --filtering-criteria " dstip=20.252.145.59 || DstPort=443"
148148 ` ` `
149+
150+ # ## [2025-03-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt3YXRjaGVycy97fS9mbG93bG9ncy97fQ==/2025-03-01.xml) **Stable**
151+
152+ < ! -- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-03-01 -->
153+
154+ # ### examples
155+
156+ - Create a flow log with Network Security Group name
157+ ` ` ` bash
158+ network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --nsg MyNetworkSecurityGroupName --storage-account account
159+ ` ` `
160+
161+ - Create a flow log with VNet name
162+ ` ` ` bash
163+ network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --vnet MyVNetName --storage-account account
164+ ` ` `
165+
166+ - Create a flow log with Subnet name
167+ ` ` ` bash
168+ network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --vnet MyVNetName --subnet MySubnetName --storage-account account
169+ ` ` `
170+
171+ - Create a flow log with NIC name
172+ ` ` ` bash
173+ network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --nic MyNICName --storage-account account
174+ ` ` `
175+
176+ - Create a flow log with Network Security Group ID (could be in other resource group)
177+ ` ` ` bash
178+ network watcher flow-log create --location westus --name MyFlowLog --nsg MyNetworkSecurityGroupID --storage-account account
179+ ` ` `
180+
181+ - Create a flow log with Virtual Network ID (could be in other resource group)
182+ ` ` ` bash
183+ network watcher flow-log create --location westus --name MyFlowLog --vnet MyVNetID --storage-account account
184+ ` ` `
185+
186+ - Create a flow log with Subnet ID (could be in other resource group)
187+ ` ` ` bash
188+ network watcher flow-log create --location westus --name MyFlowLog --subnet SubnetID --storage-account account
189+ ` ` `
190+
191+ - Create a flow log with Network Interface ID (could be in other resource group)
192+ ` ` ` bash
193+ network watcher flow-log create --location westus --name MyFlowLog --nic MyNetworkInterfaceID --storage-account account
194+ ` ` `
195+
196+ - Create or update flow log
197+ ` ` ` bash
198+ network watcher flow-log create --location westus --resource-group MtRGContainingVNet --name MyVNetName-flowlog --vnet MyVNetName --storage-account MyStorageAccountName --filtering-criteria " dstip=20.252.145.59 || DstPort=443"
199+ ` ` `
200+
201+ - Create flow log with recordtypes filtering
202+ ` ` ` bash
203+ network watcher flow-log create --resource-group rg1 --network-watcher-name nw1 --name fl --location centraluseuap --target-resource-id /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg --storage-account /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe --filtering-criteria srcIP=158.255.7.8 || dstPort=56891 --record-types B,E --enabled True --format JSON --log-version 1 --identity " {type:UserAssigned,user-assigned-identities:{/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1:{}}}"
204+ ` ` `
0 commit comments