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

com.pulumi.gcp.compute.kotlin.inputs.FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs.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.13.1.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.FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property ipProtocol (Output)
 * The IP protocol to which this rule applies. The protocol
 * type is required when creating a firewall rule.
 * This value can either be one of the following well
 * known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp),
 * or the IP protocol number.
 * @property ports (Output)
 * An optional list of ports to which this rule applies. This field
 * is only applicable for UDP or TCP protocol. Each entry must be
 * either an integer or a range. If not specified, this rule
 * applies to connections through any port.
 * Example inputs include: ["22"], ["80","443"], and
 * ["12345-12349"].
 */
public data class FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs(
    public val ipProtocol: Output,
    public val ports: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs =
        com.pulumi.gcp.compute.inputs.FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs.builder()
            .ipProtocol(ipProtocol.applyValue({ args0 -> args0 }))
            .ports(ports?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs].
 */
@PulumiTagMarker
public class FirewallPolicyWithRulesRuleMatchLayer4ConfigArgsBuilder internal constructor() {
    private var ipProtocol: Output? = null

    private var ports: Output>? = null

    /**
     * @param value (Output)
     * The IP protocol to which this rule applies. The protocol
     * type is required when creating a firewall rule.
     * This value can either be one of the following well
     * known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp),
     * or the IP protocol number.
     */
    @JvmName("lbaddetgcmosbjbv")
    public suspend fun ipProtocol(`value`: Output) {
        this.ipProtocol = value
    }

    /**
     * @param value (Output)
     * An optional list of ports to which this rule applies. This field
     * is only applicable for UDP or TCP protocol. Each entry must be
     * either an integer or a range. If not specified, this rule
     * applies to connections through any port.
     * Example inputs include: ["22"], ["80","443"], and
     * ["12345-12349"].
     */
    @JvmName("fdtexprdwjhjtyhe")
    public suspend fun ports(`value`: Output>) {
        this.ports = value
    }

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

    /**
     * @param values (Output)
     * An optional list of ports to which this rule applies. This field
     * is only applicable for UDP or TCP protocol. Each entry must be
     * either an integer or a range. If not specified, this rule
     * applies to connections through any port.
     * Example inputs include: ["22"], ["80","443"], and
     * ["12345-12349"].
     */
    @JvmName("bixruovnirmgsspe")
    public suspend fun ports(values: List>) {
        this.ports = Output.all(values)
    }

    /**
     * @param value (Output)
     * The IP protocol to which this rule applies. The protocol
     * type is required when creating a firewall rule.
     * This value can either be one of the following well
     * known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp),
     * or the IP protocol number.
     */
    @JvmName("maqfceqwqpfmrmos")
    public suspend fun ipProtocol(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipProtocol = mapped
    }

    /**
     * @param value (Output)
     * An optional list of ports to which this rule applies. This field
     * is only applicable for UDP or TCP protocol. Each entry must be
     * either an integer or a range. If not specified, this rule
     * applies to connections through any port.
     * Example inputs include: ["22"], ["80","443"], and
     * ["12345-12349"].
     */
    @JvmName("dcktkhaajovgotaj")
    public suspend fun ports(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param values (Output)
     * An optional list of ports to which this rule applies. This field
     * is only applicable for UDP or TCP protocol. Each entry must be
     * either an integer or a range. If not specified, this rule
     * applies to connections through any port.
     * Example inputs include: ["22"], ["80","443"], and
     * ["12345-12349"].
     */
    @JvmName("mfapbrmwegcrelxg")
    public suspend fun ports(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    internal fun build(): FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs =
        FirewallPolicyWithRulesRuleMatchLayer4ConfigArgs(
            ipProtocol = ipProtocol ?: throw PulumiNullFieldException("ipProtocol"),
            ports = ports,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy