All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.network.kotlin.NetworkWatcherFlowLogArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.21.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.NetworkWatcherFlowLogArgs.builder
import com.pulumi.azure.network.kotlin.inputs.NetworkWatcherFlowLogRetentionPolicyArgs
import com.pulumi.azure.network.kotlin.inputs.NetworkWatcherFlowLogRetentionPolicyArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.NetworkWatcherFlowLogTrafficAnalyticsArgs
import com.pulumi.azure.network.kotlin.inputs.NetworkWatcherFlowLogTrafficAnalyticsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Network Watcher Flow Log.
 * > **Note** The `azure.network.NetworkWatcherFlowLog` creates a new storage lifecyle management rule that overwrites existing rules. Please make sure to use a `storage_account` with no existing management rules, until the issue is fixed.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const test = new azure.network.NetworkSecurityGroup("test", {
 *     name: "acctestnsg",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const testNetworkWatcher = new azure.network.NetworkWatcher("test", {
 *     name: "acctestnw",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const testAccount = new azure.storage.Account("test", {
 *     name: "acctestsa",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountKind: "StorageV2",
 *     accountReplicationType: "LRS",
 *     enableHttpsTrafficOnly: true,
 * });
 * const testAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("test", {
 *     name: "acctestlaw",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "PerGB2018",
 * });
 * const testNetworkWatcherFlowLog = new azure.network.NetworkWatcherFlowLog("test", {
 *     networkWatcherName: testNetworkWatcher.name,
 *     resourceGroupName: example.name,
 *     name: "example-log",
 *     networkSecurityGroupId: test.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,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * test = azure.network.NetworkSecurityGroup("test",
 *     name="acctestnsg",
 *     location=example.location,
 *     resource_group_name=example.name)
 * test_network_watcher = azure.network.NetworkWatcher("test",
 *     name="acctestnw",
 *     location=example.location,
 *     resource_group_name=example.name)
 * test_account = azure.storage.Account("test",
 *     name="acctestsa",
 *     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("test",
 *     name="acctestlaw",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="PerGB2018")
 * test_network_watcher_flow_log = azure.network.NetworkWatcherFlowLog("test",
 *     network_watcher_name=test_network_watcher.name,
 *     resource_group_name=example.name,
 *     name="example-log",
 *     network_security_group_id=test.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,
 *     ))
 * ```
 * ```csharp
 * 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()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var test = new Azure.Network.NetworkSecurityGroup("test", new()
 *     {
 *         Name = "acctestnsg",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var testNetworkWatcher = new Azure.Network.NetworkWatcher("test", new()
 *     {
 *         Name = "acctestnw",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var testAccount = new Azure.Storage.Account("test", new()
 *     {
 *         Name = "acctestsa",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountKind = "StorageV2",
 *         AccountReplicationType = "LRS",
 *         EnableHttpsTrafficOnly = true,
 *     });
 *     var testAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("test", new()
 *     {
 *         Name = "acctestlaw",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "PerGB2018",
 *     });
 *     var testNetworkWatcherFlowLog = new Azure.Network.NetworkWatcherFlowLog("test", new()
 *     {
 *         NetworkWatcherName = testNetworkWatcher.Name,
 *         ResourceGroupName = example.Name,
 *         Name = "example-log",
 *         NetworkSecurityGroupId = test.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,
 *         },
 *     });
 * });
 * ```
 * ```go
 * 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{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		test, err := network.NewNetworkSecurityGroup(ctx, "test", &network.NetworkSecurityGroupArgs{
 * 			Name:              pulumi.String("acctestnsg"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		testNetworkWatcher, err := network.NewNetworkWatcher(ctx, "test", &network.NetworkWatcherArgs{
 * 			Name:              pulumi.String("acctestnw"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		testAccount, err := storage.NewAccount(ctx, "test", &storage.AccountArgs{
 * 			Name:                   pulumi.String("acctestsa"),
 * 			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, "test", &operationalinsights.AnalyticsWorkspaceArgs{
 * 			Name:              pulumi.String("acctestlaw"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("PerGB2018"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewNetworkWatcherFlowLog(ctx, "test", &network.NetworkWatcherFlowLogArgs{
 * 			NetworkWatcherName:     testNetworkWatcher.Name,
 * 			ResourceGroupName:      example.Name,
 * 			Name:                   pulumi.String("example-log"),
 * 			NetworkSecurityGroupId: test.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
 * 	})
 * }
 * ```
 * ```java
 * 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()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var test = new NetworkSecurityGroup("test", NetworkSecurityGroupArgs.builder()
 *             .name("acctestnsg")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var testNetworkWatcher = new NetworkWatcher("testNetworkWatcher", NetworkWatcherArgs.builder()
 *             .name("acctestnw")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var testAccount = new Account("testAccount", AccountArgs.builder()
 *             .name("acctestsa")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountKind("StorageV2")
 *             .accountReplicationType("LRS")
 *             .enableHttpsTrafficOnly(true)
 *             .build());
 *         var testAnalyticsWorkspace = new AnalyticsWorkspace("testAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
 *             .name("acctestlaw")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("PerGB2018")
 *             .build());
 *         var testNetworkWatcherFlowLog = new NetworkWatcherFlowLog("testNetworkWatcherFlowLog", NetworkWatcherFlowLogArgs.builder()
 *             .networkWatcherName(testNetworkWatcher.name())
 *             .resourceGroupName(example.name())
 *             .name("example-log")
 *             .networkSecurityGroupId(test.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());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   test:
 *     type: azure:network:NetworkSecurityGroup
 *     properties:
 *       name: acctestnsg
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   testNetworkWatcher:
 *     type: azure:network:NetworkWatcher
 *     name: test
 *     properties:
 *       name: acctestnw
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   testAccount:
 *     type: azure:storage:Account
 *     name: test
 *     properties:
 *       name: acctestsa
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountKind: StorageV2
 *       accountReplicationType: LRS
 *       enableHttpsTrafficOnly: true
 *   testAnalyticsWorkspace:
 *     type: azure:operationalinsights:AnalyticsWorkspace
 *     name: test
 *     properties:
 *       name: acctestlaw
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: PerGB2018
 *   testNetworkWatcherFlowLog:
 *     type: azure:network:NetworkWatcherFlowLog
 *     name: test
 *     properties:
 *       networkWatcherName: ${testNetworkWatcher.name}
 *       resourceGroupName: ${example.name}
 *       name: example-log
 *       networkSecurityGroupId: ${test.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
 * ```
 * 
 * ## Import
 * Network Watcher Flow Logs can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog watcher1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/flowLogs/log1
 * ```
 * @property enabled Should Network Flow Logging be Enabled?
 * @property location 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.
 * @property name The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.
 * @property networkSecurityGroupId The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.
 * @property networkWatcherName The name of the Network Watcher. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.
 * @property retentionPolicy A `retention_policy` block as documented below.
 * @property storageAccountId The ID of the Storage Account where flow logs are stored.
 * @property tags A mapping of tags which should be assigned to the Network Watcher Flow Log.
 * @property trafficAnalytics A `traffic_analytics` block as documented below.
 * @property version The version (revision) of the flow log. Possible values are `1` and `2`.
 */
public data class NetworkWatcherFlowLogArgs(
    public val enabled: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val networkSecurityGroupId: Output? = null,
    public val networkWatcherName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val retentionPolicy: Output? = null,
    public val storageAccountId: Output? = null,
    public val tags: Output>? = null,
    public val trafficAnalytics: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.NetworkWatcherFlowLogArgs =
        com.pulumi.azure.network.NetworkWatcherFlowLogArgs.builder()
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkSecurityGroupId(networkSecurityGroupId?.applyValue({ args0 -> args0 }))
            .networkWatcherName(networkWatcherName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .retentionPolicy(retentionPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storageAccountId(storageAccountId?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .trafficAnalytics(trafficAnalytics?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .version(version?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [NetworkWatcherFlowLogArgs].
 */
@PulumiTagMarker
public class NetworkWatcherFlowLogArgsBuilder internal constructor() {
    private var enabled: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var networkSecurityGroupId: Output? = null

    private var networkWatcherName: Output? = null

    private var resourceGroupName: Output? = null

    private var retentionPolicy: Output? = null

    private var storageAccountId: Output? = null

    private var tags: Output>? = null

    private var trafficAnalytics: Output? = null

    private var version: Output? = null

    /**
     * @param value Should Network Flow Logging be Enabled?
     */
    @JvmName("maoshfgssvgkchdo")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value 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.
     */
    @JvmName("ooiwsvwpgtktjfxc")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.
     */
    @JvmName("pkvsbshrwgcuxrcy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.
     */
    @JvmName("chhtpasojrjkpjcj")
    public suspend fun networkSecurityGroupId(`value`: Output) {
        this.networkSecurityGroupId = value
    }

    /**
     * @param value The name of the Network Watcher. Changing this forces a new resource to be created.
     */
    @JvmName("bsrhmntevpwabuhu")
    public suspend fun networkWatcherName(`value`: Output) {
        this.networkWatcherName = value
    }

    /**
     * @param value The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.
     */
    @JvmName("yebltrjccuninjkd")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `retention_policy` block as documented below.
     */
    @JvmName("nmpnlhymrtlrahgl")
    public suspend fun retentionPolicy(`value`: Output) {
        this.retentionPolicy = value
    }

    /**
     * @param value The ID of the Storage Account where flow logs are stored.
     */
    @JvmName("mwpraoxqddwkthxc")
    public suspend fun storageAccountId(`value`: Output) {
        this.storageAccountId = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Network Watcher Flow Log.
     */
    @JvmName("gdnsghfoyaqlvglv")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `traffic_analytics` block as documented below.
     */
    @JvmName("upkmjiylpddfkxvt")
    public suspend fun trafficAnalytics(`value`: Output) {
        this.trafficAnalytics = value
    }

    /**
     * @param value The version (revision) of the flow log. Possible values are `1` and `2`.
     */
    @JvmName("hktwojbqimtyerea")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value Should Network Flow Logging be Enabled?
     */
    @JvmName("kxpjsbeifnqinyys")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("fbgycubaciarqndf")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.
     */
    @JvmName("tvsxkptglwkhfcth")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the Network Security Group for which to enable flow logs for. Changing this forces a new resource to be created.
     */
    @JvmName("xdvvsmfemsabpcrq")
    public suspend fun networkSecurityGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkSecurityGroupId = mapped
    }

    /**
     * @param value The name of the Network Watcher. Changing this forces a new resource to be created.
     */
    @JvmName("fjvicykxqygutrvs")
    public suspend fun networkWatcherName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkWatcherName = mapped
    }

    /**
     * @param value The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.
     */
    @JvmName("hfdbmpcldpnelvdo")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `retention_policy` block as documented below.
     */
    @JvmName("jxbaxfxeioxeexdk")
    public suspend fun retentionPolicy(`value`: NetworkWatcherFlowLogRetentionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param argument A `retention_policy` block as documented below.
     */
    @JvmName("mbbmtiavytaqflmo")
    public suspend
    fun retentionPolicy(argument: suspend NetworkWatcherFlowLogRetentionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkWatcherFlowLogRetentionPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.retentionPolicy = mapped
    }

    /**
     * @param value The ID of the Storage Account where flow logs are stored.
     */
    @JvmName("bwbwbvppmqvuiigx")
    public suspend fun storageAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountId = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Network Watcher Flow Log.
     */
    @JvmName("bxneoarhbhsjvpfg")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Network Watcher Flow Log.
     */
    @JvmName("iyykmffyujfekxya")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `traffic_analytics` block as documented below.
     */
    @JvmName("tapalytgdjqgutug")
    public suspend fun trafficAnalytics(`value`: NetworkWatcherFlowLogTrafficAnalyticsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trafficAnalytics = mapped
    }

    /**
     * @param argument A `traffic_analytics` block as documented below.
     */
    @JvmName("bcsbvgflbgpuhdee")
    public suspend
    fun trafficAnalytics(argument: suspend NetworkWatcherFlowLogTrafficAnalyticsArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkWatcherFlowLogTrafficAnalyticsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.trafficAnalytics = mapped
    }

    /**
     * @param value The version (revision) of the flow log. Possible values are `1` and `2`.
     */
    @JvmName("exxdvwthmceapbej")
    public suspend fun version(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): NetworkWatcherFlowLogArgs = NetworkWatcherFlowLogArgs(
        enabled = enabled,
        location = location,
        name = name,
        networkSecurityGroupId = networkSecurityGroupId,
        networkWatcherName = networkWatcherName,
        resourceGroupName = resourceGroupName,
        retentionPolicy = retentionPolicy,
        storageAccountId = storageAccountId,
        tags = tags,
        trafficAnalytics = trafficAnalytics,
        version = version,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy