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

com.pulumi.azure.network.kotlin.FirewallNatRuleCollectionArgs.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.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.FirewallNatRuleCollectionArgs.builder
import com.pulumi.azure.network.kotlin.inputs.FirewallNatRuleCollectionRuleArgs
import com.pulumi.azure.network.kotlin.inputs.FirewallNatRuleCollectionRuleArgsBuilder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages a NAT Rule Collection within an Azure Firewall.
 * ## 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 exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "testvnet",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "AzureFirewallSubnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "testpip",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     allocationMethod: "Static",
 *     sku: "Standard",
 * });
 * const exampleFirewall = new azure.network.Firewall("example", {
 *     name: "testfirewall",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "AZFW_VNet",
 *     skuTier: "Standard",
 *     ipConfigurations: [{
 *         name: "configuration",
 *         subnetId: exampleSubnet.id,
 *         publicIpAddressId: examplePublicIp.id,
 *     }],
 * });
 * const exampleFirewallNatRuleCollection = new azure.network.FirewallNatRuleCollection("example", {
 *     name: "testcollection",
 *     azureFirewallName: exampleFirewall.name,
 *     resourceGroupName: example.name,
 *     priority: 100,
 *     action: "Dnat",
 *     rules: [{
 *         name: "testrule",
 *         sourceAddresses: ["10.0.0.0/16"],
 *         destinationPorts: ["53"],
 *         destinationAddresses: [examplePublicIp.ipAddress],
 *         translatedPort: "53",
 *         translatedAddress: "8.8.8.8",
 *         protocols: [
 *             "TCP",
 *             "UDP",
 *         ],
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="testvnet",
 *     address_spaces=["10.0.0.0/16"],
 *     location=example.location,
 *     resource_group_name=example.name)
 * example_subnet = azure.network.Subnet("example",
 *     name="AzureFirewallSubnet",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.1.0/24"])
 * example_public_ip = azure.network.PublicIp("example",
 *     name="testpip",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     allocation_method="Static",
 *     sku="Standard")
 * example_firewall = azure.network.Firewall("example",
 *     name="testfirewall",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="AZFW_VNet",
 *     sku_tier="Standard",
 *     ip_configurations=[azure.network.FirewallIpConfigurationArgs(
 *         name="configuration",
 *         subnet_id=example_subnet.id,
 *         public_ip_address_id=example_public_ip.id,
 *     )])
 * example_firewall_nat_rule_collection = azure.network.FirewallNatRuleCollection("example",
 *     name="testcollection",
 *     azure_firewall_name=example_firewall.name,
 *     resource_group_name=example.name,
 *     priority=100,
 *     action="Dnat",
 *     rules=[azure.network.FirewallNatRuleCollectionRuleArgs(
 *         name="testrule",
 *         source_addresses=["10.0.0.0/16"],
 *         destination_ports=["53"],
 *         destination_addresses=[example_public_ip.ip_address],
 *         translated_port="53",
 *         translated_address="8.8.8.8",
 *         protocols=[
 *             "TCP",
 *             "UDP",
 *         ],
 *     )])
 * ```
 * ```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 exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "testvnet",
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/16",
 *         },
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleSubnet = new Azure.Network.Subnet("example", new()
 *     {
 *         Name = "AzureFirewallSubnet",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.1.0/24",
 *         },
 *     });
 *     var examplePublicIp = new Azure.Network.PublicIp("example", new()
 *     {
 *         Name = "testpip",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AllocationMethod = "Static",
 *         Sku = "Standard",
 *     });
 *     var exampleFirewall = new Azure.Network.Firewall("example", new()
 *     {
 *         Name = "testfirewall",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "AZFW_VNet",
 *         SkuTier = "Standard",
 *         IpConfigurations = new[]
 *         {
 *             new Azure.Network.Inputs.FirewallIpConfigurationArgs
 *             {
 *                 Name = "configuration",
 *                 SubnetId = exampleSubnet.Id,
 *                 PublicIpAddressId = examplePublicIp.Id,
 *             },
 *         },
 *     });
 *     var exampleFirewallNatRuleCollection = new Azure.Network.FirewallNatRuleCollection("example", new()
 *     {
 *         Name = "testcollection",
 *         AzureFirewallName = exampleFirewall.Name,
 *         ResourceGroupName = example.Name,
 *         Priority = 100,
 *         Action = "Dnat",
 *         Rules = new[]
 *         {
 *             new Azure.Network.Inputs.FirewallNatRuleCollectionRuleArgs
 *             {
 *                 Name = "testrule",
 *                 SourceAddresses = new[]
 *                 {
 *                     "10.0.0.0/16",
 *                 },
 *                 DestinationPorts = new[]
 *                 {
 *                     "53",
 *                 },
 *                 DestinationAddresses = new[]
 *                 {
 *                     examplePublicIp.IpAddress,
 *                 },
 *                 TranslatedPort = "53",
 *                 TranslatedAddress = "8.8.8.8",
 *                 Protocols = new[]
 *                 {
 *                     "TCP",
 *                     "UDP",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```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/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
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name: pulumi.String("testvnet"),
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/16"),
 * 			},
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
 * 			Name:               pulumi.String("AzureFirewallSubnet"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.1.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
 * 			Name:              pulumi.String("testpip"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AllocationMethod:  pulumi.String("Static"),
 * 			Sku:               pulumi.String("Standard"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{
 * 			Name:              pulumi.String("testfirewall"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("AZFW_VNet"),
 * 			SkuTier:           pulumi.String("Standard"),
 * 			IpConfigurations: network.FirewallIpConfigurationArray{
 * 				&network.FirewallIpConfigurationArgs{
 * 					Name:              pulumi.String("configuration"),
 * 					SubnetId:          exampleSubnet.ID(),
 * 					PublicIpAddressId: examplePublicIp.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewFirewallNatRuleCollection(ctx, "example", &network.FirewallNatRuleCollectionArgs{
 * 			Name:              pulumi.String("testcollection"),
 * 			AzureFirewallName: exampleFirewall.Name,
 * 			ResourceGroupName: example.Name,
 * 			Priority:          pulumi.Int(100),
 * 			Action:            pulumi.String("Dnat"),
 * 			Rules: network.FirewallNatRuleCollectionRuleArray{
 * 				&network.FirewallNatRuleCollectionRuleArgs{
 * 					Name: pulumi.String("testrule"),
 * 					SourceAddresses: pulumi.StringArray{
 * 						pulumi.String("10.0.0.0/16"),
 * 					},
 * 					DestinationPorts: pulumi.StringArray{
 * 						pulumi.String("53"),
 * 					},
 * 					DestinationAddresses: pulumi.StringArray{
 * 						examplePublicIp.IpAddress,
 * 					},
 * 					TranslatedPort:    pulumi.String("53"),
 * 					TranslatedAddress: pulumi.String("8.8.8.8"),
 * 					Protocols: pulumi.StringArray{
 * 						pulumi.String("TCP"),
 * 						pulumi.String("UDP"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.network.Firewall;
 * import com.pulumi.azure.network.FirewallArgs;
 * import com.pulumi.azure.network.inputs.FirewallIpConfigurationArgs;
 * import com.pulumi.azure.network.FirewallNatRuleCollection;
 * import com.pulumi.azure.network.FirewallNatRuleCollectionArgs;
 * import com.pulumi.azure.network.inputs.FirewallNatRuleCollectionRuleArgs;
 * 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 exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("testvnet")
 *             .addressSpaces("10.0.0.0/16")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("AzureFirewallSubnet")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.1.0/24")
 *             .build());
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("testpip")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .allocationMethod("Static")
 *             .sku("Standard")
 *             .build());
 *         var exampleFirewall = new Firewall("exampleFirewall", FirewallArgs.builder()
 *             .name("testfirewall")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("AZFW_VNet")
 *             .skuTier("Standard")
 *             .ipConfigurations(FirewallIpConfigurationArgs.builder()
 *                 .name("configuration")
 *                 .subnetId(exampleSubnet.id())
 *                 .publicIpAddressId(examplePublicIp.id())
 *                 .build())
 *             .build());
 *         var exampleFirewallNatRuleCollection = new FirewallNatRuleCollection("exampleFirewallNatRuleCollection", FirewallNatRuleCollectionArgs.builder()
 *             .name("testcollection")
 *             .azureFirewallName(exampleFirewall.name())
 *             .resourceGroupName(example.name())
 *             .priority(100)
 *             .action("Dnat")
 *             .rules(FirewallNatRuleCollectionRuleArgs.builder()
 *                 .name("testrule")
 *                 .sourceAddresses("10.0.0.0/16")
 *                 .destinationPorts("53")
 *                 .destinationAddresses(examplePublicIp.ipAddress())
 *                 .translatedPort(53)
 *                 .translatedAddress("8.8.8.8")
 *                 .protocols(
 *                     "TCP",
 *                     "UDP")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: testvnet
 *       addressSpaces:
 *         - 10.0.0.0/16
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   exampleSubnet:
 *     type: azure:network:Subnet
 *     name: example
 *     properties:
 *       name: AzureFirewallSubnet
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.1.0/24
 *   examplePublicIp:
 *     type: azure:network:PublicIp
 *     name: example
 *     properties:
 *       name: testpip
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       allocationMethod: Static
 *       sku: Standard
 *   exampleFirewall:
 *     type: azure:network:Firewall
 *     name: example
 *     properties:
 *       name: testfirewall
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: AZFW_VNet
 *       skuTier: Standard
 *       ipConfigurations:
 *         - name: configuration
 *           subnetId: ${exampleSubnet.id}
 *           publicIpAddressId: ${examplePublicIp.id}
 *   exampleFirewallNatRuleCollection:
 *     type: azure:network:FirewallNatRuleCollection
 *     name: example
 *     properties:
 *       name: testcollection
 *       azureFirewallName: ${exampleFirewall.name}
 *       resourceGroupName: ${example.name}
 *       priority: 100
 *       action: Dnat
 *       rules:
 *         - name: testrule
 *           sourceAddresses:
 *             - 10.0.0.0/16
 *           destinationPorts:
 *             - '53'
 *           destinationAddresses:
 *             - ${examplePublicIp.ipAddress}
 *           translatedPort: 53
 *           translatedAddress: 8.8.8.8
 *           protocols:
 *             - TCP
 *             - UDP
 * ```
 * 
 * ## Import
 * Azure Firewall NAT Rule Collections can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/firewallNatRuleCollection:FirewallNatRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/natRuleCollections/mycollection
 * ```
 * @property action Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`.
 * @property azureFirewallName Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
 * @property name Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
 * @property priority Specifies the priority of the rule collection. Possible values are between `100` - `65000`.
 * @property resourceGroupName Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
 * @property rules One or more `rule` blocks as defined below.
 */
public data class FirewallNatRuleCollectionArgs(
    public val action: Output? = null,
    public val azureFirewallName: Output? = null,
    public val name: Output? = null,
    public val priority: Output? = null,
    public val resourceGroupName: Output? = null,
    public val rules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.FirewallNatRuleCollectionArgs =
        com.pulumi.azure.network.FirewallNatRuleCollectionArgs.builder()
            .action(action?.applyValue({ args0 -> args0 }))
            .azureFirewallName(azureFirewallName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .rules(
                rules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [FirewallNatRuleCollectionArgs].
 */
@PulumiTagMarker
public class FirewallNatRuleCollectionArgsBuilder internal constructor() {
    private var action: Output? = null

    private var azureFirewallName: Output? = null

    private var name: Output? = null

    private var priority: Output? = null

    private var resourceGroupName: Output? = null

    private var rules: Output>? = null

    /**
     * @param value Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`.
     */
    @JvmName("yclbukiwxpvfcsah")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
     */
    @JvmName("glexnqagexkwjvdv")
    public suspend fun azureFirewallName(`value`: Output) {
        this.azureFirewallName = value
    }

    /**
     * @param value Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
     */
    @JvmName("iuncyatyckyqcllv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the priority of the rule collection. Possible values are between `100` - `65000`.
     */
    @JvmName("gtbnpckrmjpfryup")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
     */
    @JvmName("nqewbwhmcuqdajmn")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value One or more `rule` blocks as defined below.
     */
    @JvmName("iuijvqlmkmagnhkh")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

    @JvmName("eulnenuvdyavstfy")
    public suspend fun rules(vararg values: Output) {
        this.rules = Output.all(values.asList())
    }

    /**
     * @param values One or more `rule` blocks as defined below.
     */
    @JvmName("qeeykeiyqsvurdgf")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`.
     */
    @JvmName("draxqyeuvclqjuii")
    public suspend fun action(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created.
     */
    @JvmName("aslkoeqhodxpowhr")
    public suspend fun azureFirewallName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.azureFirewallName = mapped
    }

    /**
     * @param value Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created.
     */
    @JvmName("bgahmiktgljisicq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the priority of the rule collection. Possible values are between `100` - `65000`.
     */
    @JvmName("crexipspnwwxaivi")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created.
     */
    @JvmName("aqyvcvwlnhpwedws")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value One or more `rule` blocks as defined below.
     */
    @JvmName("lkdlnjvowgedylit")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument One or more `rule` blocks as defined below.
     */
    @JvmName("vwvrlqjfucekjsfl")
    public suspend
    fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallNatRuleCollectionRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument One or more `rule` blocks as defined below.
     */
    @JvmName("lbvdecgkrvyqckqi")
    public suspend fun rules(
        vararg
        argument: suspend FirewallNatRuleCollectionRuleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            FirewallNatRuleCollectionRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument One or more `rule` blocks as defined below.
     */
    @JvmName("isxhxmwpbxabgwwf")
    public suspend fun rules(argument: suspend FirewallNatRuleCollectionRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FirewallNatRuleCollectionRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values One or more `rule` blocks as defined below.
     */
    @JvmName("fgcaokjrocayrtdb")
    public suspend fun rules(vararg values: FirewallNatRuleCollectionRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): FirewallNatRuleCollectionArgs = FirewallNatRuleCollectionArgs(
        action = action,
        azureFirewallName = azureFirewallName,
        name = name,
        priority = priority,
        resourceGroupName = resourceGroupName,
        rules = rules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy