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

com.pulumi.azure.containerservice.kotlin.inputs.RegistryNetworkRuleSetArgs.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.containerservice.kotlin.inputs

import com.pulumi.azure.containerservice.inputs.RegistryNetworkRuleSetArgs.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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property defaultAction The behaviour for requests matching no rules. Either `Allow` or `Deny`. Defaults to `Allow`
 * @property ipRules One or more `ip_rule` blocks as defined below.
 * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
 * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
 * @property virtualNetworks
 */
public data class RegistryNetworkRuleSetArgs(
    public val defaultAction: Output? = null,
    public val ipRules: Output>? = null,
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    public val virtualNetworks: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerservice.inputs.RegistryNetworkRuleSetArgs =
        com.pulumi.azure.containerservice.inputs.RegistryNetworkRuleSetArgs.builder()
            .defaultAction(defaultAction?.applyValue({ args0 -> args0 }))
            .ipRules(
                ipRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .virtualNetworks(
                virtualNetworks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var ipRules: Output>? = null

    private var virtualNetworks: Output>? = null

    /**
     * @param value The behaviour for requests matching no rules. Either `Allow` or `Deny`. Defaults to `Allow`
     */
    @JvmName("qhmolhytpbjhgeef")
    public suspend fun defaultAction(`value`: Output) {
        this.defaultAction = value
    }

    /**
     * @param value One or more `ip_rule` blocks as defined below.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("iqeomhwxvvudvjks")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

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

    /**
     * @param values One or more `ip_rule` blocks as defined below.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("gblihdwosdmottgd")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("jobdvkerjdyrchsw")
    public suspend
    fun virtualNetworks(`value`: Output>) {
        this.virtualNetworks = value
    }

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

    /**
     * @param values
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("xjtfnkiyqjdawedo")
    public suspend
    fun virtualNetworks(values: List>) {
        this.virtualNetworks = Output.all(values)
    }

    /**
     * @param value The behaviour for requests matching no rules. Either `Allow` or `Deny`. Defaults to `Allow`
     */
    @JvmName("lqvbvmtywjlypwih")
    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.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("qaaohxcqhnenvpcr")
    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.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("xlaiijqhhfxxyywo")
    public suspend
    fun ipRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegistryNetworkRuleSetIpRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument One or more `ip_rule` blocks as defined below.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("vhclsmripxnekdks")
    public suspend fun ipRules(
        vararg
        argument: suspend RegistryNetworkRuleSetIpRuleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            RegistryNetworkRuleSetIpRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument One or more `ip_rule` blocks as defined below.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("asqibxniyscwhrlw")
    public suspend fun ipRules(argument: suspend RegistryNetworkRuleSetIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegistryNetworkRuleSetIpRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param values One or more `ip_rule` blocks as defined below.
     * > **NOTE:** `network_rule_set` is only supported with the `Premium` SKU at this time.
     * > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`.
     */
    @JvmName("bgsecdwvlclefskl")
    public suspend fun ipRules(vararg values: RegistryNetworkRuleSetIpRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("ykyelevofmscwafe")
    public suspend fun virtualNetworks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworks = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("redagwqnwbktextp")
    public suspend
    fun virtualNetworks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegistryNetworkRuleSetVirtualNetworkArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworks = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("gjurfnnlordhhhve")
    public suspend fun virtualNetworks(
        vararg
        argument: suspend RegistryNetworkRuleSetVirtualNetworkArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            RegistryNetworkRuleSetVirtualNetworkArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworks = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("egoemugyswomrwfq")
    public suspend
    fun virtualNetworks(argument: suspend RegistryNetworkRuleSetVirtualNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegistryNetworkRuleSetVirtualNetworkArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.virtualNetworks = mapped
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  The property `virtual_network` is deprecated since this is used exclusively for service endpoints
      which are being deprecated. Users are expected to use Private Endpoints instead. This property
      will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("ptrchmxakcwusydw")
    public suspend fun virtualNetworks(vararg values: RegistryNetworkRuleSetVirtualNetworkArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.virtualNetworks = mapped
    }

    internal fun build(): RegistryNetworkRuleSetArgs = RegistryNetworkRuleSetArgs(
        defaultAction = defaultAction,
        ipRules = ipRules,
        virtualNetworks = virtualNetworks,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy