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

com.pulumi.digitalocean.kotlin.FirewallArgs.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: 4.38.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.FirewallArgs.builder
import com.pulumi.digitalocean.kotlin.inputs.FirewallInboundRuleArgs
import com.pulumi.digitalocean.kotlin.inputs.FirewallInboundRuleArgsBuilder
import com.pulumi.digitalocean.kotlin.inputs.FirewallOutboundRuleArgs
import com.pulumi.digitalocean.kotlin.inputs.FirewallOutboundRuleArgsBuilder
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

/**
 * Provides a DigitalOcean Cloud Firewall resource. This can be used to create,
 * modify, and delete Firewalls.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as digitalocean from "@pulumi/digitalocean";
 * const web = new digitalocean.Droplet("web", {
 *     name: "web-1",
 *     size: digitalocean.DropletSlug.DropletS1VCPU1GB,
 *     image: "ubuntu-18-04-x64",
 *     region: digitalocean.Region.NYC3,
 * });
 * const webFirewall = new digitalocean.Firewall("web", {
 *     name: "only-22-80-and-443",
 *     dropletIds: [web.id],
 *     inboundRules: [
 *         {
 *             protocol: "tcp",
 *             portRange: "22",
 *             sourceAddresses: [
 *                 "192.168.1.0/24",
 *                 "2002:1:2::/48",
 *             ],
 *         },
 *         {
 *             protocol: "tcp",
 *             portRange: "80",
 *             sourceAddresses: [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             protocol: "tcp",
 *             portRange: "443",
 *             sourceAddresses: [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             protocol: "icmp",
 *             sourceAddresses: [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *     ],
 *     outboundRules: [
 *         {
 *             protocol: "tcp",
 *             portRange: "53",
 *             destinationAddresses: [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             protocol: "udp",
 *             portRange: "53",
 *             destinationAddresses: [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             protocol: "icmp",
 *             destinationAddresses: [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_digitalocean as digitalocean
 * web = digitalocean.Droplet("web",
 *     name="web-1",
 *     size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
 *     image="ubuntu-18-04-x64",
 *     region=digitalocean.Region.NYC3)
 * web_firewall = digitalocean.Firewall("web",
 *     name="only-22-80-and-443",
 *     droplet_ids=[web.id],
 *     inbound_rules=[
 *         {
 *             "protocol": "tcp",
 *             "port_range": "22",
 *             "source_addresses": [
 *                 "192.168.1.0/24",
 *                 "2002:1:2::/48",
 *             ],
 *         },
 *         {
 *             "protocol": "tcp",
 *             "port_range": "80",
 *             "source_addresses": [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             "protocol": "tcp",
 *             "port_range": "443",
 *             "source_addresses": [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             "protocol": "icmp",
 *             "source_addresses": [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *     ],
 *     outbound_rules=[
 *         {
 *             "protocol": "tcp",
 *             "port_range": "53",
 *             "destination_addresses": [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             "protocol": "udp",
 *             "port_range": "53",
 *             "destination_addresses": [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *         {
 *             "protocol": "icmp",
 *             "destination_addresses": [
 *                 "0.0.0.0/0",
 *                 "::/0",
 *             ],
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using DigitalOcean = Pulumi.DigitalOcean;
 * return await Deployment.RunAsync(() =>
 * {
 *     var web = new DigitalOcean.Droplet("web", new()
 *     {
 *         Name = "web-1",
 *         Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB,
 *         Image = "ubuntu-18-04-x64",
 *         Region = DigitalOcean.Region.NYC3,
 *     });
 *     var webFirewall = new DigitalOcean.Firewall("web", new()
 *     {
 *         Name = "only-22-80-and-443",
 *         DropletIds = new[]
 *         {
 *             web.Id,
 *         },
 *         InboundRules = new[]
 *         {
 *             new DigitalOcean.Inputs.FirewallInboundRuleArgs
 *             {
 *                 Protocol = "tcp",
 *                 PortRange = "22",
 *                 SourceAddresses = new[]
 *                 {
 *                     "192.168.1.0/24",
 *                     "2002:1:2::/48",
 *                 },
 *             },
 *             new DigitalOcean.Inputs.FirewallInboundRuleArgs
 *             {
 *                 Protocol = "tcp",
 *                 PortRange = "80",
 *                 SourceAddresses = new[]
 *                 {
 *                     "0.0.0.0/0",
 *                     "::/0",
 *                 },
 *             },
 *             new DigitalOcean.Inputs.FirewallInboundRuleArgs
 *             {
 *                 Protocol = "tcp",
 *                 PortRange = "443",
 *                 SourceAddresses = new[]
 *                 {
 *                     "0.0.0.0/0",
 *                     "::/0",
 *                 },
 *             },
 *             new DigitalOcean.Inputs.FirewallInboundRuleArgs
 *             {
 *                 Protocol = "icmp",
 *                 SourceAddresses = new[]
 *                 {
 *                     "0.0.0.0/0",
 *                     "::/0",
 *                 },
 *             },
 *         },
 *         OutboundRules = new[]
 *         {
 *             new DigitalOcean.Inputs.FirewallOutboundRuleArgs
 *             {
 *                 Protocol = "tcp",
 *                 PortRange = "53",
 *                 DestinationAddresses = new[]
 *                 {
 *                     "0.0.0.0/0",
 *                     "::/0",
 *                 },
 *             },
 *             new DigitalOcean.Inputs.FirewallOutboundRuleArgs
 *             {
 *                 Protocol = "udp",
 *                 PortRange = "53",
 *                 DestinationAddresses = new[]
 *                 {
 *                     "0.0.0.0/0",
 *                     "::/0",
 *                 },
 *             },
 *             new DigitalOcean.Inputs.FirewallOutboundRuleArgs
 *             {
 *                 Protocol = "icmp",
 *                 DestinationAddresses = new[]
 *                 {
 *                     "0.0.0.0/0",
 *                     "::/0",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		web, err := digitalocean.NewDroplet(ctx, "web", &digitalocean.DropletArgs{
 * 			Name:   pulumi.String("web-1"),
 * 			Size:   pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB),
 * 			Image:  pulumi.String("ubuntu-18-04-x64"),
 * 			Region: pulumi.String(digitalocean.RegionNYC3),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = digitalocean.NewFirewall(ctx, "web", &digitalocean.FirewallArgs{
 * 			Name: pulumi.String("only-22-80-and-443"),
 * 			DropletIds: pulumi.IntArray{
 * 				web.ID(),
 * 			},
 * 			InboundRules: digitalocean.FirewallInboundRuleArray{
 * 				&digitalocean.FirewallInboundRuleArgs{
 * 					Protocol:  pulumi.String("tcp"),
 * 					PortRange: pulumi.String("22"),
 * 					SourceAddresses: pulumi.StringArray{
 * 						pulumi.String("192.168.1.0/24"),
 * 						pulumi.String("2002:1:2::/48"),
 * 					},
 * 				},
 * 				&digitalocean.FirewallInboundRuleArgs{
 * 					Protocol:  pulumi.String("tcp"),
 * 					PortRange: pulumi.String("80"),
 * 					SourceAddresses: pulumi.StringArray{
 * 						pulumi.String("0.0.0.0/0"),
 * 						pulumi.String("::/0"),
 * 					},
 * 				},
 * 				&digitalocean.FirewallInboundRuleArgs{
 * 					Protocol:  pulumi.String("tcp"),
 * 					PortRange: pulumi.String("443"),
 * 					SourceAddresses: pulumi.StringArray{
 * 						pulumi.String("0.0.0.0/0"),
 * 						pulumi.String("::/0"),
 * 					},
 * 				},
 * 				&digitalocean.FirewallInboundRuleArgs{
 * 					Protocol: pulumi.String("icmp"),
 * 					SourceAddresses: pulumi.StringArray{
 * 						pulumi.String("0.0.0.0/0"),
 * 						pulumi.String("::/0"),
 * 					},
 * 				},
 * 			},
 * 			OutboundRules: digitalocean.FirewallOutboundRuleArray{
 * 				&digitalocean.FirewallOutboundRuleArgs{
 * 					Protocol:  pulumi.String("tcp"),
 * 					PortRange: pulumi.String("53"),
 * 					DestinationAddresses: pulumi.StringArray{
 * 						pulumi.String("0.0.0.0/0"),
 * 						pulumi.String("::/0"),
 * 					},
 * 				},
 * 				&digitalocean.FirewallOutboundRuleArgs{
 * 					Protocol:  pulumi.String("udp"),
 * 					PortRange: pulumi.String("53"),
 * 					DestinationAddresses: pulumi.StringArray{
 * 						pulumi.String("0.0.0.0/0"),
 * 						pulumi.String("::/0"),
 * 					},
 * 				},
 * 				&digitalocean.FirewallOutboundRuleArgs{
 * 					Protocol: pulumi.String("icmp"),
 * 					DestinationAddresses: pulumi.StringArray{
 * 						pulumi.String("0.0.0.0/0"),
 * 						pulumi.String("::/0"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.digitalocean.Droplet;
 * import com.pulumi.digitalocean.DropletArgs;
 * import com.pulumi.digitalocean.Firewall;
 * import com.pulumi.digitalocean.FirewallArgs;
 * import com.pulumi.digitalocean.inputs.FirewallInboundRuleArgs;
 * import com.pulumi.digitalocean.inputs.FirewallOutboundRuleArgs;
 * 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 web = new Droplet("web", DropletArgs.builder()
 *             .name("web-1")
 *             .size("s-1vcpu-1gb")
 *             .image("ubuntu-18-04-x64")
 *             .region("nyc3")
 *             .build());
 *         var webFirewall = new Firewall("webFirewall", FirewallArgs.builder()
 *             .name("only-22-80-and-443")
 *             .dropletIds(web.id())
 *             .inboundRules(
 *                 FirewallInboundRuleArgs.builder()
 *                     .protocol("tcp")
 *                     .portRange("22")
 *                     .sourceAddresses(
 *                         "192.168.1.0/24",
 *                         "2002:1:2::/48")
 *                     .build(),
 *                 FirewallInboundRuleArgs.builder()
 *                     .protocol("tcp")
 *                     .portRange("80")
 *                     .sourceAddresses(
 *                         "0.0.0.0/0",
 *                         "::/0")
 *                     .build(),
 *                 FirewallInboundRuleArgs.builder()
 *                     .protocol("tcp")
 *                     .portRange("443")
 *                     .sourceAddresses(
 *                         "0.0.0.0/0",
 *                         "::/0")
 *                     .build(),
 *                 FirewallInboundRuleArgs.builder()
 *                     .protocol("icmp")
 *                     .sourceAddresses(
 *                         "0.0.0.0/0",
 *                         "::/0")
 *                     .build())
 *             .outboundRules(
 *                 FirewallOutboundRuleArgs.builder()
 *                     .protocol("tcp")
 *                     .portRange("53")
 *                     .destinationAddresses(
 *                         "0.0.0.0/0",
 *                         "::/0")
 *                     .build(),
 *                 FirewallOutboundRuleArgs.builder()
 *                     .protocol("udp")
 *                     .portRange("53")
 *                     .destinationAddresses(
 *                         "0.0.0.0/0",
 *                         "::/0")
 *                     .build(),
 *                 FirewallOutboundRuleArgs.builder()
 *                     .protocol("icmp")
 *                     .destinationAddresses(
 *                         "0.0.0.0/0",
 *                         "::/0")
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   web:
 *     type: digitalocean:Droplet
 *     properties:
 *       name: web-1
 *       size: s-1vcpu-1gb
 *       image: ubuntu-18-04-x64
 *       region: nyc3
 *   webFirewall:
 *     type: digitalocean:Firewall
 *     name: web
 *     properties:
 *       name: only-22-80-and-443
 *       dropletIds:
 *         - ${web.id}
 *       inboundRules:
 *         - protocol: tcp
 *           portRange: '22'
 *           sourceAddresses:
 *             - 192.168.1.0/24
 *             - 2002:1:2::/48
 *         - protocol: tcp
 *           portRange: '80'
 *           sourceAddresses:
 *             - 0.0.0.0/0
 *             - ::/0
 *         - protocol: tcp
 *           portRange: '443'
 *           sourceAddresses:
 *             - 0.0.0.0/0
 *             - ::/0
 *         - protocol: icmp
 *           sourceAddresses:
 *             - 0.0.0.0/0
 *             - ::/0
 *       outboundRules:
 *         - protocol: tcp
 *           portRange: '53'
 *           destinationAddresses:
 *             - 0.0.0.0/0
 *             - ::/0
 *         - protocol: udp
 *           portRange: '53'
 *           destinationAddresses:
 *             - 0.0.0.0/0
 *             - ::/0
 *         - protocol: icmp
 *           destinationAddresses:
 *             - 0.0.0.0/0
 *             - ::/0
 * ```
 * 
 * ## Import
 * Firewalls can be imported using the firewall `id`, e.g.
 * ```sh
 * $ pulumi import digitalocean:index/firewall:Firewall myfirewall b8ecd2ab-2267-4a5e-8692-cbf1d32583e3
 * ```
 * @property dropletIds The list of the IDs of the Droplets assigned
 * to the Firewall.
 * @property inboundRules The inbound access rule block for the Firewall.
 * The `inbound_rule` block is documented below.
 * @property name The Firewall name
 * @property outboundRules The outbound access rule block for the Firewall.
 * The `outbound_rule` block is documented below.
 * @property tags The names of the Tags assigned to the Firewall.
 */
