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

com.pulumi.azure.iot.kotlin.inputs.IoTHubNetworkRuleSetArgs.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.iot.kotlin.inputs

import com.pulumi.azure.iot.inputs.IoTHubNetworkRuleSetArgs.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 applyToBuiltinEventhubEndpoint Determines if Network Rule Set is also applied to the BuiltIn EventHub EndPoint of the IotHub. Defaults to `false`.
 * @property defaultAction Default Action for Network Rule Set. Possible values are `DefaultActionDeny`, `DefaultActionAllow`. Defaults to `DefaultActionDeny`.
 * @property ipRules One or more `ip_rule` blocks as defined below.
 */
public data class IoTHubNetworkRuleSetArgs(
    public val applyToBuiltinEventhubEndpoint: Output? = null,
    public val defaultAction: Output? = null,
    public val ipRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.iot.inputs.IoTHubNetworkRuleSetArgs =
        com.pulumi.azure.iot.inputs.IoTHubNetworkRuleSetArgs.builder()
            .applyToBuiltinEventhubEndpoint(applyToBuiltinEventhubEndpoint?.applyValue({ args0 -> args0 }))
            .defaultAction(defaultAction?.applyValue({ args0 -> args0 }))
            .ipRules(
                ipRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [IoTHubNetworkRuleSetArgs].
 */
@PulumiTagMarker
public class IoTHubNetworkRuleSetArgsBuilder internal constructor() {
    private var applyToBuiltinEventhubEndpoint: Output? = null

    private var defaultAction: Output? = null

    private var ipRules: Output>? = null

    /**
     * @param value Determines if Network Rule Set is also applied to the BuiltIn EventHub EndPoint of the IotHub. Defaults to `false`.
     */
    @JvmName("vennanmycstgpmwx")
    public suspend fun applyToBuiltinEventhubEndpoint(`value`: Output) {
        this.applyToBuiltinEventhubEndpoint = value
    }

    /**
     * @param value Default Action for Network Rule Set. Possible values are `DefaultActionDeny`, `DefaultActionAllow`. Defaults to `DefaultActionDeny`.
     */
    @JvmName("tdfrlqooojkjncaw")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

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

    @JvmName("cpraxywmjusgkiuk")
    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("kotkyydiffqtnogu")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value Determines if Network Rule Set is also applied to the BuiltIn EventHub EndPoint of the IotHub. Defaults to `false`.
     */
    @JvmName("pddnmaehitgpeygh")
    public suspend fun applyToBuiltinEventhubEndpoint(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applyToBuiltinEventhubEndpoint = mapped
    }

    /**
     * @param value Default Action for Network Rule Set. Possible values are `DefaultActionDeny`, `DefaultActionAllow`. Defaults to `DefaultActionDeny`.
     */
    @JvmName("pvtvqlsqimftdpot")
    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("ynuacykyhmjmwtvy")
    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("lalklcjucjlsmcmt")
    public suspend fun ipRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IoTHubNetworkRuleSetIpRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

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

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

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

    internal fun build(): IoTHubNetworkRuleSetArgs = IoTHubNetworkRuleSetArgs(
        applyToBuiltinEventhubEndpoint = applyToBuiltinEventhubEndpoint,
        defaultAction = defaultAction,
        ipRules = ipRules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy