Flow Log Args
data class FlowLogArgs(val enabled: Output<Boolean>? = null, val flowAnalyticsConfiguration: Output<TrafficAnalyticsPropertiesArgs>? = null, val flowLogName: Output<String>? = null, val format: Output<FlowLogFormatParametersArgs>? = null, val id: Output<String>? = null, val location: Output<String>? = null, val networkWatcherName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionPolicy: Output<RetentionPolicyParametersArgs>? = null, val storageId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetResourceId: Output<String>? = null) : ConvertibleToJava<FlowLogArgs>
A flow log resource. API Version: 2020-11-01.
Example Usage
Create or update flow log
using System.Collections.Generic;
using System.Linq;
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",
});
});
Content copied to clipboard
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(enabled: Output<Boolean>? = null, flowAnalyticsConfiguration: Output<TrafficAnalyticsPropertiesArgs>? = null, flowLogName: Output<String>? = null, format: Output<FlowLogFormatParametersArgs>? = null, id: Output<String>? = null, location: Output<String>? = null, networkWatcherName: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionPolicy: Output<RetentionPolicyParametersArgs>? = null, storageId: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetResourceId: Output<String>? = null)
Properties
Link copied to clipboard
Parameters that define the configuration of traffic analytics.
Link copied to clipboard
The name of the flow log.
Link copied to clipboard
Parameters that define the flow log format.
Link copied to clipboard
The name of the network watcher.
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
Parameters that define the retention policy for flow log.
Link copied to clipboard
ID of network security group to which flow log will be applied.