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

com.pulumi.gcp.compute.kotlin.inputs.FirewallPolicyRuleMatchArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.FirewallPolicyRuleMatchArgs.builder
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 destAddressGroups Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. Destination address groups is only supported in Egress rules.
 * @property destFqdns Domain names that will be used to match against the resolved domain name of destination of traffic. Can only be specified if DIRECTION is egress.
 * @property destIpRanges CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
 * @property destRegionCodes The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is egress.
 * @property destThreatIntelligences Name of the Google Cloud Threat Intelligence list.
 * @property layer4Configs Pairs of IP protocols and ports that the rule should match.
 * @property srcAddressGroups Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. Source address groups is only supported in Ingress rules.
 * @property srcFqdns Domain names that will be used to match against the resolved domain name of source of traffic. Can only be specified if DIRECTION is ingress.
 * @property srcIpRanges CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
 * @property srcRegionCodes The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is ingress.
 * @property srcThreatIntelligences Name of the Google Cloud Threat Intelligence list.
 * The `layer4_configs` block supports:
 */
public data class FirewallPolicyRuleMatchArgs(
    public val destAddressGroups: Output>? = null,
    public val destFqdns: Output>? = null,
    public val destIpRanges: Output>? = null,
    public val destRegionCodes: Output>? = null,
    public val destThreatIntelligences: Output>? = null,
    public val layer4Configs: Output>,
    public val srcAddressGroups: Output>? = null,
    public val srcFqdns: Output>? = null,
    public val srcIpRanges: Output>? = null,
    public val srcRegionCodes: Output>? = null,
    public val srcThreatIntelligences: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.FirewallPolicyRuleMatchArgs =
        com.pulumi.gcp.compute.inputs.FirewallPolicyRuleMatchArgs.builder()
            .destAddressGroups(destAddressGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .destFqdns(destFqdns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .destIpRanges(destIpRanges?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .destRegionCodes(destRegionCodes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .destThreatIntelligences(
                destThreatIntelligences?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .layer4Configs(
                layer4Configs.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .srcAddressGroups(srcAddressGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .srcFqdns(srcFqdns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .srcIpRanges(srcIpRanges?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .srcRegionCodes(srcRegionCodes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .srcThreatIntelligences(
                srcThreatIntelligences?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            ).build()
}

/**
 * Builder for [FirewallPolicyRuleMatchArgs].
 */
@PulumiTagMarker
public class FirewallPolicyRuleMatchArgsBuilder internal constructor() {
    private var destAddressGroups: Output>? = null

    private var destFqdns: Output>? = null

    private var destIpRanges: Output>? = null

    private var destRegionCodes: Output>? = null

    private var destThreatIntelligences: Output>? = null

    private var layer4Configs: Output>? = null

    private var srcAddressGroups: Output>? = null

    private var srcFqdns: Output>? = null

    private var srcIpRanges: Output>? = null

    private var srcRegionCodes: Output>? = null

    private var srcThreatIntelligences: Output>? = null

    /**
     * @param value Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. Destination address groups is only supported in Egress rules.
     */
    @JvmName("riwwhfsddmtdqnuw")
    public suspend fun destAddressGroups(`value`: Output>) {
        this.destAddressGroups = value
    }

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

    /**
     * @param values Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. Destination address groups is only supported in Egress rules.
     */
    @JvmName("fwkysundihypldiq")
    public suspend fun destAddressGroups(values: List>) {
        this.destAddressGroups = Output.all(values)
    }

    /**
     * @param value Domain names that will be used to match against the resolved domain name of destination of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("decxjjvbgvkehrgc")
    public suspend fun destFqdns(`value`: Output>) {
        this.destFqdns = value
    }

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

    /**
     * @param values Domain names that will be used to match against the resolved domain name of destination of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("avwxmodfqjypjicp")
    public suspend fun destFqdns(values: List>) {
        this.destFqdns = Output.all(values)
    }

    /**
     * @param value CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
     */
    @JvmName("squifkkmtndsehol")
    public suspend fun destIpRanges(`value`: Output>) {
        this.destIpRanges = value
    }

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

    /**
     * @param values CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
     */
    @JvmName("cdqsbxpglvfhqsng")
    public suspend fun destIpRanges(values: List>) {
        this.destIpRanges = Output.all(values)
    }

    /**
     * @param value The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("hraappbkaxngpayy")
    public suspend fun destRegionCodes(`value`: Output>) {
        this.destRegionCodes = value
    }

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

    /**
     * @param values The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("pnbjnxhyspduovyi")
    public suspend fun destRegionCodes(values: List>) {
        this.destRegionCodes = Output.all(values)
    }

    /**
     * @param value Name of the Google Cloud Threat Intelligence list.
     */
    @JvmName("epyvrtjnosldblum")
    public suspend fun destThreatIntelligences(`value`: Output>) {
        this.destThreatIntelligences = value
    }

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

    /**
     * @param values Name of the Google Cloud Threat Intelligence list.
     */
    @JvmName("albqcdgpuimujkvg")
    public suspend fun destThreatIntelligences(values: List>) {
        this.destThreatIntelligences = Output.all(values)
    }

    /**
     * @param value Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("hajwqgotvjewffrr")
    public suspend fun layer4Configs(`value`: Output>) {
        this.layer4Configs = value
    }

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

    /**
     * @param values Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("frilxhxbbcrwqvpg")
    public suspend fun layer4Configs(values: List>) {
        this.layer4Configs = Output.all(values)
    }

    /**
     * @param value Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. Source address groups is only supported in Ingress rules.
     */
    @JvmName("waetqllnhdactmfn")
    public suspend fun srcAddressGroups(`value`: Output>) {
        this.srcAddressGroups = value
    }

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

    /**
     * @param values Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. Source address groups is only supported in Ingress rules.
     */
    @JvmName("jfptvqnwiksaicym")
    public suspend fun srcAddressGroups(values: List>) {
        this.srcAddressGroups = Output.all(values)
    }

    /**
     * @param value Domain names that will be used to match against the resolved domain name of source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("ohenvgmpomiktvpk")
    public suspend fun srcFqdns(`value`: Output>) {
        this.srcFqdns = value
    }

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

    /**
     * @param values Domain names that will be used to match against the resolved domain name of source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("bhwjiuilecyoclkk")
    public suspend fun srcFqdns(values: List>) {
        this.srcFqdns = Output.all(values)
    }

    /**
     * @param value CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
     */
    @JvmName("gpotvjoqgshhtjjl")
    public suspend fun srcIpRanges(`value`: Output>) {
        this.srcIpRanges = value
    }

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

    /**
     * @param values CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
     */
    @JvmName("sucigtvglwndsego")
    public suspend fun srcIpRanges(values: List>) {
        this.srcIpRanges = Output.all(values)
    }

    /**
     * @param value The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("igvknhlblcggsgps")
    public suspend fun srcRegionCodes(`value`: Output>) {
        this.srcRegionCodes = value
    }

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

    /**
     * @param values The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("mwqyapkjuxjnflih")
    public suspend fun srcRegionCodes(values: List>) {
        this.srcRegionCodes = Output.all(values)
    }

    /**
     * @param value Name of the Google Cloud Threat Intelligence list.
     * The `layer4_configs` block supports:
     */
    @JvmName("kbnovthivkcpycjb")
    public suspend fun srcThreatIntelligences(`value`: Output>) {
        this.srcThreatIntelligences = value
    }

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

    /**
     * @param values Name of the Google Cloud Threat Intelligence list.
     * The `layer4_configs` block supports:
     */
    @JvmName("jpdrbjbwlbfwbwvg")
    public suspend fun srcThreatIntelligences(values: List>) {
        this.srcThreatIntelligences = Output.all(values)
    }

    /**
     * @param value Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. Destination address groups is only supported in Egress rules.
     */
    @JvmName("ytkmvnqwctqebywd")
    public suspend fun destAddressGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destAddressGroups = mapped
    }

    /**
     * @param values Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. Destination address groups is only supported in Egress rules.
     */
    @JvmName("rldwtjmycrpidyen")
    public suspend fun destAddressGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destAddressGroups = mapped
    }

    /**
     * @param value Domain names that will be used to match against the resolved domain name of destination of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("duvnwuxxqvggnbic")
    public suspend fun destFqdns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destFqdns = mapped
    }

    /**
     * @param values Domain names that will be used to match against the resolved domain name of destination of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("xoxffjqpdcxdnibk")
    public suspend fun destFqdns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destFqdns = mapped
    }

    /**
     * @param value CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
     */
    @JvmName("rdhrmjtyyllnxspw")
    public suspend fun destIpRanges(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destIpRanges = mapped
    }

    /**
     * @param values CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
     */
    @JvmName("orjdfodrpntunfmd")
    public suspend fun destIpRanges(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destIpRanges = mapped
    }

    /**
     * @param value The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("ctyqgvnvdgiwvcse")
    public suspend fun destRegionCodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destRegionCodes = mapped
    }

    /**
     * @param values The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is egress.
     */
    @JvmName("cnlxrcokjieifcyw")
    public suspend fun destRegionCodes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destRegionCodes = mapped
    }

    /**
     * @param value Name of the Google Cloud Threat Intelligence list.
     */
    @JvmName("iugaidclyjgumaym")
    public suspend fun destThreatIntelligences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destThreatIntelligences = mapped
    }

    /**
     * @param values Name of the Google Cloud Threat Intelligence list.
     */
    @JvmName("obrsnhrckaycvtjg")
    public suspend fun destThreatIntelligences(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destThreatIntelligences = mapped
    }

    /**
     * @param value Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("oofyqcnuphjgkdfg")
    public suspend fun layer4Configs(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.layer4Configs = mapped
    }

    /**
     * @param argument Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("ewbhbnacacvyslhq")
    public suspend fun layer4Configs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyRuleMatchLayer4ConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.layer4Configs = mapped
    }

    /**
     * @param argument Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("cubahyrouqsjixxm")
    public suspend fun layer4Configs(vararg argument: suspend FirewallPolicyRuleMatchLayer4ConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyRuleMatchLayer4ConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.layer4Configs = mapped
    }

    /**
     * @param argument Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("xilofidvfeggdkkf")
    public suspend fun layer4Configs(argument: suspend FirewallPolicyRuleMatchLayer4ConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FirewallPolicyRuleMatchLayer4ConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.layer4Configs = mapped
    }

    /**
     * @param values Pairs of IP protocols and ports that the rule should match.
     */
    @JvmName("kaqcyhvcmocjiygt")
    public suspend fun layer4Configs(vararg values: FirewallPolicyRuleMatchLayer4ConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.layer4Configs = mapped
    }

    /**
     * @param value Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. Source address groups is only supported in Ingress rules.
     */
    @JvmName("aejxxkvbxmbapklq")
    public suspend fun srcAddressGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.srcAddressGroups = mapped
    }

    /**
     * @param values Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. Source address groups is only supported in Ingress rules.
     */
    @JvmName("oejdwdjqmmijcjol")
    public suspend fun srcAddressGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.srcAddressGroups = mapped
    }

    /**
     * @param value Domain names that will be used to match against the resolved domain name of source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("pfylrcpybrdlajxu")
    public suspend fun srcFqdns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.srcFqdns = mapped
    }

    /**
     * @param values Domain names that will be used to match against the resolved domain name of source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("lugykrajqdaulhor")
    public suspend fun srcFqdns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.srcFqdns = mapped
    }

    /**
     * @param value CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
     */
    @JvmName("xlokjmqphhdymhup")
    public suspend fun srcIpRanges(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.srcIpRanges = mapped
    }

    /**
     * @param values CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
     */
    @JvmName("rgvqloyoabrrucix")
    public suspend fun srcIpRanges(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.srcIpRanges = mapped
    }

    /**
     * @param value The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("bsbivsnprerebibk")
    public suspend fun srcRegionCodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.srcRegionCodes = mapped
    }

    /**
     * @param values The Unicode country codes whose IP addresses will be used to match against the source of traffic. Can only be specified if DIRECTION is ingress.
     */
    @JvmName("pshnntnndngtembk")
    public suspend fun srcRegionCodes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.srcRegionCodes = mapped
    }

    /**
     * @param value Name of the Google Cloud Threat Intelligence list.
     * The `layer4_configs` block supports:
     */
    @JvmName("ymwbuxutdstcullj")
    public suspend fun srcThreatIntelligences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.srcThreatIntelligences = mapped
    }

    /**
     * @param values Name of the Google Cloud Threat Intelligence list.
     * The `layer4_configs` block supports:
     */
    @JvmName("qnyleypxgbiyfpwg")
    public suspend fun srcThreatIntelligences(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.srcThreatIntelligences = mapped
    }

    internal fun build(): FirewallPolicyRuleMatchArgs = FirewallPolicyRuleMatchArgs(
        destAddressGroups = destAddressGroups,
        destFqdns = destFqdns,
        destIpRanges = destIpRanges,
        destRegionCodes = destRegionCodes,
        destThreatIntelligences = destThreatIntelligences,
        layer4Configs = layer4Configs ?: throw PulumiNullFieldException("layer4Configs"),
        srcAddressGroups = srcAddressGroups,
        srcFqdns = srcFqdns,
        srcIpRanges = srcIpRanges,
        srcRegionCodes = srcRegionCodes,
        srcThreatIntelligences = srcThreatIntelligences,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy