Azure Native v1.102.0, May 2 23
Azure Native v1.102.0, May 2 23
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:
- Network
Watcher stringName The name of the network watcher.
- Resource
Group stringName The name of the resource group.
- Storage
Id string ID of the storage account which is used to store the flow log.
- Target
Resource stringId ID of network security group to which flow log will be applied.
- Enabled bool
Flag to enable/disable flow logging.
- Flow
Analytics Pulumi.Configuration Azure Native. Network. Inputs. Traffic Analytics Properties Args Parameters that define the configuration of traffic analytics.
- Flow
Log stringName The name of the flow log.
- Format
Pulumi.
Azure Native. Network. Inputs. Flow Log Format Parameters Args Parameters that define the flow log format.
- Id string
Resource ID.
- Location string
Resource location.
- Retention
Policy Pulumi.Azure Native. Network. Inputs. Retention Policy Parameters Args Parameters that define the retention policy for flow log.
- Dictionary<string, string>
Resource tags.
- Network
Watcher stringName The name of the network watcher.
- Resource
Group stringName The name of the resource group.
- Storage
Id string ID of the storage account which is used to store the flow log.
- Target
Resource stringId ID of network security group to which flow log will be applied.
- Enabled bool
Flag to enable/disable flow logging.
- Flow
Analytics TrafficConfiguration Analytics Properties Args Parameters that define the configuration of traffic analytics.
- Flow
Log stringName The name of the flow log.
- Format
Flow
Log Format Parameters Args Parameters that define the flow log format.
- Id string
Resource ID.
- Location string
Resource location.
- Retention
Policy RetentionPolicy Parameters Args Parameters that define the retention policy for flow log.
- map[string]string
Resource tags.
- network
Watcher StringName The name of the network watcher.
- resource
Group StringName The name of the resource group.
- storage
Id String ID of the storage account which is used to store the flow log.
- target
Resource StringId ID of network security group to which flow log will be applied.
- enabled Boolean
Flag to enable/disable flow logging.
- flow
Analytics TrafficConfiguration Analytics Properties Args Parameters that define the configuration of traffic analytics.
- flow
Log StringName The name of the flow log.
- format
Flow
Log Format Parameters Args Parameters that define the flow log format.
- id String
Resource ID.
- location String
Resource location.
- retention
Policy RetentionPolicy Parameters Args Parameters that define the retention policy for flow log.
- Map<String,String>
Resource tags.
- network
Watcher stringName The name of the network watcher.
- resource
Group stringName The name of the resource group.
- storage
Id string ID of the storage account which is used to store the flow log.
- target
Resource stringId ID of network security group to which flow log will be applied.
- enabled boolean
Flag to enable/disable flow logging.
- flow
Analytics TrafficConfiguration Analytics Properties Args Parameters that define the configuration of traffic analytics.
- flow
Log stringName The name of the flow log.
- format
Flow
Log Format Parameters Args Parameters that define the flow log format.
- id string
Resource ID.
- location string
Resource location.
- retention
Policy RetentionPolicy Parameters Args Parameters that define the retention policy for flow log.
- {[key: string]: string}
Resource tags.
- network_
watcher_ strname The name of the network watcher.
- resource_
group_ strname The name of the resource group.
- storage_
id str ID of the storage account which is used to store the flow log.
- target_
resource_ strid ID of network security group to which flow log will be applied.
- enabled bool
Flag to enable/disable flow logging.
- flow_
analytics_ Trafficconfiguration Analytics Properties Args Parameters that define the configuration of traffic analytics.
- flow_
log_ strname The name of the flow log.
- format
Flow
Log Format Parameters Args Parameters that define the flow log format.
- id str
Resource ID.
- location str
Resource location.
- retention_
policy RetentionPolicy Parameters Args Parameters that define the retention policy for flow log.
- Mapping[str, str]
Resource tags.
- network
Watcher StringName The name of the network watcher.
- resource
Group StringName The name of the resource group.
- storage
Id String ID of the storage account which is used to store the flow log.
- target
Resource StringId ID of network security group to which flow log will be applied.
- enabled Boolean
Flag to enable/disable flow logging.
- flow
Analytics Property MapConfiguration Parameters that define the configuration of traffic analytics.
- flow
Log StringName The name of the flow log.
- format Property Map
Parameters that define the flow log format.
- id String
Resource ID.
- location String
Resource location.
- retention
Policy Property Map Parameters that define the retention policy for flow log.
- 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.
- Provisioning
State string The provisioning state of the flow log.
- Target
Resource stringGuid 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.
- Provisioning
State string The provisioning state of the flow log.
- Target
Resource stringGuid 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.
- provisioning
State String The provisioning state of the flow log.
- target
Resource StringGuid 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.
- provisioning
State string The provisioning state of the flow log.
- target
Resource stringGuid 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_ strguid 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.
- provisioning
State String The provisioning state of the flow log.
- target
Resource StringGuid Guid of network security group to which flow log will be applied.
- type String
Resource type.
Supporting Types
FlowLogFormatParameters
- Type
string | Pulumi.
Azure Native. Network. Flow Log Format Type The file type of flow log.
- Version int
The version (revision) of the flow log.
- Type
string | Flow
Log Format Type The file type of flow log.
- Version int
The version (revision) of the flow log.
- type
String | Flow
Log Format Type The file type of flow log.
- version Integer
The version (revision) of the flow log.
- type
string | Flow
Log Format Type The file type of flow log.
- version number
The version (revision) of the flow log.
- type
str | Flow
Log Format Type The file type of flow log.
- version int
The version (revision) of the flow log.
FlowLogFormatParametersResponse
FlowLogFormatType
- JSON
- JSON
- Flow
Log Format Type JSON - JSON
- JSON
- JSON
- JSON
- JSON
- JSON
- JSON
- "JSON"
- JSON
RetentionPolicyParameters
RetentionPolicyParametersResponse
TrafficAnalyticsConfigurationProperties
- Enabled bool
Flag to enable/disable traffic analytics.
- Traffic
Analytics intInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- Workspace
Id string The resource guid of the attached workspace.
- Workspace
Region string The location of the attached workspace.
- Workspace
Resource stringId Resource Id of the attached workspace.
- Enabled bool
Flag to enable/disable traffic analytics.
- Traffic
Analytics intInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- Workspace
Id string The resource guid of the attached workspace.
- Workspace
Region string The location of the attached workspace.
- Workspace
Resource stringId Resource Id of the attached workspace.
- enabled Boolean
Flag to enable/disable traffic analytics.
- traffic
Analytics IntegerInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- workspace
Id String The resource guid of the attached workspace.
- workspace
Region String The location of the attached workspace.
- workspace
Resource StringId Resource Id of the attached workspace.
- enabled boolean
Flag to enable/disable traffic analytics.
- traffic
Analytics numberInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- workspace
Id string The resource guid of the attached workspace.
- workspace
Region string The location of the attached workspace.
- workspace
Resource stringId Resource Id of the attached workspace.
- enabled bool
Flag to enable/disable traffic analytics.
- traffic_
analytics_ intinterval 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_ strid Resource Id of the attached workspace.
- enabled Boolean
Flag to enable/disable traffic analytics.
- traffic
Analytics NumberInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- workspace
Id String The resource guid of the attached workspace.
- workspace
Region String The location of the attached workspace.
- workspace
Resource StringId Resource Id of the attached workspace.
TrafficAnalyticsConfigurationPropertiesResponse
- Enabled bool
Flag to enable/disable traffic analytics.
- Traffic
Analytics intInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- Workspace
Id string The resource guid of the attached workspace.
- Workspace
Region string The location of the attached workspace.
- Workspace
Resource stringId Resource Id of the attached workspace.
- Enabled bool
Flag to enable/disable traffic analytics.
- Traffic
Analytics intInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- Workspace
Id string The resource guid of the attached workspace.
- Workspace
Region string The location of the attached workspace.
- Workspace
Resource stringId Resource Id of the attached workspace.
- enabled Boolean
Flag to enable/disable traffic analytics.
- traffic
Analytics IntegerInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- workspace
Id String The resource guid of the attached workspace.
- workspace
Region String The location of the attached workspace.
- workspace
Resource StringId Resource Id of the attached workspace.
- enabled boolean
Flag to enable/disable traffic analytics.
- traffic
Analytics numberInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- workspace
Id string The resource guid of the attached workspace.
- workspace
Region string The location of the attached workspace.
- workspace
Resource stringId Resource Id of the attached workspace.
- enabled bool
Flag to enable/disable traffic analytics.
- traffic_
analytics_ intinterval 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_ strid Resource Id of the attached workspace.
- enabled Boolean
Flag to enable/disable traffic analytics.
- traffic
Analytics NumberInterval The interval in minutes which would decide how frequently TA service should do flow analytics.
- workspace
Id String The resource guid of the attached workspace.
- workspace
Region String The location of the attached workspace.
- workspace
Resource StringId Resource Id of the attached workspace.
TrafficAnalyticsProperties
- Network
Watcher Pulumi.Flow Analytics Configuration Azure Native. Network. Inputs. Traffic Analytics Configuration Properties Parameters that define the configuration of traffic analytics.
- Network
Watcher TrafficFlow Analytics Configuration Analytics Configuration Properties Parameters that define the configuration of traffic analytics.
- network
Watcher TrafficFlow Analytics Configuration Analytics Configuration Properties Parameters that define the configuration of traffic analytics.
- network
Watcher TrafficFlow Analytics Configuration Analytics Configuration Properties Parameters that define the configuration of traffic analytics.
- network_
watcher_ Trafficflow_ analytics_ configuration Analytics Configuration Properties Parameters that define the configuration of traffic analytics.
- network
Watcher Property MapFlow Analytics Configuration Parameters that define the configuration of traffic analytics.
TrafficAnalyticsPropertiesResponse
- Network
Watcher Pulumi.Flow Analytics Configuration Azure Native. Network. Inputs. Traffic Analytics Configuration Properties Response Parameters that define the configuration of traffic analytics.
- Network
Watcher TrafficFlow Analytics Configuration Analytics Configuration Properties Response Parameters that define the configuration of traffic analytics.
- network
Watcher TrafficFlow Analytics Configuration Analytics Configuration Properties Response Parameters that define the configuration of traffic analytics.
- network
Watcher TrafficFlow Analytics Configuration Analytics Configuration Properties Response Parameters that define the configuration of traffic analytics.
- network_
watcher_ Trafficflow_ analytics_ configuration Analytics Configuration Properties Response Parameters that define the configuration of traffic analytics.
- network
Watcher Property MapFlow Analytics Configuration 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