public data class FirewallArgs(
    public val dropletIds: Output>? = null,
    public val inboundRules: Output>? = null,
    public val name: Output? = null,
    public val outboundRules: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.FirewallArgs =
        com.pulumi.digitalocean.FirewallArgs.builder()
            .dropletIds(dropletIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .inboundRules(
                inboundRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .outboundRules(
                outboundRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [FirewallArgs].
 */
@PulumiTagMarker
public class FirewallArgsBuilder internal constructor() {
    private var dropletIds: Output>? = null

    private var inboundRules: Output>? = null

    private var name: Output? = null

    private var outboundRules: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value The list of the IDs of the Droplets assigned
     * to the Firewall.
     */
    @JvmName("hfueuiamsbmaqclf")
    public suspend fun dropletIds(`value`: Output>) {
        this.dropletIds = value
    }

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

    /**
     * @param values The list of the IDs of the Droplets assigned
     * to the Firewall.
     */
    @JvmName("atrexghslnmxjyed")
    public suspend fun dropletIds(values: List>) {
        this.dropletIds = Output.all(values)
    }

    /**
     * @param value The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("ekahqdyyljvabfra")
    public suspend fun inboundRules(`value`: Output>) {
        this.inboundRules = value
    }

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

    /**
     * @param values The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("qqpunkivliwacggk")
    public suspend fun inboundRules(values: List>) {
        this.inboundRules = Output.all(values)
    }

    /**
     * @param value The Firewall name
     */
    @JvmName("lmfgaxwrknotbnro")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("rnhaflndtaydhfei")
    public suspend fun outboundRules(`value`: Output>) {
        this.outboundRules = value
    }

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

    /**
     * @param values The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("fmdyktojkhqaqcgu")
    public suspend fun outboundRules(values: List>) {
        this.outboundRules = Output.all(values)
    }

    /**
     * @param value The names of the Tags assigned to the Firewall.
     */
    @JvmName("ddaqwfnfljopuygi")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The names of the Tags assigned to the Firewall.
     */
    @JvmName("uswmjnjnhrvpyagi")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The list of the IDs of the Droplets assigned
     * to the Firewall.
     */
    @JvmName("hctrunawnihlmlpg")
    public suspend fun dropletIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dropletIds = mapped
    }

    /**
     * @param values The list of the IDs of the Droplets assigned
     * to the Firewall.
     */
    @JvmName("usnnqcgwtdawouey")
    public suspend fun dropletIds(vararg values: Int) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dropletIds = mapped
    }

    /**
     * @param value The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("pfuerhtkkuonioqh")
    public suspend fun inboundRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inboundRules = mapped
    }

    /**
     * @param argument The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("piejwejalkgarkbv")
    public suspend fun inboundRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallInboundRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.inboundRules = mapped
    }

    /**
     * @param argument The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("djbjhduqnvfcnwll")
    public suspend fun inboundRules(vararg argument: suspend FirewallInboundRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FirewallInboundRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.inboundRules = mapped
    }

    /**
     * @param argument The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("kdfmgbkquntpqref")
    public suspend fun inboundRules(argument: suspend FirewallInboundRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FirewallInboundRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.inboundRules = mapped
    }

    /**
     * @param values The inbound access rule block for the Firewall.
     * The `inbound_rule` block is documented below.
     */
    @JvmName("tsoqqsemsisomvql")
    public suspend fun inboundRules(vararg values: FirewallInboundRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inboundRules = mapped
    }

    /**
     * @param value The Firewall name
     */
    @JvmName("wkyjlksbbcprjbqr")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("agmnlyrltprbwsns")
    public suspend fun outboundRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outboundRules = mapped
    }

    /**
     * @param argument The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("akohvewhpgqldnxx")
    public suspend fun outboundRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallOutboundRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.outboundRules = mapped
    }

    /**
     * @param argument The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("phxbhietodggibfb")
    public suspend fun outboundRules(vararg argument: suspend FirewallOutboundRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FirewallOutboundRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.outboundRules = mapped
    }

    /**
     * @param argument The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("ncfbxtjddbprrkmo")
    public suspend fun outboundRules(argument: suspend FirewallOutboundRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FirewallOutboundRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.outboundRules = mapped
    }

    /**
     * @param values The outbound access rule block for the Firewall.
     * The `outbound_rule` block is documented below.
     */
    @JvmName("uahahebvhbuhcoro")
    public suspend fun outboundRules(vararg values: FirewallOutboundRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.outboundRules = mapped
    }

    /**
     * @param value The names of the Tags assigned to the Firewall.
     */
    @JvmName("hsuraoljxixdbgxk")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The names of the Tags assigned to the Firewall.
     */
    @JvmName("psabkmtqmhlbqhqo")
    public suspend fun tags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): FirewallArgs = FirewallArgs(
        dropletIds = dropletIds,
        inboundRules = inboundRules,
        name = name,
        outboundRules = outboundRules,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy