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

com.pulumi.gcp.compute.kotlin.outputs.RouterNatRule.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.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property action The action to be enforced for traffic that matches this rule.
 * Structure is documented below.
 * @property description An optional description of this rule.
 * @property match CEL expression that specifies the match condition that egress traffic from a VM is evaluated against.
 * If it evaluates to true, the corresponding action is enforced.
 * The following examples are valid match expressions for public NAT:
 * "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
 * "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
 * The following example is a valid match expression for private NAT:
 * "nexthop.hub == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"
 * @property ruleNumber An integer uniquely identifying a rule in the list.
 * The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
 */
public data class RouterNatRule(
    public val action: RouterNatRuleAction? = null,
    public val description: String? = null,
    public val match: String,
    public val ruleNumber: Int,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.RouterNatRule): RouterNatRule =
            RouterNatRule(
                action = javaType.action().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.gcp.compute.kotlin.outputs.RouterNatRuleAction.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                description = javaType.description().map({ args0 -> args0 }).orElse(null),
                match = javaType.match(),
                ruleNumber = javaType.ruleNumber(),
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy