Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Aaz changes for supporting filtering in network watcher flowlogs] #651

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Commands/network/watcher/flow-log/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,49 @@ Create a flow log on a network security group.
```bash
network watcher flow-log create --location westus --name MyFlowLog --nic MyNetworkInterfaceID --storage-account account
```

### [2024-03-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt3YXRjaGVycy97fS9mbG93bG9ncy97fQ==/2024-03-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2024-03-01 -->

#### examples

- Create a flow log with Network Security Group name
```bash
network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --nsg MyNetworkSecurityGroupName --storage-account account
```

- Create a flow log with VNet name
```bash
network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --vnet MyVNetName --storage-account account
```

- Create a flow log with Subnet name
```bash
network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --vnet MyVNetName --subnet MySubnetName --storage-account account
```

- Create a flow log with NIC name
```bash
network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --nic MyNICName --storage-account account
```

- Create a flow log with Network Security Group ID (could be in other resource group)
```bash
network watcher flow-log create --location westus --name MyFlowLog --nsg MyNetworkSecurityGroupID --storage-account account
```

- Create a flow log with Virtual Network ID (could be in other resource group)
```bash
network watcher flow-log create --location westus --name MyFlowLog --vnet MyVNetID --storage-account account
```

- Create a flow log with Subnet ID (could be in other resource group)
```bash
network watcher flow-log create --location westus --name MyFlowLog --subnet SubnetID --storage-account account
```

- Create a flow log with Network Interface ID (could be in other resource group)
```bash
network watcher flow-log create --location westus --name MyFlowLog --nic MyNetworkInterfaceID --storage-account account
```
11 changes: 11 additions & 0 deletions Commands/network/watcher/flow-log/_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@ Delete the specified flow log resource.
```bash
network watcher flow-log delete --location westus2 --name MyFlowLogger
```

### [2024-03-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt3YXRjaGVycy97fS9mbG93bG9ncy97fQ==/2024-03-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2024-03-01 -->

#### examples

- Delete the specified flow log resource.
```bash
network watcher flow-log delete --location westus2 --name MyFlowLogger
```
16 changes: 16 additions & 0 deletions Commands/network/watcher/flow-log/_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,19 @@ Get the flow log configuration of a network security group.
```bash
network watcher flow-log show --location MyNetworkWatcher --name MyFlowLog
```

### [2024-03-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt3YXRjaGVycy97fS9mbG93bG9ncy97fQ==/2024-03-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2024-03-01 -->

#### examples

- Show NSG flow logs.
```bash
network watcher flow-log show -g MyResourceGroup --nsg MyNsg
```

- Show NSG flow logs with Azure Resource Management formatted.
```bash
network watcher flow-log show --location MyNetworkWatcher --name MyFlowLog
```
41 changes: 41 additions & 0 deletions Commands/network/watcher/flow-log/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,44 @@ Update the flow log configuration of a network security group.
```bash
network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --workspace MyAnotherLogAnalyticWorkspace
```

### [2024-03-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt3YXRjaGVycy97fS9mbG93bG9ncy97fQ==/2024-03-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2024-03-01 -->

#### examples

- Update storage account with name to let resource group identify the storage account and network watcher
```bash
network watcher flow-log update --location westus --resource-group MyResourceGroup --name MyFlowLog --storage-account accountname
```

- Update storage account with ID to let location identify the network watcher
```bash
network watcher flow-log update --location westus --resource-group MyResourceGroup --name MyFlowLog --storage-account accountid
```

- Update Network Security Group on another resource group
```bash
network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --nsg MyNSG
```

- Update Virtual Network on another resource group
```bash
network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --vnet MyVNet
```

- Update Subnet on another resource group
```bash
network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --vnet MyVNet --subnet MySubnet
```

- Update Network Interface on another resource group
```bash
network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --nic MyNIC
```

- Update Workspace on another resource group
```bash
network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --workspace MyAnotherLogAnalyticWorkspace
```
156 changes: 156 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -149551,6 +149551,66 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --nsg MyNetworkSecurityGroupName --storage-account account"
],
"name": "Create a flow log with Network Security Group name"
},
{
"commands": [
"network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --vnet MyVNetName --storage-account account"
],
"name": "Create a flow log with VNet name"
},
{
"commands": [
"network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --vnet MyVNetName --subnet MySubnetName --storage-account account"
],
"name": "Create a flow log with Subnet name"
},
{
"commands": [
"network watcher flow-log create --location westus --resource-group MyResourceGroup --name MyFlowLog --nic MyNICName --storage-account account"
],
"name": "Create a flow log with NIC name"
},
{
"commands": [
"network watcher flow-log create --location westus --name MyFlowLog --nsg MyNetworkSecurityGroupID --storage-account account"
],
"name": "Create a flow log with Network Security Group ID (could be in other resource group)"
},
{
"commands": [
"network watcher flow-log create --location westus --name MyFlowLog --vnet MyVNetID --storage-account account"
],
"name": "Create a flow log with Virtual Network ID (could be in other resource group)"
},
{
"commands": [
"network watcher flow-log create --location westus --name MyFlowLog --subnet SubnetID --storage-account account"
],
"name": "Create a flow log with Subnet ID (could be in other resource group)"
},
{
"commands": [
"network watcher flow-log create --location westus --name MyFlowLog --nic MyNetworkInterfaceID --storage-account account"
],
"name": "Create a flow log with Network Interface ID (could be in other resource group)"
}
],
"name": "2024-03-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{}",
"plane": "mgmt-plane",
"version": "2024-03-01"
}
]
}
]
},
Expand Down Expand Up @@ -149600,6 +149660,24 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network watcher flow-log delete --location westus2 --name MyFlowLogger"
],
"name": "Delete the specified flow log resource."
}
],
"name": "2024-03-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{}",
"plane": "mgmt-plane",
"version": "2024-03-01"
}
]
}
]
},
Expand Down Expand Up @@ -149692,6 +149770,30 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network watcher flow-log show -g MyResourceGroup --nsg MyNsg"
],
"name": "Show NSG flow logs."
},
{
"commands": [
"network watcher flow-log show --location MyNetworkWatcher --name MyFlowLog"
],
"name": "Show NSG flow logs with Azure Resource Management formatted."
}
],
"name": "2024-03-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{}",
"plane": "mgmt-plane",
"version": "2024-03-01"
}
]
}
]
},
Expand Down Expand Up @@ -149813,6 +149915,60 @@
"version": "2023-11-01"
}
]
},
{
"examples": [
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyResourceGroup --name MyFlowLog --storage-account accountname"
],
"name": "Update storage account with name to let resource group identify the storage account and network watcher"
},
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyResourceGroup --name MyFlowLog --storage-account accountid"
],
"name": "Update storage account with ID to let location identify the network watcher"
},
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --nsg MyNSG"
],
"name": "Update Network Security Group on another resource group"
},
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --vnet MyVNet"
],
"name": "Update Virtual Network on another resource group"
},
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --vnet MyVNet --subnet MySubnet"
],
"name": "Update Subnet on another resource group"
},
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --nic MyNIC"
],
"name": "Update Network Interface on another resource group"
},
{
"commands": [
"network watcher flow-log update --location westus --resource-group MyAnotherResourceGroup --name MyFlowLog --workspace MyAnotherLogAnalyticWorkspace"
],
"name": "Update Workspace on another resource group"
}
],
"name": "2024-03-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{}",
"plane": "mgmt-plane",
"version": "2024-03-01"
}
]
}
]
}
Expand Down

Large diffs are not rendered by default.

Loading
Loading