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

com.pulumi.azure.network.kotlin.inputs.FirewallApplicationRuleCollectionRuleArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin.inputs

import com.pulumi.azure.network.inputs.FirewallApplicationRuleCollectionRuleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property description Specifies a description for the rule.
 * @property fqdnTags A list of FQDN tags. Possible values are `AppServiceEnvironment`, `AzureBackup`, `AzureKubernetesService`, `HDInsight`, `MicrosoftActiveProtectionService`, `WindowsDiagnostics`, `WindowsUpdate` and `WindowsVirtualDesktop`.
 * @property name Specifies the name of the rule.
 * @property protocols One or more `protocol` blocks as defined below.
 * @property sourceAddresses A list of source IP addresses and/or IP ranges.
 * @property sourceIpGroups A list of source IP Group IDs for the rule.
 * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
 * @property targetFqdns A list of FQDNs.
 */
public data class FirewallApplicationRuleCollectionRuleArgs(
    public val description: Output? = null,
    public val fqdnTags: Output>? = null,
    public val name: Output,
    public val protocols: Output>? = null,
    public val sourceAddresses: Output>? = null,
    public val sourceIpGroups: Output>? = null,
    public val targetFqdns: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.inputs.FirewallApplicationRuleCollectionRuleArgs =
        com.pulumi.azure.network.inputs.FirewallApplicationRuleCollectionRuleArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .fqdnTags(fqdnTags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .protocols(
                protocols?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .sourceAddresses(sourceAddresses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sourceIpGroups(sourceIpGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .targetFqdns(targetFqdns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [FirewallApplicationRuleCollectionRuleArgs].
 */
@PulumiTagMarker
public class FirewallApplicationRuleCollectionRuleArgsBuilder internal constructor() {
    private var description: Output? = null

    private var fqdnTags: Output>? = null

    private var name: Output? = null

    private var protocols: Output>? = null

    private var sourceAddresses: Output>? = null

    private var sourceIpGroups: Output>? = null

    private var targetFqdns: Output>? = null

    /**
     * @param value Specifies a description for the rule.
     */
    @JvmName("lqfvmoqrlunkchrg")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A list of FQDN tags. Possible values are `AppServiceEnvironment`, `AzureBackup`, `AzureKubernetesService`, `HDInsight`, `MicrosoftActiveProtectionService`, `WindowsDiagnostics`, `WindowsUpdate` and `WindowsVirtualDesktop`.
     */
    @JvmName("hcxixfcknkobvnjx")
    public suspend fun fqdnTags(`value`: Output>) {
        this.fqdnTags = value
    }

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

    /**
     * @param values A list of FQDN tags. Possible values are `AppServiceEnvironment`, `AzureBackup`, `AzureKubernetesService`, `HDInsight`, `MicrosoftActiveProtectionService`, `WindowsDiagnostics`, `WindowsUpdate` and `WindowsVirtualDesktop`.
     */
    @JvmName("jwjovtplesiknvhd")
    public suspend fun fqdnTags(values: List>) {
        this.fqdnTags = Output.all(values)
    }

    /**
     * @param value Specifies the name of the rule.
     */
    @JvmName("fdotygldfymyeppg")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    @JvmName("wauradcdgbvxoksl")
    public suspend fun protocols(
        vararg
        values: Output,
    ) {
        this.protocols = Output.all(values.asList())
    }

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

    /**
     * @param value A list of source IP addresses and/or IP ranges.
     */
    @JvmName("bbohhhrgdxctdmtn")
    public suspend fun sourceAddresses(`value`: Output>) {
        this.sourceAddresses = value
    }

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

    /**
     * @param values A list of source IP addresses and/or IP ranges.
     */
    @JvmName("snyquajcmwovogoj")
    public suspend fun sourceAddresses(values: List>) {
        this.sourceAddresses = Output.all(values)
    }

    /**
     * @param value A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("icltxqhfnnsbarfc")
    public suspend fun sourceIpGroups(`value`: Output>) {
        this.sourceIpGroups = value
    }

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

    /**
     * @param values A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("ncuheosnkvkydlmv")
    public suspend fun sourceIpGroups(values: List>) {
        this.sourceIpGroups = Output.all(values)
    }

    /**
     * @param value A list of FQDNs.
     */
    @JvmName("jeoqrpmrtbeinewf")
    public suspend fun targetFqdns(`value`: Output>) {
        this.targetFqdns = value
    }

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

    /**
     * @param values A list of FQDNs.
     */
    @JvmName("ttjwfvmwrprhcfxo")
    public suspend fun targetFqdns(values: List>) {
        this.targetFqdns = Output.all(values)
    }

    /**
     * @param value Specifies a description for the rule.
     */
    @JvmName("hljwtucgqwavhiaq")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A list of FQDN tags. Possible values are `AppServiceEnvironment`, `AzureBackup`, `AzureKubernetesService`, `HDInsight`, `MicrosoftActiveProtectionService`, `WindowsDiagnostics`, `WindowsUpdate` and `WindowsVirtualDesktop`.
     */
    @JvmName("pcgradskvkynvxqu")
    public suspend fun fqdnTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fqdnTags = mapped
    }

    /**
     * @param values A list of FQDN tags. Possible values are `AppServiceEnvironment`, `AzureBackup`, `AzureKubernetesService`, `HDInsight`, `MicrosoftActiveProtectionService`, `WindowsDiagnostics`, `WindowsUpdate` and `WindowsVirtualDesktop`.
     */
    @JvmName("qcumowxejwotarjn")
    public suspend fun fqdnTags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fqdnTags = mapped
    }

    /**
     * @param value Specifies the name of the rule.
     */
    @JvmName("ftbswwvesgxyprnk")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

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

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

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

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

    /**
     * @param value A list of source IP addresses and/or IP ranges.
     */
    @JvmName("qpiobcxontondeho")
    public suspend fun sourceAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceAddresses = mapped
    }

    /**
     * @param values A list of source IP addresses and/or IP ranges.
     */
    @JvmName("jwlteoxavmkhyvlg")
    public suspend fun sourceAddresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceAddresses = mapped
    }

    /**
     * @param value A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("wifugqwkycfmmhxt")
    public suspend fun sourceIpGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceIpGroups = mapped
    }

    /**
     * @param values A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("shfhrlddqqvixhmr")
    public suspend fun sourceIpGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceIpGroups = mapped
    }

    /**
     * @param value A list of FQDNs.
     */
    @JvmName("yaqrragmpoalpnyq")
    public suspend fun targetFqdns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetFqdns = mapped
    }

    /**
     * @param values A list of FQDNs.
     */
    @JvmName("lkxqmtwqyppundfi")
    public suspend fun targetFqdns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetFqdns = mapped
    }

    internal fun build(): FirewallApplicationRuleCollectionRuleArgs =
        FirewallApplicationRuleCollectionRuleArgs(
            description = description,
            fqdnTags = fqdnTags,
            name = name ?: throw PulumiNullFieldException("name"),
            protocols = protocols,
            sourceAddresses = sourceAddresses,
            sourceIpGroups = sourceIpGroups,
            targetFqdns = targetFqdns,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy