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

com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs.IPBlockArgs.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: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs

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.kubernetes.extensions.v1beta1.inputs.IPBlockArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.
 * @property cidr CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
 * @property except Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
 */
public data class IPBlockArgs(
    public val cidr: Output,
    public val except: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.IPBlockArgs =
        com.pulumi.kubernetes.extensions.v1beta1.inputs.IPBlockArgs.builder()
            .cidr(cidr.applyValue({ args0 -> args0 }))
            .except(except?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [IPBlockArgs].
 */
@PulumiTagMarker
public class IPBlockArgsBuilder internal constructor() {
    private var cidr: Output? = null

    private var except: Output>? = null

    /**
     * @param value CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
     */
    @JvmName("bnpjkruwdnqobrbi")
    public suspend fun cidr(`value`: Output) {
        this.cidr = value
    }

    /**
     * @param value Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
     */
    @JvmName("bkbjmohinrftcyvr")
    public suspend fun except(`value`: Output>) {
        this.except = value
    }

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

    /**
     * @param values Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
     */
    @JvmName("syrmbihacpkdeeuy")
    public suspend fun except(values: List>) {
        this.except = Output.all(values)
    }

    /**
     * @param value CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
     */
    @JvmName("quvxcbemnpvokohh")
    public suspend fun cidr(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cidr = mapped
    }

    /**
     * @param value Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
     */
    @JvmName("krowktrfkuciwpjn")
    public suspend fun except(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.except = mapped
    }

    /**
     * @param values Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
     */
    @JvmName("aehpljxxqgrtqrwm")
    public suspend fun except(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.except = mapped
    }

    internal fun build(): IPBlockArgs = IPBlockArgs(
        cidr = cidr ?: throw PulumiNullFieldException("cidr"),
        except = except,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy