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

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

package com.pulumi.azure.cognitive.kotlin.inputs

import com.pulumi.azure.cognitive.inputs.AccountNetworkAclsArgs.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 defaultAction The Default Action to use when no rules match from `ip_rules` / `virtual_network_rules`. Possible values are `Allow` and `Deny`.
 * @property ipRules One or more IP Addresses, or CIDR Blocks which should be able to access the Cognitive Account.
 * @property virtualNetworkRules A `virtual_network_rules` block as defined below.
 */
public data class AccountNetworkAclsArgs(
    public val defaultAction: Output,
    public val ipRules: Output>? = null,
    public val virtualNetworkRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cognitive.inputs.AccountNetworkAclsArgs =
        com.pulumi.azure.cognitive.inputs.AccountNetworkAclsArgs.builder()
            .defaultAction(defaultAction.applyValue({ args0 -> args0 }))
            .ipRules(ipRules?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .virtualNetworkRules(
                virtualNetworkRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

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

    private var ipRules: Output>? = null

    private var virtualNetworkRules: Output>? = null

    /**
     * @param value The Default Action to use when no rules match from `ip_rules` / `virtual_network_rules`. Possible values are `Allow` and `Deny`.
     */
    @JvmName("hantrptcjkegejao")
    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 Cognitive Account.
     */
    @JvmName("uxtayqceantkqhnj")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

    @JvmName("xibbqbftyqpqjquw")
    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 Cognitive Account.
     */
    @JvmName("qfjgnulttbnkktxi")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value A `virtual_network_rules` block as defined below.
     */
    @JvmName("iurlbjcdxkqjpgot")
    public suspend
    fun virtualNetworkRules(`value`: Output>) {
        this.virtualNetworkRules = value
    }

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

    /**
     * @param values A `virtual_network_rules` block as defined below.
     */
    @JvmName("wbwwjvocddbxekga")
    public suspend
    fun virtualNetworkRules(values: List>) {
        this.virtualNetworkRules = Output.all(values)
    }

    /**
     * @param value The Default Action to use when no rules match from `ip_rules` / `virtual_network_rules`. Possible values are `Allow` and `Deny`.
     */
    @JvmName("ludvijpvmtjwcjjd")
    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 Cognitive Account.
     */
    @JvmName("bvitqhxpixukwqyu")
    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 Cognitive Account.
     */
    @JvmName("jvartejnoemowvwx")
    public suspend fun ipRules(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param value A `virtual_network_rules` block as defined below.
     */
    @JvmName("pmjbbhcctgavnnhp")
    public suspend fun virtualNetworkRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument A `virtual_network_rules` block as defined below.
     */
    @JvmName("krfofwrcocegfsro")
    public suspend
    fun virtualNetworkRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountNetworkAclsVirtualNetworkRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument A `virtual_network_rules` block as defined below.
     */
    @JvmName("bggwmcfnvrmqotqi")
    public suspend fun virtualNetworkRules(
        vararg
        argument: suspend AccountNetworkAclsVirtualNetworkRuleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AccountNetworkAclsVirtualNetworkRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument A `virtual_network_rules` block as defined below.
     */
    @JvmName("oqnhkinratkopkhy")
    public suspend
    fun virtualNetworkRules(argument: suspend AccountNetworkAclsVirtualNetworkRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccountNetworkAclsVirtualNetworkRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param values A `virtual_network_rules` block as defined below.
     */
    @JvmName("ohecigmrjshatyqr")
    public suspend fun virtualNetworkRules(vararg values: AccountNetworkAclsVirtualNetworkRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.virtualNetworkRules = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy