azure-native.network.FlowLog

Explore with Pulumi AI

A flow log resource. API Version: 2020-11-01.

Example Usage

Create or update flow log

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var flowLog = new AzureNative.Network.FlowLog("flowLog", new()
    {
        Enabled = true,
        FlowLogName = "fl",
        Format = new AzureNative.Network.Inputs.FlowLogFormatParametersArgs
        {
            Type = "JSON",
            Version = 1,
        },
        Location = "centraluseuap",
        NetworkWatcherName = "nw1",
        ResourceGroupName = "rg1",
        StorageId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe",
        TargetResourceId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg",
    });

});
package main

import (
	network "github.com/pulumi/pulumi-azure-native/sdk/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewFlowLog(ctx, "flowLog", &network.FlowLogArgs{
			Enabled:     pulumi.Bool(true),
			FlowLogName: pulumi.String("fl"),
			Format: &network.FlowLogFormatParametersArgs{
				Type:    pulumi.String("JSON"),
				Version: pulumi.Int(1),
			},
			Location:           pulumi.String("centraluseuap"),
			NetworkWatcherName: pulumi.String("nw1"),
			ResourceGroupName:  pulumi.String("rg1"),
			StorageId:          pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe"),
			TargetResourceId:   pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg"),
		})
		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.azurenative.network.FlowLog;
import com.pulumi.azurenative.network.FlowLogArgs;
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 flowLog = new FlowLog("flowLog", FlowLogArgs.builder()        
            .enabled(true)
            .flowLogName("fl")
            .format(Map.ofEntries(
                Map.entry("type", "JSON"),
                Map.entry("version", 1)
            ))
            .location("centraluseuap")
            .networkWatcherName("nw1")
            .resourceGroupName("rg1")
            .storageId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe")
            .targetResourceId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

flow_log = azure_native.network.FlowLog("flowLog",
    enabled=True,
    flow_log_name="fl",
    format=azure_native.network.FlowLogFormatParametersArgs(
        type="JSON",
        version=1,
    ),
    location="centraluseuap",
    network_watcher_name="nw1",
    resource_group_name="rg1",
    storage_id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe",
    target_resource_id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const flowLog = new azure_native.network.FlowLog("flowLog", {
    enabled: true,
    flowLogName: "fl",
    format: {
        type: "JSON",
        version: 1,
    },
    location: "centraluseuap",
    networkWatcherName: "nw1",
    resourceGroupName: "rg1",
    storageId: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe",
    targetResourceId: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg",
});
resources:
  flowLog:
    type: azure-native:network:FlowLog
    properties:
      enabled: true
      flowLogName: fl
      format:
        type: JSON
        version: 1
      location: centraluseuap
      networkWatcherName: nw1
      resourceGroupName: rg1
      storageId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe
      targetResourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg

Create FlowLog Resource

new FlowLog(name: string, args: FlowLogArgs, opts?: CustomResourceOptions);
@overload
def FlowLog(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            flow_analytics_configuration: Optional[TrafficAnalyticsPropertiesArgs] = None,
            flow_log_name: Optional[str] = None,
            format: Optional[FlowLogFormatParametersArgs] = None,
            id: Optional[str] = None,
            location: Optional[str] = None,
            network_watcher_name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            retention_policy: Optional[RetentionPolicyParametersArgs] = None,
            storage_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            target_resource_id: Optional[str] = None)
@overload
def FlowLog(resource_name: str,
            args: FlowLogArgs,
            opts: Optional[ResourceOptions] = None)
func NewFlowLog(ctx *Context, name string, args FlowLogArgs, opts ...ResourceOption) (*FlowLog, error)
public FlowLog(string name, FlowLogArgs args, CustomResourceOptions? opts = null)
public FlowLog(String name, FlowLogArgs args)
public FlowLog(String name, FlowLogArgs args, CustomResourceOptions options)
type: azure-native:network:FlowLog
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FlowLogArgs
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 FlowLogArgs
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 FlowLogArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FlowLogArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FlowLogArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FlowLog 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 FlowLog resource accepts the following input properties:

NetworkWatcherName string

The name of the network watcher.

ResourceGroupName string

The name of the resource group.

StorageId string

ID of the storage account which is used to store the flow log.

TargetResourceId string

ID of network security group to which flow log will be applied.

Enabled bool

Flag to enable/disable flow logging.

FlowAnalyticsConfiguration Pulumi.AzureNative.Network.Inputs.TrafficAnalyticsPropertiesArgs

Parameters that define the configuration of traffic analytics.

FlowLogName string

The name of the flow log.

Format Pulumi.AzureNative.Network.Inputs.FlowLogFormatParametersArgs

Parameters that define the flow log format.

Id string

Resource ID.

Location string

Resource location.

RetentionPolicy Pulumi.AzureNative.Network.Inputs.RetentionPolicyParametersArgs

Parameters that define the retention policy for flow log.

Tags Dictionary<string, string>

Resource tags.

NetworkWatcherName string

The name of the network watcher.

ResourceGroupName string

The name of the resource group.

StorageId string

ID of the storage account which is used to store the flow log.

TargetResourceId string

ID of network security group to which flow log will be applied.

Enabled bool

Flag to enable/disable flow logging.

FlowAnalyticsConfiguration TrafficAnalyticsPropertiesArgs

Parameters that define the configuration of traffic analytics.

FlowLogName string

The name of the flow log.

Format FlowLogFormatParametersArgs

Parameters that define the flow log format.

Id string

Resource ID.

Location string

Resource location.

RetentionPolicy RetentionPolicyParametersArgs

Parameters that define the retention policy for flow log.

Tags map[string]string

Resource tags.

networkWatcherName String

The name of the network watcher.

resourceGroupName String

The name of the resource group.

storageId String

ID of the storage account which is used to store the flow log.

targetResourceId String

ID of network security group to which flow log will be applied.

enabled Boolean

Flag to enable/disable flow logging.

flowAnalyticsConfiguration TrafficAnalyticsPropertiesArgs

Parameters that define the configuration of traffic analytics.

flowLogName String

The name of the flow log.

format FlowLogFormatParametersArgs

Parameters that define the flow log format.

id String

Resource ID.

location String

Resource location.

retentionPolicy RetentionPolicyParametersArgs

Parameters that define the retention policy for flow log.

tags Map<String,String>

Resource tags.

networkWatcherName string

The name of the network watcher.

resourceGroupName string

The name of the resource group.

storageId string

ID of the storage account which is used to store the flow log.

targetResourceId string

ID of network security group to which flow log will be applied.

enabled boolean

Flag to enable/disable flow logging.

flowAnalyticsConfiguration TrafficAnalyticsPropertiesArgs

Parameters that define the configuration of traffic analytics.

flowLogName string

The name of the flow log.

format FlowLogFormatParametersArgs

Parameters that define the flow log format.

id string

Resource ID.

location string

Resource location.

retentionPolicy RetentionPolicyParametersArgs

Parameters that define the retention policy for flow log.

tags {[key: string]: string}

Resource tags.

network_watcher_name str

The name of the network watcher.

resource_group_name str

The name of the resource group.

storage_id str

ID of the storage account which is used to store the flow log.

target_resource_id str

ID of network security group to which flow log will be applied.

enabled bool

Flag to enable/disable flow logging.

flow_analytics_configuration TrafficAnalyticsPropertiesArgs

Parameters that define the configuration of traffic analytics.

flow_log_name str

The name of the flow log.

format FlowLogFormatParametersArgs

Parameters that define the flow log format.

id str

Resource ID.

location str

Resource location.

retention_policy RetentionPolicyParametersArgs

Parameters that define the retention policy for flow log.

tags Mapping[str, str]

Resource tags.

networkWatcherName String

The name of the network watcher.

resourceGroupName String

The name of the resource group.

storageId String

ID of the storage account which is used to store the flow log.

targetResourceId String

ID of network security group to which flow log will be applied.

enabled Boolean

Flag to enable/disable flow logging.

flowAnalyticsConfiguration Property Map

Parameters that define the configuration of traffic analytics.

flowLogName String

The name of the flow log.

format Property Map

Parameters that define the flow log format.

id String

Resource ID.

location String

Resource location.

retentionPolicy Property Map

Parameters that define the retention policy for flow log.

tags Map<String>

Resource tags.

Outputs

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

Etag string

A unique read-only string that changes whenever the resource is updated.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Resource name.

ProvisioningState string

The provisioning state of the flow log.

TargetResourceGuid string

Guid of network security group to which flow log will be applied.

Type string

Resource type.

Etag string

A unique read-only string that changes whenever the resource is updated.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Resource name.

ProvisioningState string

The provisioning state of the flow log.

TargetResourceGuid string

Guid of network security group to which flow log will be applied.

Type string

Resource type.

etag String

A unique read-only string that changes whenever the resource is updated.

id String

The provider-assigned unique ID for this managed resource.

name String

Resource name.

provisioningState String

The provisioning state of the flow log.

targetResourceGuid String

Guid of network security group to which flow log will be applied.

type String

Resource type.

etag string

A unique read-only string that changes whenever the resource is updated.

id string

The provider-assigned unique ID for this managed resource.

name string

Resource name.

provisioningState string

The provisioning state of the flow log.

targetResourceGuid string

Guid of network security group to which flow log will be applied.

type string

Resource type.

etag str

A unique read-only string that changes whenever the resource is updated.

id str

The provider-assigned unique ID for this managed resource.

name str

Resource name.

provisioning_state str

The provisioning state of the flow log.

target_resource_guid str

Guid of network security group to which flow log will be applied.

type str

Resource type.

etag String

A unique read-only string that changes whenever the resource is updated.

id String

The provider-assigned unique ID for this managed resource.

name String

Resource name.

provisioningState String

The provisioning state of the flow log.

targetResourceGuid String

Guid of network security group to which flow log will be applied.

type String

Resource type.

Supporting Types

FlowLogFormatParameters

Type string | Pulumi.AzureNative.Network.FlowLogFormatType

The file type of flow log.

Version int

The version (revision) of the flow log.

Type string | FlowLogFormatType

The file type of flow log.

Version int

The version (revision) of the flow log.

type String | FlowLogFormatType

The file type of flow log.

version Integer

The version (revision) of the flow log.

type string | FlowLogFormatType

The file type of flow log.

version number

The version (revision) of the flow log.

type str | FlowLogFormatType

The file type of flow log.

version int

The version (revision) of the flow log.

type String | "JSON"

The file type of flow log.

version Number

The version (revision) of the flow log.

FlowLogFormatParametersResponse

Type string

The file type of flow log.

Version int

The version (revision) of the flow log.

Type string

The file type of flow log.

Version int

The version (revision) of the flow log.

type String

The file type of flow log.

version Integer

The version (revision) of the flow log.

type string

The file type of flow log.

version number

The version (revision) of the flow log.

type str

The file type of flow log.

version int

The version (revision) of the flow log.

type String

The file type of flow log.

version Number

The version (revision) of the flow log.

FlowLogFormatType

JSON
JSON
FlowLogFormatTypeJSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
"JSON"
JSON

RetentionPolicyParameters

Days int

Number of days to retain flow log records.

Enabled bool

Flag to enable/disable retention.

Days int

Number of days to retain flow log records.

Enabled bool

Flag to enable/disable retention.

days Integer

Number of days to retain flow log records.

enabled Boolean

Flag to enable/disable retention.

days number

Number of days to retain flow log records.

enabled boolean

Flag to enable/disable retention.

days int

Number of days to retain flow log records.

enabled bool

Flag to enable/disable retention.

days Number

Number of days to retain flow log records.

enabled Boolean

Flag to enable/disable retention.

RetentionPolicyParametersResponse

Days int

Number of days to retain flow log records.

Enabled bool

Flag to enable/disable retention.

Days int

Number of days to retain flow log records.

Enabled bool

Flag to enable/disable retention.

days Integer

Number of days to retain flow log records.

enabled Boolean

Flag to enable/disable retention.

days number

Number of days to retain flow log records.

enabled boolean

Flag to enable/disable retention.

days int

Number of days to retain flow log records.

enabled bool

Flag to enable/disable retention.

days Number

Number of days to retain flow log records.

enabled Boolean

Flag to enable/disable retention.

TrafficAnalyticsConfigurationProperties

Enabled bool

Flag to enable/disable traffic analytics.

TrafficAnalyticsInterval int

The interval in minutes which would decide how frequently TA service should do flow analytics.

WorkspaceId string

The resource guid of the attached workspace.

WorkspaceRegion string

The location of the attached workspace.

WorkspaceResourceId string

Resource Id of the attached workspace.

Enabled bool

Flag to enable/disable traffic analytics.

TrafficAnalyticsInterval int

The interval in minutes which would decide how frequently TA service should do flow analytics.

WorkspaceId string

The resource guid of the attached workspace.

WorkspaceRegion string

The location of the attached workspace.

WorkspaceResourceId string

Resource Id of the attached workspace.

enabled Boolean

Flag to enable/disable traffic analytics.

trafficAnalyticsInterval Integer

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspaceId String

The resource guid of the attached workspace.

workspaceRegion String

The location of the attached workspace.

workspaceResourceId String

Resource Id of the attached workspace.

enabled boolean

Flag to enable/disable traffic analytics.

trafficAnalyticsInterval number

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspaceId string

The resource guid of the attached workspace.

workspaceRegion string

The location of the attached workspace.

workspaceResourceId string

Resource Id of the attached workspace.

enabled bool

Flag to enable/disable traffic analytics.

traffic_analytics_interval int

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspace_id str

The resource guid of the attached workspace.

workspace_region str

The location of the attached workspace.

workspace_resource_id str

Resource Id of the attached workspace.

enabled Boolean

Flag to enable/disable traffic analytics.

trafficAnalyticsInterval Number

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspaceId String

The resource guid of the attached workspace.

workspaceRegion String

The location of the attached workspace.

workspaceResourceId String

Resource Id of the attached workspace.

TrafficAnalyticsConfigurationPropertiesResponse

Enabled bool

Flag to enable/disable traffic analytics.

TrafficAnalyticsInterval int

The interval in minutes which would decide how frequently TA service should do flow analytics.

WorkspaceId string

The resource guid of the attached workspace.

WorkspaceRegion string

The location of the attached workspace.

WorkspaceResourceId string

Resource Id of the attached workspace.

Enabled bool

Flag to enable/disable traffic analytics.

TrafficAnalyticsInterval int

The interval in minutes which would decide how frequently TA service should do flow analytics.

WorkspaceId string

The resource guid of the attached workspace.

WorkspaceRegion string

The location of the attached workspace.

WorkspaceResourceId string

Resource Id of the attached workspace.

enabled Boolean

Flag to enable/disable traffic analytics.

trafficAnalyticsInterval Integer

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspaceId String

The resource guid of the attached workspace.

workspaceRegion String

The location of the attached workspace.

workspaceResourceId String

Resource Id of the attached workspace.

enabled boolean

Flag to enable/disable traffic analytics.

trafficAnalyticsInterval number

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspaceId string

The resource guid of the attached workspace.

workspaceRegion string

The location of the attached workspace.

workspaceResourceId string

Resource Id of the attached workspace.

enabled bool

Flag to enable/disable traffic analytics.

traffic_analytics_interval int

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspace_id str

The resource guid of the attached workspace.

workspace_region str

The location of the attached workspace.

workspace_resource_id str

Resource Id of the attached workspace.

enabled Boolean

Flag to enable/disable traffic analytics.

trafficAnalyticsInterval Number

The interval in minutes which would decide how frequently TA service should do flow analytics.

workspaceId String

The resource guid of the attached workspace.

workspaceRegion String

The location of the attached workspace.

workspaceResourceId String

Resource Id of the attached workspace.

TrafficAnalyticsProperties

NetworkWatcherFlowAnalyticsConfiguration TrafficAnalyticsConfigurationProperties

Parameters that define the configuration of traffic analytics.

networkWatcherFlowAnalyticsConfiguration TrafficAnalyticsConfigurationProperties

Parameters that define the configuration of traffic analytics.

networkWatcherFlowAnalyticsConfiguration TrafficAnalyticsConfigurationProperties

Parameters that define the configuration of traffic analytics.

network_watcher_flow_analytics_configuration TrafficAnalyticsConfigurationProperties

Parameters that define the configuration of traffic analytics.

networkWatcherFlowAnalyticsConfiguration Property Map

Parameters that define the configuration of traffic analytics.

TrafficAnalyticsPropertiesResponse

NetworkWatcherFlowAnalyticsConfiguration TrafficAnalyticsConfigurationPropertiesResponse

Parameters that define the configuration of traffic analytics.

networkWatcherFlowAnalyticsConfiguration TrafficAnalyticsConfigurationPropertiesResponse

Parameters that define the configuration of traffic analytics.

networkWatcherFlowAnalyticsConfiguration TrafficAnalyticsConfigurationPropertiesResponse

Parameters that define the configuration of traffic analytics.

network_watcher_flow_analytics_configuration TrafficAnalyticsConfigurationPropertiesResponse

Parameters that define the configuration of traffic analytics.

networkWatcherFlowAnalyticsConfiguration Property Map

Parameters that define the configuration of traffic analytics.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:FlowLog Microsoft.Networkdesmond-rgdesmondcentral-nsg /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw/FlowLogs/fl 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0