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

com.pulumi.digitalocean.kotlin.outputs.FirewallOutboundRule.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.35.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 destinationAddresses An array of strings containing the IPv4
 * addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the
 * outbound traffic will be allowed.
 * @property destinationDropletIds An array containing the IDs of
 * the Droplets to which the outbound traffic will be allowed.
 * @property destinationKubernetesIds An array containing the IDs of
 * the Kubernetes clusters to which the outbound traffic will be allowed.
 * @property destinationLoadBalancerUids An array containing the IDs
 * of the Load Balancers to which the outbound traffic will be allowed.
 * @property destinationTags An array containing the names of Tags
 * corresponding to groups of Droplets to which the outbound traffic will
 * be allowed.
 * @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".
 */
public data class FirewallOutboundRule(
    public val destinationAddresses: List? = null,
    public val destinationDropletIds: List? = null,
    public val destinationKubernetesIds: List? = null,
    public val destinationLoadBalancerUids: List? = null,
    public val destinationTags: List? = null,
    public val portRange: String? = null,
    public val protocol: String,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.FirewallOutboundRule): FirewallOutboundRule = FirewallOutboundRule(
            destinationAddresses = javaType.destinationAddresses().map({ args0 -> args0 }),
            destinationDropletIds = javaType.destinationDropletIds().map({ args0 -> args0 }),
            destinationKubernetesIds = javaType.destinationKubernetesIds().map({ args0 -> args0 }),
            destinationLoadBalancerUids = javaType.destinationLoadBalancerUids().map({ args0 -> args0 }),
            destinationTags = javaType.destinationTags().map({ args0 -> args0 }),
            portRange = javaType.portRange().map({ args0 -> args0 }).orElse(null),
            protocol = javaType.protocol(),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy