FlowLog

class FlowLog : KotlinCustomResource

A flow log resource. Uses Azure REST API version 2023-02-01. In version 1.x of the Azure Native provider, it used API version 2020-11-01. Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-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 = AzureNative.Network.FlowLogFormatType.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/network/v2"
"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(network.FlowLogFormatTypeJSON),
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 com.pulumi.azurenative.network.inputs.FlowLogFormatParametersArgs;
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(FlowLogFormatParametersArgs.builder()
.type("JSON")
.version(1)
.build())
.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

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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}

Properties

Link copied to clipboard
val enabled: Output<Boolean>?

Flag to enable/disable flow logging.

Link copied to clipboard
val etag: Output<String>

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

Link copied to clipboard

Parameters that define the configuration of traffic analytics.

Link copied to clipboard

Parameters that define the flow log format.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>?

Resource location.

Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard

The provisioning state of the flow log.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Parameters that define the retention policy for flow log.

Link copied to clipboard
val storageId: Output<String>

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

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>