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

com.pulumi.digitalocean.kotlin.outputs.FirewallInboundRule.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.38.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @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 An array containing the IDs of
 * the Kubernetes clusters from which the inbound traffic will be accepted.
 * @property sourceLoadBalancerUids An array containing the IDs
 * of the Load Balancers from which the inbound traffic will be accepted.
 * @property sourceTags An array containing the names of Tags
 * corresponding to groups of Droplets from which the inbound traffic
 * will be accepted.
 */
public data class FirewallInboundRule(
    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,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.FirewallInboundRule): FirewallInboundRule = FirewallInboundRule(
            portRange = javaType.portRange().map({ args0 -> args0 }).orElse(null),
            protocol = javaType.protocol(),
            sourceAddresses = javaType.sourceAddresses().map({ args0 -> args0 }),
            sourceDropletIds = javaType.sourceDropletIds().map({ args0 -> args0 }),
            sourceKubernetesIds = javaType.sourceKubernetesIds().map({ args0 -> args0 }),
            sourceLoadBalancerUids = javaType.sourceLoadBalancerUids().map({ args0 -> args0 }),
            sourceTags = javaType.sourceTags().map({ args0 -> args0 }),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy