Microsoft.Network networkWatchers/flowLogs 2019-11-01

Template format

To create a Microsoft.Network/networkWatchers/flowLogs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Network/networkWatchers/flowLogs",
  "apiVersion": "2019-11-01",
  "location": "string",
  "tags": {},
  "properties": {
    "targetResourceId": "string",
    "storageId": "string",
    "enabled": "boolean",
    "retentionPolicy": {
      "days": "integer",
      "enabled": "boolean"
    },
    "format": {
      "type": "JSON",
      "version": "integer"
    },
    "flowAnalyticsConfiguration": {
      "networkWatcherFlowAnalyticsConfiguration": {
        "enabled": "boolean",
        "workspaceId": "string",
        "workspaceRegion": "string",
        "workspaceResourceId": "string",
        "trafficAnalyticsInterval": "integer"
      }
    }
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Network/networkWatchers/flowLogs object

Name Type Required Value
name string Yes The name of the flow log.
type enum Yes flowLogs
-or-
Microsoft.Network/networkWatchers/flowLogs

See Set name and type for child resources.
apiVersion enum Yes 2019-11-01
location string Yes Resource location.
tags object No Resource tags.
properties object Yes Properties of the flow log. - FlowLogPropertiesFormat object

FlowLogPropertiesFormat object

Name Type Required Value
targetResourceId string Yes ID of network security group to which flow log will be applied.
storageId string Yes ID of the storage account which is used to store the flow log.
enabled boolean No Flag to enable/disable flow logging.
retentionPolicy object No Parameters that define the retention policy for flow log. - RetentionPolicyParameters object
format object No Parameters that define the flow log format. - FlowLogFormatParameters object
flowAnalyticsConfiguration object No Parameters that define the configuration of traffic analytics. - TrafficAnalyticsProperties object

RetentionPolicyParameters object

Name Type Required Value
days integer No Number of days to retain flow log records.
enabled boolean No Flag to enable/disable retention.

FlowLogFormatParameters object

Name Type Required Value
type enum No The file type of flow log. - JSON
version integer No The version (revision) of the flow log.

TrafficAnalyticsProperties object

Name Type Required Value
networkWatcherFlowAnalyticsConfiguration object No Parameters that define the configuration of traffic analytics. - TrafficAnalyticsConfigurationProperties object

TrafficAnalyticsConfigurationProperties object

Name Type Required Value
enabled boolean No Flag to enable/disable traffic analytics.
workspaceId string No The resource guid of the attached workspace.
workspaceRegion string No The location of the attached workspace.
workspaceResourceId string No Resource Id of the attached workspace.
trafficAnalyticsInterval integer No The interval in minutes which would decide how frequently TA service should do flow analytics.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Enable NSG Flow Logs

Deploy to Azure
This template create an NSG Flow Logs resource