Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.digitalocean.kotlin.inputs
import com.pulumi.digitalocean.inputs.GetFirewallInboundRule.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
*
* @property portRange The ports on which traffic will be allowed
* specified as a string containing a single port, a range (e.g. "8000-9000"),
* or "1-65535" to open all ports for a protocol. Required for when protocol is
* `tcp` or `udp`.
* @property protocol The type of traffic to be allowed.
* This may be one of "tcp", "udp", or "icmp".
* @property sourceAddresses An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
* @property sourceDropletIds An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
* @property sourceKubernetesIds
* @property sourceLoadBalancerUids An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
* @property sourceTags A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*/
public data class GetFirewallInboundRule(
public val portRange: String? = null,
public val protocol: String,
public val sourceAddresses: List? = null,
public val sourceDropletIds: List? = null,
public val sourceKubernetesIds: List? = null,
public val sourceLoadBalancerUids: List? = null,
public val sourceTags: List? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.digitalocean.inputs.GetFirewallInboundRule =
com.pulumi.digitalocean.inputs.GetFirewallInboundRule.builder()
.portRange(portRange?.let({ args0 -> args0 }))
.protocol(protocol.let({ args0 -> args0 }))
.sourceAddresses(sourceAddresses?.let({ args0 -> args0.map({ args0 -> args0 }) }))
.sourceDropletIds(sourceDropletIds?.let({ args0 -> args0.map({ args0 -> args0 }) }))
.sourceKubernetesIds(sourceKubernetesIds?.let({ args0 -> args0.map({ args0 -> args0 }) }))
.sourceLoadBalancerUids(sourceLoadBalancerUids?.let({ args0 -> args0.map({ args0 -> args0 }) }))
.sourceTags(sourceTags?.let({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [GetFirewallInboundRule].
*/
@PulumiTagMarker
public class GetFirewallInboundRuleBuilder internal constructor() {
private var portRange: String? = null
private var protocol: String? = null
private var sourceAddresses: List? = null
private var sourceDropletIds: List? = null
private var sourceKubernetesIds: List? = null
private var sourceLoadBalancerUids: List? = null
private var sourceTags: List? = null
/**
* @param value The ports on which traffic will be allowed
* specified as a string containing a single port, a range (e.g. "8000-9000"),
* or "1-65535" to open all ports for a protocol. Required for when protocol is
* `tcp` or `udp`.
*/
@JvmName("elnkuutsutgrrvik")
public suspend fun portRange(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.portRange = mapped
}
/**
* @param value The type of traffic to be allowed.
* This may be one of "tcp", "udp", or "icmp".
*/
@JvmName("dxenrsnysfughgyh")
public suspend fun protocol(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> args0 })
this.protocol = mapped
}
/**
* @param value An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*/
@JvmName("ejrnvhobhthixceb")
public suspend fun sourceAddresses(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.sourceAddresses = mapped
}
/**
* @param values An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*/
@JvmName("buevwftxyeibrjse")
public suspend fun sourceAddresses(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> args0 })
this.sourceAddresses = mapped
}
/**
* @param value An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*/
@JvmName("onihfmjjfjxjipet")
public suspend fun sourceDropletIds(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.sourceDropletIds = mapped
}
/**
* @param values An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*/
@JvmName("dkdwpbnbtnbajkuj")
public suspend fun sourceDropletIds(vararg values: Int) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> args0 })
this.sourceDropletIds = mapped
}
/**
* @param value
*/
@JvmName("ulhacvlybabhaxhm")
public suspend fun sourceKubernetesIds(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.sourceKubernetesIds = mapped
}
/**
* @param values
*/
@JvmName("ofeqvpfmsdrufvds")
public suspend fun sourceKubernetesIds(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> args0 })
this.sourceKubernetesIds = mapped
}
/**
* @param value An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*/
@JvmName("xccamblsvkhnmpsd")
public suspend fun sourceLoadBalancerUids(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.sourceLoadBalancerUids = mapped
}
/**
* @param values An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*/
@JvmName("rmvykbvyaoainiwa")
public suspend fun sourceLoadBalancerUids(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> args0 })
this.sourceLoadBalancerUids = mapped
}
/**
* @param value A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*/
@JvmName("sbhcnililcduehwl")
public suspend fun sourceTags(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> args0 })
this.sourceTags = mapped
}
/**
* @param values A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*/
@JvmName("cdblsbaxcsmmqbdi")
public suspend fun sourceTags(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> args0 })
this.sourceTags = mapped
}
internal fun build(): GetFirewallInboundRule = GetFirewallInboundRule(
portRange = portRange,
protocol = protocol ?: throw PulumiNullFieldException("protocol"),
sourceAddresses = sourceAddresses,
sourceDropletIds = sourceDropletIds,
sourceKubernetesIds = sourceKubernetesIds,
sourceLoadBalancerUids = sourceLoadBalancerUids,
sourceTags = sourceTags,
)
}