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

com.pulumi.azure.servicebus.kotlin.inputs.NamespaceNetworkRuleSetArgs.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.servicebus.kotlin.inputs

import com.pulumi.azure.servicebus.inputs.NamespaceNetworkRuleSetArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property defaultAction Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
 * @property ipRules One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
 * @property networkRules One or more `network_rules` blocks as defined below.
 * @property publicNetworkAccessEnabled Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
 * @property trustedServicesAllowed Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
 */
public data class NamespaceNetworkRuleSetArgs(
    public val defaultAction: Output? = null,
    public val ipRules: Output>? = null,
    public val networkRules: Output>? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val trustedServicesAllowed: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.servicebus.inputs.NamespaceNetworkRuleSetArgs =
        com.pulumi.azure.servicebus.inputs.NamespaceNetworkRuleSetArgs.builder()
            .defaultAction(defaultAction?.applyValue({ args0 -> args0 }))
            .ipRules(ipRules?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .networkRules(
                networkRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .trustedServicesAllowed(trustedServicesAllowed?.applyValue({ args0 -> args0 })).build()
}

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

    private var ipRules: Output>? = null

    private var networkRules: Output>? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var trustedServicesAllowed: Output? = null

    /**
     * @param value Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
     */
    @JvmName("algnrtwfjjxxautc")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

    /**
     * @param value One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
     */
    @JvmName("kmxfjdcpxlekastc")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

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

    /**
     * @param values One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
     */
    @JvmName("nvrboxneeauejxld")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

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

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

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

    /**
     * @param value Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
     */
    @JvmName("qbefprpynoxwjxom")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
     */
    @JvmName("rtskbsgwntsuypnt")
    public suspend fun trustedServicesAllowed(`value`: Output) {
        this.trustedServicesAllowed = value
    }

    /**
     * @param value Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
     */
    @JvmName("muarkknunhbjnntc")
    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 Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
     */
    @JvmName("omposwyfmemqsqck")
    public suspend fun ipRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param values One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
     */
    @JvmName("emrqqdrgtanmttvo")
    public suspend fun ipRules(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

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

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

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

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

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

    /**
     * @param value Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
     */
    @JvmName("ierwfjpjmoinjujf")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
     */
    @JvmName("cvepusjmrdluufej")
    public suspend fun trustedServicesAllowed(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trustedServicesAllowed = mapped
    }

    internal fun build(): NamespaceNetworkRuleSetArgs = NamespaceNetworkRuleSetArgs(
        defaultAction = defaultAction,
        ipRules = ipRules,
        networkRules = networkRules,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        trustedServicesAllowed = trustedServicesAllowed,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy