Skip to content
Open
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
56 changes: 56 additions & 0 deletions Commands/network/watcher/flow-log/_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,59 @@ Create a flow log on a network security group.
```bash
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"
```

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-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
```

- Create or update flow log
```bash
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"
```

- Create or update flow log with recordtypes
```bash
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:{}}}"
```
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 @@ -36,3 +36,14 @@ Delete the specified flow log resource.
```bash
network watcher flow-log delete --location westus2 --name MyFlowLogger
```

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

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

#### examples

- Delete the specified flow log resource.
```bash
network watcher flow-log delete --location westus2 --name MyFlowLogger
```
11 changes: 11 additions & 0 deletions Commands/network/watcher/flow-log/_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@ List all flow log resources for the specified Network Watcher.
```bash
network watcher flow-log list --location westus2
```

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

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

#### examples

- List all flow log resources for the specified Network Watcher.
```bash
network watcher flow-log list --location westus2
```
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 @@ -51,3 +51,19 @@ Get the flow log configuration of a network security group.
```bash
network watcher flow-log show --location MyNetworkWatcher --name MyFlowLog
```

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-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
```
46 changes: 46 additions & 0 deletions Commands/network/watcher/flow-log/_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,49 @@ 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
```

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-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
```

- Create or update flow log
```bash
network watcher flow-log update --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:{}}}"
```
9 changes: 9 additions & 0 deletions Commands/network/watcher/flow-log/identity/_assign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _network watcher flow-log identity assign_

Assign the user or system managed identities.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-03-01 identity -->
9 changes: 9 additions & 0 deletions Commands/network/watcher/flow-log/identity/_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _network watcher flow-log identity remove_

Remove the user or system managed identities.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-03-01 identity -->
9 changes: 9 additions & 0 deletions Commands/network/watcher/flow-log/identity/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _network watcher flow-log identity show_

Show the details of managed identities.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs/{} 2025-03-01 identity -->
14 changes: 14 additions & 0 deletions Commands/network/watcher/flow-log/identity/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# [Group] _network watcher flow-log identity_

Manage Identity

## Commands

- [assign](/Commands/network/watcher/flow-log/identity/_assign.md)
: Assign the user or system managed identities.

- [remove](/Commands/network/watcher/flow-log/identity/_remove.md)
: Remove the user or system managed identities.

- [show](/Commands/network/watcher/flow-log/identity/_show.md)
: Show the details of managed identities.
5 changes: 5 additions & 0 deletions Commands/network/watcher/flow-log/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Manage network security group flow logging.

For more information about configuring flow logs visit https://learn.microsoft.com/azure/network-watcher/network-watcher-nsg-flow-logging-cli.

## Subgroups

- [identity](/Commands/network/watcher/flow-log/identity/readme.md)
: Manage Identity

## Commands

- [configure-flow-log](/Commands/network/watcher/flow-log/_configure-flow-log.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs", "version": "2025-03-01", "swagger": "mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrV2F0Y2hlcnMve25ldHdvcmtXYXRjaGVyTmFtZX0vZmxvd0xvZ3M=/V/MjAyNS0wMy0wMQ=="}], "commandGroups": [{"name": "network watcher flow-log", "commands": [{"name": "list", "version": "2025-03-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkwatchers/{}/flowlogs", "version": "2025-03-01", "swagger": "mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrV2F0Y2hlcnMve25ldHdvcmtXYXRjaGVyTmFtZX0vZmxvd0xvZ3M=/V/MjAyNS0wMy0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.networkWatcherName", "options": ["network-watcher-name"], "required": true, "idPart": "name", "help": {"short": "The name of the Network Watcher resource."}}, {"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}]}], "operations": [{"operationId": "FlowLogs_List", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs", "request": {"method": "get", "path": {"params": [{"type": "string", "name": "networkWatcherName", "arg": "$Path.networkWatcherName", "required": true}, {"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2025-03-01"}, "type": "string", "name": "api-version", "required": true}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "nextLink"}, {"type": "array<object>", "name": "value", "item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "etag"}, {"type": "ResourceId", "name": "id", "format": {"template": "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Network/networkWatchers/{}/flowLogs/{}"}}, {"type": "IdentityObject", "name": "identity", "props": [{"readOnly": true, "type": "string", "name": "principalId"}, {"readOnly": true, "type": "string", "name": "tenantId"}, {"type": "string", "name": "type", "enum": {"items": [{"value": "None"}, {"value": "SystemAssigned"}, {"value": "SystemAssigned, UserAssigned"}, {"value": "UserAssigned"}]}}, {"type": "object", "name": "userAssignedIdentities", "additionalProps": {"item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "clientId"}, {"readOnly": true, "type": "string", "name": "principalId"}]}}}]}, {"type": "ResourceLocation", "name": "location"}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "props": [{"type": "boolean", "name": "enabled"}, {"type": "string", "name": "enabledFilteringCriteria"}, {"type": "object", "name": "flowAnalyticsConfiguration", "props": [{"type": "object", "name": "networkWatcherFlowAnalyticsConfiguration", "props": [{"type": "boolean", "name": "enabled"}, {"type": "integer32", "name": "trafficAnalyticsInterval"}, {"type": "string", "name": "workspaceId"}, {"type": "string", "name": "workspaceRegion"}, {"type": "string", "name": "workspaceResourceId"}]}]}, {"type": "object", "name": "format", "props": [{"type": "string", "name": "type", "enum": {"items": [{"value": "JSON"}]}}, {"default": {"value": 0}, "type": "integer32", "name": "version"}]}, {"readOnly": true, "type": "string", "name": "provisioningState", "enum": {"items": [{"value": "Deleting"}, {"value": "Failed"}, {"value": "Succeeded"}, {"value": "Updating"}]}}, {"type": "string", "name": "recordTypes"}, {"type": "object", "name": "retentionPolicy", "props": [{"default": {"value": 0}, "type": "integer32", "name": "days"}, {"default": {"value": false}, "type": "boolean", "name": "enabled"}]}, {"type": "string", "name": "storageId", "required": true}, {"readOnly": true, "type": "string", "name": "targetResourceGuid"}, {"type": "string", "name": "targetResourceId", "required": true}], "clientFlatten": true}, {"type": "object", "name": "tags", "additionalProps": {"item": {"type": "string"}}}, {"readOnly": true, "type": "string", "name": "type"}]}}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "outputs": [{"type": "array", "ref": "$Instance.value", "clientFlatten": true, "nextLink": "$Instance.nextLink"}], "confirmation": ""}]}]}
Loading