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

com.pulumi.gcp.compute.kotlin.RouterNatAddressArgs.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.20.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RouterNatAddressArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A resource used to set the list of IP addresses to be used in a NAT service and manage the draining of destroyed IPs.
 * > **Note:** This resource is to be used alongside a `gcp.compute.RouterNat` resource,
 * the router nat resource must have no defined `nat_ips` or `drain_nat_ips` parameters,
 * instead using the `initial_nat_ips` parameter to set at least one IP for the creation of the resource.
 * To get more information about RouterNatAddress, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/routers)
 * * How-to Guides
 *     * [Google Cloud Router](https://cloud.google.com/router/docs/)
 * ## Example Usage
 * ## Import
 * RouterNatAddress can be imported using any of these accepted formats:
 * * `projects/{{project}}/regions/{{region}}/routers/{{router}}/{{router_nat}}`
 * * `{{project}}/{{region}}/{{router}}/{{router_nat}}`
 * * `{{region}}/{{router}}/{{router_nat}}`
 * * `{{router}}/{{router_nat}}`
 * When using the `pulumi import` command, RouterNatAddress can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default projects/{{project}}/regions/{{region}}/routers/{{router}}/{{router_nat}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{project}}/{{region}}/{{router}}/{{router_nat}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{region}}/{{router}}/{{router_nat}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/routerNatAddress:RouterNatAddress default {{router}}/{{router_nat}}
 * ```
 * @property drainNatIps A list of URLs of the IP resources to be drained. These IPs must be
 * valid static external IPs that have been assigned to the NAT.
 * @property natIps Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat
 * natIpAllocateOption is set to MANUAL_ONLY.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property region Region where the NAT service reside.
 * @property router The name of the Cloud Router in which the referenced NAT service is configured.
 * @property routerNat The name of the Nat service in which this address will be configured.
 * - - -
 */
public data class RouterNatAddressArgs(
    public val drainNatIps: Output>? = null,
    public val natIps: Output>? = null,
    public val project: Output? = null,
    public val region: Output? = null,
    public val router: Output? = null,
    public val routerNat: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.RouterNatAddressArgs =
        com.pulumi.gcp.compute.RouterNatAddressArgs.builder()
            .drainNatIps(drainNatIps?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .natIps(natIps?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 }))
            .router(router?.applyValue({ args0 -> args0 }))
            .routerNat(routerNat?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RouterNatAddressArgs].
 */
@PulumiTagMarker
public class RouterNatAddressArgsBuilder internal constructor() {
    private var drainNatIps: Output>? = null

    private var natIps: Output>? = null

    private var project: Output? = null

    private var region: Output? = null

    private var router: Output? = null

    private var routerNat: Output? = null

    /**
     * @param value A list of URLs of the IP resources to be drained. These IPs must be
     * valid static external IPs that have been assigned to the NAT.
     */
    @JvmName("mvhbranvvuneildt")
    public suspend fun drainNatIps(`value`: Output>) {
        this.drainNatIps = value
    }

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

    /**
     * @param values A list of URLs of the IP resources to be drained. These IPs must be
     * valid static external IPs that have been assigned to the NAT.
     */
    @JvmName("pxuomnnjxpcyprfj")
    public suspend fun drainNatIps(values: List>) {
        this.drainNatIps = Output.all(values)
    }

    /**
     * @param value Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat
     * natIpAllocateOption is set to MANUAL_ONLY.
     */
    @JvmName("aqiwqadnfoiwbqpq")
    public suspend fun natIps(`value`: Output>) {
        this.natIps = value
    }

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

    /**
     * @param values Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat
     * natIpAllocateOption is set to MANUAL_ONLY.
     */
    @JvmName("iegtplvehsfduoyu")
    public suspend fun natIps(values: List>) {
        this.natIps = Output.all(values)
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("ouwbjkjtpqgdoqho")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Region where the NAT service reside.
     */
    @JvmName("uaovctaqfxqqceir")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value The name of the Cloud Router in which the referenced NAT service is configured.
     */
    @JvmName("hjqddrdfsokrupkx")
    public suspend fun router(`value`: Output) {
        this.router = value
    }

    /**
     * @param value The name of the Nat service in which this address will be configured.
     * - - -
     */
    @JvmName("chrxqrxlejrpnkcc")
    public suspend fun routerNat(`value`: Output) {
        this.routerNat = value
    }

    /**
     * @param value A list of URLs of the IP resources to be drained. These IPs must be
     * valid static external IPs that have been assigned to the NAT.
     */
    @JvmName("pmjgajwegljgviqn")
    public suspend fun drainNatIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.drainNatIps = mapped
    }

    /**
     * @param values A list of URLs of the IP resources to be drained. These IPs must be
     * valid static external IPs that have been assigned to the NAT.
     */
    @JvmName("iroruflwdmwgmktk")
    public suspend fun drainNatIps(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.drainNatIps = mapped
    }

    /**
     * @param value Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat
     * natIpAllocateOption is set to MANUAL_ONLY.
     */
    @JvmName("bshutfltklejsccg")
    public suspend fun natIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.natIps = mapped
    }

    /**
     * @param values Self-links of NAT IPs to be used in a Nat service. Only valid if the referenced RouterNat
     * natIpAllocateOption is set to MANUAL_ONLY.
     */
    @JvmName("hyquoysbnqswrlgt")
    public suspend fun natIps(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.natIps = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("rnkgnlwaqsfyldqy")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Region where the NAT service reside.
     */
    @JvmName("dyxicjbnvfwensbl")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value The name of the Cloud Router in which the referenced NAT service is configured.
     */
    @JvmName("nkqkwamnbnxklbuc")
    public suspend fun router(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.router = mapped
    }

    /**
     * @param value The name of the Nat service in which this address will be configured.
     * - - -
     */
    @JvmName("iwkbnhqaslthebqb")
    public suspend fun routerNat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routerNat = mapped
    }

    internal fun build(): RouterNatAddressArgs = RouterNatAddressArgs(
        drainNatIps = drainNatIps,
        natIps = natIps,
        project = project,
        region = region,
        router = router,
        routerNat = routerNat,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy