1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. NetworkWatcherFlowLog

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

azure.network.NetworkWatcherFlowLog

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

    Import

    Network Watcher Flow Logs can be imported using the resource id, e.g.

     $ pulumi import azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog watcher1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/flowLogs/log1
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Location = "West Europe",
        });
    
        var testNetworkSecurityGroup = new Azure.Network.NetworkSecurityGroup("testNetworkSecurityGroup", new()
        {
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var testNetworkWatcher = new Azure.Network.NetworkWatcher("testNetworkWatcher", new()
        {
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var testAccount = new Azure.Storage.Account("testAccount", new()
        {
            ResourceGroupName = example.Name,
            Location = example.Location,
            AccountTier = "Standard",
            AccountKind = "StorageV2",
            AccountReplicationType = "LRS",
            EnableHttpsTrafficOnly = true,
        });
    
        var testAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("testAnalyticsWorkspace", new()
        {
            Location = example.Location,
            ResourceGroupName = example.Name,
            Sku = "PerGB2018",
        });
    
        var testNetworkWatcherFlowLog = new Azure.Network.NetworkWatcherFlowLog("testNetworkWatcherFlowLog", new()
        {
            NetworkWatcherName = testNetworkWatcher.Name,
            ResourceGroupName = example.Name,
            NetworkSecurityGroupId = testNetworkSecurityGroup.Id,
            StorageAccountId = testAccount.Id,
            Enabled = true,
            RetentionPolicy = new Azure.Network.Inputs.NetworkWatcherFlowLogRetentionPolicyArgs
            {
                Enabled = true,
                Days = 7,
            },
            TrafficAnalytics = new Azure.Network.Inputs.NetworkWatcherFlowLogTrafficAnalyticsArgs
            {
                Enabled = true,
                WorkspaceId = testAnalyticsWorkspace.WorkspaceId,
                WorkspaceRegion = testAnalyticsWorkspace.Location,
                WorkspaceResourceId = testAnalyticsWorkspace.Id,
                IntervalInMinutes = 10,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		testNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "testNetworkSecurityGroup", &network.NetworkSecurityGroupArgs{
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		testNetworkWatcher, err := network.NewNetworkWatcher(ctx, "testNetworkWatcher", &network.NetworkWatcherArgs{
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		testAccount, err := storage.NewAccount(ctx, "testAccount", &storage.AccountArgs{
    			ResourceGroupName:      example.Name,
    			Location:               example.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountKind:            pulumi.String("StorageV2"),
    			AccountReplicationType: pulumi.String("LRS"),
    			EnableHttpsTrafficOnly: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		testAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "testAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Sku:               pulumi.String("PerGB2018"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkWatcherFlowLog(ctx, "testNetworkWatcherFlowLog", &network.NetworkWatcherFlowLogArgs{
    			NetworkWatcherName:     testNetworkWatcher.Name,
    			ResourceGroupName:      example.Name,
    			NetworkSecurityGroupId: testNetworkSecurityGroup.ID(),
    			StorageAccountId:       testAccount.ID(),
    			Enabled:                pulumi.Bool(true),
    			RetentionPolicy: &network.NetworkWatcherFlowLogRetentionPolicyArgs{
    				Enabled: pulumi.Bool(true),
    				Days:    pulumi.Int(7),
    			},
    			TrafficAnalytics: &network.NetworkWatcherFlowLogTrafficAnalyticsArgs{
    				Enabled:             pulumi.Bool(true),
    				WorkspaceId:         testAnalyticsWorkspace.WorkspaceId,
    				WorkspaceRegion:     testAnalyticsWorkspace.Location,
    				WorkspaceResourceId: testAnalyticsWorkspace.ID(),
    				IntervalInMinutes:   pulumi.Int(10),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.NetworkSecurityGroup;
    import com.pulumi.azure.network.NetworkSecurityGroupArgs;
    import com.pulumi.azure.network.NetworkWatcher;
    import com.pulumi.azure.network.NetworkWatcherArgs;
    import com.pulumi.azure.storage.Account;
    import com.pulumi.azure.storage.AccountArgs;
    import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
    import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
    import com.pulumi.azure.network.NetworkWatcherFlowLog;
    import com.pulumi.azure.network.NetworkWatcherFlowLogArgs;
    import com.pulumi.azure.network.inputs.NetworkWatcherFlowLogRetentionPolicyArgs;
    import com.pulumi.azure.network.inputs.NetworkWatcherFlowLogTrafficAnalyticsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var testNetworkSecurityGroup = new NetworkSecurityGroup("testNetworkSecurityGroup", NetworkSecurityGroupArgs.builder()        
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var testNetworkWatcher = new NetworkWatcher("testNetworkWatcher", NetworkWatcherArgs.builder()        
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var testAccount = new Account("testAccount", AccountArgs.builder()        
                .resourceGroupName(example.name())
                .location(example.location())
                .accountTier("Standard")
                .accountKind("StorageV2")
                .accountReplicationType("LRS")
                .enableHttpsTrafficOnly(true)
                .build());
    
            var testAnalyticsWorkspace = new AnalyticsWorkspace("testAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()        
                .location(example.location())
                .resourceGroupName(example.name())
                .sku("PerGB2018")
                .build());
    
            var testNetworkWatcherFlowLog = new NetworkWatcherFlowLog("testNetworkWatcherFlowLog", NetworkWatcherFlowLogArgs.builder()        
                .networkWatcherName(testNetworkWatcher.name())
                .resourceGroupName(example.name())
                .networkSecurityGroupId(testNetworkSecurityGroup.id())
                .storageAccountId(testAccount.id())
                .enabled(true)
                .retentionPolicy(NetworkWatcherFlowLogRetentionPolicyArgs.builder()
                    .enabled(true)
                    .days(7)
                    .build())
                .trafficAnalytics(NetworkWatcherFlowLogTrafficAnalyticsArgs.builder()
                    .enabled(true)
                    .workspaceId(testAnalyticsWorkspace.workspaceId())
                    .workspaceRegion(testAnalyticsWorkspace.location())
                    .workspaceResourceId(testAnalyticsWorkspace.id())
                    .intervalInMinutes(10)
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example", location="West Europe")
    test_network_security_group = azure.network.NetworkSecurityGroup("testNetworkSecurityGroup",
        location=example.location,
        resource_group_name=example.name)
    test_network_watcher = azure.network.NetworkWatcher("testNetworkWatcher",
        location=example.location,
        resource_group_name=example.name)
    test_account = azure.storage.Account("testAccount",
        resource_group_name=example.name,
        location=example.location,
        account_tier="Standard",
        account_kind="StorageV2",
        account_replication_type="LRS",
        enable_https_traffic_only=True)
    test_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("testAnalyticsWorkspace",
        location=example.location,
        resource_group_name=example.name,
        sku="PerGB2018")
    test_network_watcher_flow_log = azure.network.NetworkWatcherFlowLog("testNetworkWatcherFlowLog",
        network_watcher_name=test_network_watcher.name,
        resource_group_name=example.name,
        network_security_group_id=test_network_security_group.id,
        storage_account_id=test_account.id,
        enabled=True,
        retention_policy=azure.network.NetworkWatcherFlowLogRetentionPolicyArgs(
            enabled=True,
            days=7,
        ),
        traffic_analytics=azure.network.NetworkWatcherFlowLogTrafficAnalyticsArgs(
            enabled=True,
            workspace_id=test_analytics_workspace.workspace_id,
            workspace_region=test_analytics_workspace.location,
            workspace_resource_id=test_analytics_workspace.id,
            interval_in_minutes=10,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {location: "West Europe"});
    const testNetworkSecurityGroup = new azure.network.NetworkSecurityGroup("testNetworkSecurityGroup", {
        location: example.location,
        resourceGroupName: example.name,
    });
    const testNetworkWatcher = new azure.network.NetworkWatcher("testNetworkWatcher", {
        location: example.location,
        resourceGroupName: example.name,
    });
    const testAccount = new azure.storage.Account("testAccount", {
        resourceGroupName: example.name,
        location: example.location,
        accountTier: "Standard",
        accountKind: "StorageV2",
        accountReplicationType: "LRS",
        enableHttpsTrafficOnly: true,
    });
    const testAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("testAnalyticsWorkspace", {
        location: example.location,
        resourceGroupName: example.name,
        sku: "PerGB2018",
    });
    const testNetworkWatcherFlowLog = new azure.network.NetworkWatcherFlowLog("testNetworkWatcherFlowLog", {
        networkWatcherName: testNetworkWatcher.name,
        resourceGroupName: example.name,
        networkSecurityGroupId: testNetworkSecurityGroup.id,
        storageAccountId: testAccount.id,
        enabled: true,
        retentionPolicy: {
            enabled: true,
            days: 7,
        },
        trafficAnalytics: {
            enabled: true,
            workspaceId: testAnalyticsWorkspace.workspaceId,
            workspaceRegion: testAnalyticsWorkspace.location,
            workspaceResourceId: testAnalyticsWorkspace.id,
            intervalInMinutes: 10,
        },
    });
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      testNetworkSecurityGroup:
        type: azure:network:NetworkSecurityGroup
        properties:
          location: ${example.location}
          resourceGroupName: ${example.name}
      testNetworkWatcher:
        type: azure:network:NetworkWatcher
        properties:
          location: ${example.location}
          resourceGroupName: ${example.name}
      testAccount:
        type: azure:storage:Account
        properties:
          resourceGroupName: ${example.name}
          location: ${example.location}
          accountTier: Standard
          accountKind: StorageV2
          accountReplicationType: LRS
          enableHttpsTrafficOnly: true
      testAnalyticsWorkspace:
        type: azure:operationalinsights:AnalyticsWorkspace
        properties:
          location: ${example.location}
          resourceGroupName: ${example.name}
          sku: PerGB2018
      testNetworkWatcherFlowLog:
        type: azure:network:NetworkWatcherFlowLog
        properties:
          networkWatcherName: ${testNetworkWatcher.name}
          resourceGroupName: ${example.name}
          networkSecurityGroupId: ${testNetworkSecurityGroup.id}
          storageAccountId: ${testAccount.id}
          enabled: true
          retentionPolicy:
            enabled: true
            days: 7
          trafficAnalytics:
            enabled: true
            workspaceId: ${testAnalyticsWorkspace.workspaceId}
            workspaceRegion: ${testAnalyticsWorkspace.location}
            workspaceResourceId: ${testAnalyticsWorkspace.id}
            intervalInMinutes: 10
    

    Create NetworkWatcherFlowLog Resource

    new NetworkWatcherFlowLog(name: string, args: NetworkWatcherFlowLogArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkWatcherFlowLog(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              enabled: Optional[bool] = None,
                              location: Optional[str] = None,
                              name: Optional[str] = None,
                              network_security_group_id: Optional[str] = None,
                              network_watcher_name: Optional[str] = None,
                              resource_group_name: Optional[str] = None,
                              retention_policy: Optional[NetworkWatcherFlowLogRetentionPolicyArgs] = None,
                              storage_account_id: Optional[str] = None,
                              tags: Optional[Mapping[str, str]] = None,
                              traffic_analytics: Optional[NetworkWatcherFlowLogTrafficAnalyticsArgs] = None,
                              version: Optional[int] = None)
    @overload
    def NetworkWatcherFlowLog(resource_name: str,
                              args: NetworkWatcherFlowLogArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewNetworkWatcherFlowLog(ctx *Context, name string, args NetworkWatcherFlowLogArgs, opts ...ResourceOption) (*NetworkWatcherFlowLog, error)
    public NetworkWatcherFlowLog(string name, NetworkWatcherFlowLogArgs args, CustomResourceOptions? opts = null)
    public NetworkWatcherFlowLog(String name, NetworkWatcherFlowLogArgs args)
    public NetworkWatcherFlowLog(String name, NetworkWatcherFlowLogArgs args, CustomResourceOptions options)
    
    type: azure:network:NetworkWatcherFlowLog
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NetworkWatcherFlowLogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkWatcherFlowLogArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkWatcherFlowLogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkWatcherFlowLogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkWatcherFlowLogArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    NetworkWatcherFlowLog Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NetworkWatcherFlowLog resource accepts the following input properties:

    Enabled bool

    Should Network Flow Logging be Enabled?

    NetworkSecurityGroupId string

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    NetworkWatcherName string

    The name of the Network Watcher. Changing this forces a new resource to be created.

    ResourceGroupName string

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    RetentionPolicy NetworkWatcherFlowLogRetentionPolicy

    A retention_policy block as documented below.

    StorageAccountId string

    The ID of the Storage Account where flow logs are stored.

    Location string

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    Name string

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    Tags Dictionary<string, string>

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    TrafficAnalytics NetworkWatcherFlowLogTrafficAnalytics

    A traffic_analytics block as documented below.

    Version int

    The version (revision) of the flow log. Possible values are 1 and 2.

    Enabled bool

    Should Network Flow Logging be Enabled?

    NetworkSecurityGroupId string

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    NetworkWatcherName string

    The name of the Network Watcher. Changing this forces a new resource to be created.

    ResourceGroupName string

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    RetentionPolicy NetworkWatcherFlowLogRetentionPolicyArgs

    A retention_policy block as documented below.

    StorageAccountId string

    The ID of the Storage Account where flow logs are stored.

    Location string

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    Name string

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    Tags map[string]string

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    TrafficAnalytics NetworkWatcherFlowLogTrafficAnalyticsArgs

    A traffic_analytics block as documented below.

    Version int

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled Boolean

    Should Network Flow Logging be Enabled?

    networkSecurityGroupId String

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    networkWatcherName String

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resourceGroupName String

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retentionPolicy NetworkWatcherFlowLogRetentionPolicy

    A retention_policy block as documented below.

    storageAccountId String

    The ID of the Storage Account where flow logs are stored.

    location String

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name String

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    tags Map<String,String>

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    trafficAnalytics NetworkWatcherFlowLogTrafficAnalytics

    A traffic_analytics block as documented below.

    version Integer

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled boolean

    Should Network Flow Logging be Enabled?

    networkSecurityGroupId string

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    networkWatcherName string

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resourceGroupName string

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retentionPolicy NetworkWatcherFlowLogRetentionPolicy

    A retention_policy block as documented below.

    storageAccountId string

    The ID of the Storage Account where flow logs are stored.

    location string

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name string

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    tags {[key: string]: string}

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    trafficAnalytics NetworkWatcherFlowLogTrafficAnalytics

    A traffic_analytics block as documented below.

    version number

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled bool

    Should Network Flow Logging be Enabled?

    network_security_group_id str

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    network_watcher_name str

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resource_group_name str

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retention_policy NetworkWatcherFlowLogRetentionPolicyArgs

    A retention_policy block as documented below.

    storage_account_id str

    The ID of the Storage Account where flow logs are stored.

    location str

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name str

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    tags Mapping[str, str]

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    traffic_analytics NetworkWatcherFlowLogTrafficAnalyticsArgs

    A traffic_analytics block as documented below.

    version int

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled Boolean

    Should Network Flow Logging be Enabled?

    networkSecurityGroupId String

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    networkWatcherName String

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resourceGroupName String

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retentionPolicy Property Map

    A retention_policy block as documented below.

    storageAccountId String

    The ID of the Storage Account where flow logs are stored.

    location String

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name String

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    tags Map<String>

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    trafficAnalytics Property Map

    A traffic_analytics block as documented below.

    version Number

    The version (revision) of the flow log. Possible values are 1 and 2.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkWatcherFlowLog resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing NetworkWatcherFlowLog Resource

    Get an existing NetworkWatcherFlowLog resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NetworkWatcherFlowLogState, opts?: CustomResourceOptions): NetworkWatcherFlowLog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            network_security_group_id: Optional[str] = None,
            network_watcher_name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            retention_policy: Optional[NetworkWatcherFlowLogRetentionPolicyArgs] = None,
            storage_account_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            traffic_analytics: Optional[NetworkWatcherFlowLogTrafficAnalyticsArgs] = None,
            version: Optional[int] = None) -> NetworkWatcherFlowLog
    func GetNetworkWatcherFlowLog(ctx *Context, name string, id IDInput, state *NetworkWatcherFlowLogState, opts ...ResourceOption) (*NetworkWatcherFlowLog, error)
    public static NetworkWatcherFlowLog Get(string name, Input<string> id, NetworkWatcherFlowLogState? state, CustomResourceOptions? opts = null)
    public static NetworkWatcherFlowLog get(String name, Output<String> id, NetworkWatcherFlowLogState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Enabled bool

    Should Network Flow Logging be Enabled?

    Location string

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    Name string

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    NetworkSecurityGroupId string

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    NetworkWatcherName string

    The name of the Network Watcher. Changing this forces a new resource to be created.

    ResourceGroupName string

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    RetentionPolicy NetworkWatcherFlowLogRetentionPolicy

    A retention_policy block as documented below.

    StorageAccountId string

    The ID of the Storage Account where flow logs are stored.

    Tags Dictionary<string, string>

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    TrafficAnalytics NetworkWatcherFlowLogTrafficAnalytics

    A traffic_analytics block as documented below.

    Version int

    The version (revision) of the flow log. Possible values are 1 and 2.

    Enabled bool

    Should Network Flow Logging be Enabled?

    Location string

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    Name string

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    NetworkSecurityGroupId string

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    NetworkWatcherName string

    The name of the Network Watcher. Changing this forces a new resource to be created.

    ResourceGroupName string

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    RetentionPolicy NetworkWatcherFlowLogRetentionPolicyArgs

    A retention_policy block as documented below.

    StorageAccountId string

    The ID of the Storage Account where flow logs are stored.

    Tags map[string]string

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    TrafficAnalytics NetworkWatcherFlowLogTrafficAnalyticsArgs

    A traffic_analytics block as documented below.

    Version int

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled Boolean

    Should Network Flow Logging be Enabled?

    location String

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name String

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    networkSecurityGroupId String

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    networkWatcherName String

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resourceGroupName String

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retentionPolicy NetworkWatcherFlowLogRetentionPolicy

    A retention_policy block as documented below.

    storageAccountId String

    The ID of the Storage Account where flow logs are stored.

    tags Map<String,String>

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    trafficAnalytics NetworkWatcherFlowLogTrafficAnalytics

    A traffic_analytics block as documented below.

    version Integer

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled boolean

    Should Network Flow Logging be Enabled?

    location string

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name string

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    networkSecurityGroupId string

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    networkWatcherName string

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resourceGroupName string

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retentionPolicy NetworkWatcherFlowLogRetentionPolicy

    A retention_policy block as documented below.

    storageAccountId string

    The ID of the Storage Account where flow logs are stored.

    tags {[key: string]: string}

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    trafficAnalytics NetworkWatcherFlowLogTrafficAnalytics

    A traffic_analytics block as documented below.

    version number

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled bool

    Should Network Flow Logging be Enabled?

    location str

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name str

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    network_security_group_id str

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    network_watcher_name str

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resource_group_name str

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retention_policy NetworkWatcherFlowLogRetentionPolicyArgs

    A retention_policy block as documented below.

    storage_account_id str

    The ID of the Storage Account where flow logs are stored.

    tags Mapping[str, str]

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    traffic_analytics NetworkWatcherFlowLogTrafficAnalyticsArgs

    A traffic_analytics block as documented below.

    version int

    The version (revision) of the flow log. Possible values are 1 and 2.

    enabled Boolean

    Should Network Flow Logging be Enabled?

    location String

    The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

    name String

    The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

    networkSecurityGroupId String

    The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.

    networkWatcherName String

    The name of the Network Watcher. Changing this forces a new resource to be created.

    resourceGroupName String

    The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

    retentionPolicy Property Map

    A retention_policy block as documented below.

    storageAccountId String

    The ID of the Storage Account where flow logs are stored.

    tags Map<String>

    A mapping of tags which should be assigned to the Network Watcher Flow Log.

    trafficAnalytics Property Map

    A traffic_analytics block as documented below.

    version Number

    The version (revision) of the flow log. Possible values are 1 and 2.

    Supporting Types

    NetworkWatcherFlowLogRetentionPolicy, NetworkWatcherFlowLogRetentionPolicyArgs

    Days int

    The number of days to retain flow log records.

    Enabled bool

    Boolean flag to enable/disable retention.

    Days int

    The number of days to retain flow log records.

    Enabled bool

    Boolean flag to enable/disable retention.

    days Integer

    The number of days to retain flow log records.

    enabled Boolean

    Boolean flag to enable/disable retention.

    days number

    The number of days to retain flow log records.

    enabled boolean

    Boolean flag to enable/disable retention.

    days int

    The number of days to retain flow log records.

    enabled bool

    Boolean flag to enable/disable retention.

    days Number

    The number of days to retain flow log records.

    enabled Boolean

    Boolean flag to enable/disable retention.

    NetworkWatcherFlowLogTrafficAnalytics, NetworkWatcherFlowLogTrafficAnalyticsArgs

    Enabled bool

    Boolean flag to enable/disable traffic analytics.

    WorkspaceId string

    The resource GUID of the attached workspace.

    WorkspaceRegion string

    The location of the attached workspace.

    WorkspaceResourceId string

    The resource ID of the attached workspace.

    IntervalInMinutes int

    How frequently service should do flow analytics in minutes. Defaults to 60.

    Enabled bool

    Boolean flag to enable/disable traffic analytics.

    WorkspaceId string

    The resource GUID of the attached workspace.

    WorkspaceRegion string

    The location of the attached workspace.

    WorkspaceResourceId string

    The resource ID of the attached workspace.

    IntervalInMinutes int

    How frequently service should do flow analytics in minutes. Defaults to 60.

    enabled Boolean

    Boolean flag to enable/disable traffic analytics.

    workspaceId String

    The resource GUID of the attached workspace.

    workspaceRegion String

    The location of the attached workspace.

    workspaceResourceId String

    The resource ID of the attached workspace.

    intervalInMinutes Integer

    How frequently service should do flow analytics in minutes. Defaults to 60.

    enabled boolean

    Boolean flag to enable/disable traffic analytics.

    workspaceId string

    The resource GUID of the attached workspace.

    workspaceRegion string

    The location of the attached workspace.

    workspaceResourceId string

    The resource ID of the attached workspace.

    intervalInMinutes number

    How frequently service should do flow analytics in minutes. Defaults to 60.

    enabled bool

    Boolean flag to enable/disable traffic analytics.

    workspace_id str

    The resource GUID of the attached workspace.

    workspace_region str

    The location of the attached workspace.

    workspace_resource_id str

    The resource ID of the attached workspace.

    interval_in_minutes int

    How frequently service should do flow analytics in minutes. Defaults to 60.

    enabled Boolean

    Boolean flag to enable/disable traffic analytics.

    workspaceId String

    The resource GUID of the attached workspace.

    workspaceRegion String

    The location of the attached workspace.

    workspaceResourceId String

    The resource ID of the attached workspace.

    intervalInMinutes Number

    How frequently service should do flow analytics in minutes. Defaults to 60.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi