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

com.pulumi.azure.eventhub.kotlin.inputs.EventHubNamespaceNetworkRulesetsArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.eventhub.kotlin.inputs

import com.pulumi.azure.eventhub.inputs.EventHubNamespaceNetworkRulesetsArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property defaultAction The default action to take when a rule is not matched. Possible values are `Allow` and `Deny`.
 * @property ipRules One or more `ip_rule` blocks as defined below.
 * @property publicNetworkAccessEnabled Is public network access enabled for the EventHub Namespace? Defaults to `true`.
 * > **Note:** The public network access setting at the network rule sets level should be the same as it's at the namespace level.
 * @property trustedServiceAccessEnabled Whether Trusted Microsoft Services are allowed to bypass firewall.
 * @property virtualNetworkRules One or more `virtual_network_rule` blocks as defined below.
 */
public data class EventHubNamespaceNetworkRulesetsArgs(
    public val defaultAction: Output,
    public val ipRules: Output>? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val trustedServiceAccessEnabled: Output? = null,
    public val virtualNetworkRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.eventhub.inputs.EventHubNamespaceNetworkRulesetsArgs =
        com.pulumi.azure.eventhub.inputs.EventHubNamespaceNetworkRulesetsArgs.builder()
            .defaultAction(defaultAction.applyValue({ args0 -> args0 }))
            .ipRules(
                ipRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .trustedServiceAccessEnabled(trustedServiceAccessEnabled?.applyValue({ args0 -> args0 }))
            .virtualNetworkRules(
                virtualNetworkRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [EventHubNamespaceNetworkRulesetsArgs].
 */
@PulumiTagMarker
public class EventHubNamespaceNetworkRulesetsArgsBuilder internal constructor() {
    private var defaultAction: Output? = null

    private var ipRules: Output>? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var trustedServiceAccessEnabled: Output? = null

    private var virtualNetworkRules:
        Output>? = null

    /**
     * @param value The default action to take when a rule is not matched. Possible values are `Allow` and `Deny`.
     */
    @JvmName("nfevgvkqgoyuxvln")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

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

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

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

    /**
     * @param value Is public network access enabled for the EventHub Namespace? Defaults to `true`.
     * > **Note:** The public network access setting at the network rule sets level should be the same as it's at the namespace level.
     */
    @JvmName("lngrajeqsaqqnjec")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value Whether Trusted Microsoft Services are allowed to bypass firewall.
     */
    @JvmName("yvpqekpkrmphlcaf")
    public suspend fun trustedServiceAccessEnabled(`value`: Output) {
        this.trustedServiceAccessEnabled = value
    }

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

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

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

    /**
     * @param value The default action to take when a rule is not matched. Possible values are `Allow` and `Deny`.
     */
    @JvmName("ymxwfhlhhdlogfxe")
    public suspend fun defaultAction(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

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

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

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

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

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

    /**
     * @param value Is public network access enabled for the EventHub Namespace? Defaults to `true`.
     * > **Note:** The public network access setting at the network rule sets level should be the same as it's at the namespace level.
     */
    @JvmName("yrxukqctvryanxvf")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value Whether Trusted Microsoft Services are allowed to bypass firewall.
     */
    @JvmName("nhbcmtjjblhjdvgu")
    public suspend fun trustedServiceAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trustedServiceAccessEnabled = mapped
    }

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

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

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

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

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

    internal fun build(): EventHubNamespaceNetworkRulesetsArgs = EventHubNamespaceNetworkRulesetsArgs(
        defaultAction = defaultAction ?: throw PulumiNullFieldException("defaultAction"),
        ipRules = ipRules,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        trustedServiceAccessEnabled = trustedServiceAccessEnabled,
        virtualNetworkRules = virtualNetworkRules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy