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

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

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RouterBgpArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property advertiseMode User-specified flag to indicate which mode to use for advertisement.
 * Default value is `DEFAULT`.
 * Possible values are: `DEFAULT`, `CUSTOM`.
 * @property advertisedGroups User-specified list of prefix groups to advertise in custom mode.
 * This field can only be populated if advertiseMode is CUSTOM and
 * is advertised to all peers of the router. These groups will be
 * advertised in addition to any specified prefixes. Leave this field
 * blank to advertise no custom groups.
 * This enum field has the one valid value: ALL_SUBNETS
 * @property advertisedIpRanges User-specified list of individual IP ranges to advertise in
 * custom mode. This field can only be populated if advertiseMode
 * is CUSTOM and is advertised to all peers of the router. These IP
 * ranges will be advertised in addition to any specified groups.
 * Leave this field blank to advertise no custom IP ranges.
 * Structure is documented below.
 * @property asn Local BGP Autonomous System Number (ASN). Must be an RFC6996
 * private ASN, either 16-bit or 32-bit. The value will be fixed for
 * this router resource. All VPN tunnels that link to this router
 * will have the same local ASN.
 * @property identifierRange Explicitly specifies a range of valid BGP Identifiers for this Router.
 * It is provided as a link-local IPv4 range (from 169.254.0.0/16), of
 * size at least /30, even if the BGP sessions are over IPv6. It must
 * not overlap with any IPv4 BGP session ranges. Other vendors commonly
 * call this router ID.
 * @property keepaliveInterval The interval in seconds between BGP keepalive messages that are sent
 * to the peer. Hold time is three times the interval at which keepalive
 * messages are sent, and the hold time is the maximum number of seconds
 * allowed to elapse between successive keepalive messages that BGP
 * receives from a peer.
 * BGP will use the smaller of either the local hold time value or the
 * peer's hold time value as the hold time for the BGP connection
 * between the two peers. If set, this value must be between 20 and 60.
 * The default is 20.
 */
public data class RouterBgpArgs(
    public val advertiseMode: Output? = null,
    public val advertisedGroups: Output>? = null,
    public val advertisedIpRanges: Output>? = null,
    public val asn: Output,
    public val identifierRange: Output? = null,
    public val keepaliveInterval: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.RouterBgpArgs =
        com.pulumi.gcp.compute.inputs.RouterBgpArgs.builder()
            .advertiseMode(advertiseMode?.applyValue({ args0 -> args0 }))
            .advertisedGroups(advertisedGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .advertisedIpRanges(
                advertisedIpRanges?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .asn(asn.applyValue({ args0 -> args0 }))
            .identifierRange(identifierRange?.applyValue({ args0 -> args0 }))
            .keepaliveInterval(keepaliveInterval?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RouterBgpArgs].
 */
@PulumiTagMarker
public class RouterBgpArgsBuilder internal constructor() {
    private var advertiseMode: Output? = null

    private var advertisedGroups: Output>? = null

    private var advertisedIpRanges: Output>? = null

    private var asn: Output? = null

    private var identifierRange: Output? = null

    private var keepaliveInterval: Output? = null

    /**
     * @param value User-specified flag to indicate which mode to use for advertisement.
     * Default value is `DEFAULT`.
     * Possible values are: `DEFAULT`, `CUSTOM`.
     */
    @JvmName("ibejqxhyunbhoacu")
    public suspend fun advertiseMode(`value`: Output) {
        this.advertiseMode = value
    }

    /**
     * @param value User-specified list of prefix groups to advertise in custom mode.
     * This field can only be populated if advertiseMode is CUSTOM and
     * is advertised to all peers of the router. These groups will be
     * advertised in addition to any specified prefixes. Leave this field
     * blank to advertise no custom groups.
     * This enum field has the one valid value: ALL_SUBNETS
     */
    @JvmName("ogmuwnjxgdwrsmsi")
    public suspend fun advertisedGroups(`value`: Output>) {
        this.advertisedGroups = value
    }

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

    /**
     * @param values User-specified list of prefix groups to advertise in custom mode.
     * This field can only be populated if advertiseMode is CUSTOM and
     * is advertised to all peers of the router. These groups will be
     * advertised in addition to any specified prefixes. Leave this field
     * blank to advertise no custom groups.
     * This enum field has the one valid value: ALL_SUBNETS
     */
    @JvmName("ubclomnshcwgbcxf")
    public suspend fun advertisedGroups(values: List>) {
        this.advertisedGroups = Output.all(values)
    }

    /**
     * @param value User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("lctbtxdgorekipgx")
    public suspend fun advertisedIpRanges(`value`: Output>) {
        this.advertisedIpRanges = value
    }

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

    /**
     * @param values User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("nffnpytvkhraecnh")
    public suspend fun advertisedIpRanges(values: List>) {
        this.advertisedIpRanges = Output.all(values)
    }

    /**
     * @param value Local BGP Autonomous System Number (ASN). Must be an RFC6996
     * private ASN, either 16-bit or 32-bit. The value will be fixed for
     * this router resource. All VPN tunnels that link to this router
     * will have the same local ASN.
     */
    @JvmName("jukycfvoswvcoyyk")
    public suspend fun asn(`value`: Output) {
        this.asn = value
    }

    /**
     * @param value Explicitly specifies a range of valid BGP Identifiers for this Router.
     * It is provided as a link-local IPv4 range (from 169.254.0.0/16), of
     * size at least /30, even if the BGP sessions are over IPv6. It must
     * not overlap with any IPv4 BGP session ranges. Other vendors commonly
     * call this router ID.
     */
    @JvmName("hbtidkrtgypxmjka")
    public suspend fun identifierRange(`value`: Output) {
        this.identifierRange = value
    }

    /**
     * @param value The interval in seconds between BGP keepalive messages that are sent
     * to the peer. Hold time is three times the interval at which keepalive
     * messages are sent, and the hold time is the maximum number of seconds
     * allowed to elapse between successive keepalive messages that BGP
     * receives from a peer.
     * BGP will use the smaller of either the local hold time value or the
     * peer's hold time value as the hold time for the BGP connection
     * between the two peers. If set, this value must be between 20 and 60.
     * The default is 20.
     */
    @JvmName("hprxsslmsregnoxm")
    public suspend fun keepaliveInterval(`value`: Output) {
        this.keepaliveInterval = value
    }

    /**
     * @param value User-specified flag to indicate which mode to use for advertisement.
     * Default value is `DEFAULT`.
     * Possible values are: `DEFAULT`, `CUSTOM`.
     */
    @JvmName("attjsbkgrqorsumy")
    public suspend fun advertiseMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advertiseMode = mapped
    }

    /**
     * @param value User-specified list of prefix groups to advertise in custom mode.
     * This field can only be populated if advertiseMode is CUSTOM and
     * is advertised to all peers of the router. These groups will be
     * advertised in addition to any specified prefixes. Leave this field
     * blank to advertise no custom groups.
     * This enum field has the one valid value: ALL_SUBNETS
     */
    @JvmName("ksnqeyickvcngxmy")
    public suspend fun advertisedGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advertisedGroups = mapped
    }

    /**
     * @param values User-specified list of prefix groups to advertise in custom mode.
     * This field can only be populated if advertiseMode is CUSTOM and
     * is advertised to all peers of the router. These groups will be
     * advertised in addition to any specified prefixes. Leave this field
     * blank to advertise no custom groups.
     * This enum field has the one valid value: ALL_SUBNETS
     */
    @JvmName("rusysccmdyhmrsto")
    public suspend fun advertisedGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.advertisedGroups = mapped
    }

    /**
     * @param value User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("feepulyxfpxvsvce")
    public suspend fun advertisedIpRanges(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advertisedIpRanges = mapped
    }

    /**
     * @param argument User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("pjytsatchnmfyefe")
    public suspend fun advertisedIpRanges(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RouterBgpAdvertisedIpRangeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.advertisedIpRanges = mapped
    }

    /**
     * @param argument User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("rvpuqaoiiehdmnfy")
    public suspend fun advertisedIpRanges(vararg argument: suspend RouterBgpAdvertisedIpRangeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RouterBgpAdvertisedIpRangeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.advertisedIpRanges = mapped
    }

    /**
     * @param argument User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("okptwgpptmmopauo")
    public suspend fun advertisedIpRanges(argument: suspend RouterBgpAdvertisedIpRangeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RouterBgpAdvertisedIpRangeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.advertisedIpRanges = mapped
    }

    /**
     * @param values User-specified list of individual IP ranges to advertise in
     * custom mode. This field can only be populated if advertiseMode
     * is CUSTOM and is advertised to all peers of the router. These IP
     * ranges will be advertised in addition to any specified groups.
     * Leave this field blank to advertise no custom IP ranges.
     * Structure is documented below.
     */
    @JvmName("cavcyugjsglabavl")
    public suspend fun advertisedIpRanges(vararg values: RouterBgpAdvertisedIpRangeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.advertisedIpRanges = mapped
    }

    /**
     * @param value Local BGP Autonomous System Number (ASN). Must be an RFC6996
     * private ASN, either 16-bit or 32-bit. The value will be fixed for
     * this router resource. All VPN tunnels that link to this router
     * will have the same local ASN.
     */
    @JvmName("ysawlexdkqgnenum")
    public suspend fun asn(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.asn = mapped
    }

    /**
     * @param value Explicitly specifies a range of valid BGP Identifiers for this Router.
     * It is provided as a link-local IPv4 range (from 169.254.0.0/16), of
     * size at least /30, even if the BGP sessions are over IPv6. It must
     * not overlap with any IPv4 BGP session ranges. Other vendors commonly
     * call this router ID.
     */
    @JvmName("snimncfanpkhjixv")
    public suspend fun identifierRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identifierRange = mapped
    }

    /**
     * @param value The interval in seconds between BGP keepalive messages that are sent
     * to the peer. Hold time is three times the interval at which keepalive
     * messages are sent, and the hold time is the maximum number of seconds
     * allowed to elapse between successive keepalive messages that BGP
     * receives from a peer.
     * BGP will use the smaller of either the local hold time value or the
     * peer's hold time value as the hold time for the BGP connection
     * between the two peers. If set, this value must be between 20 and 60.
     * The default is 20.
     */
    @JvmName("pehcoyvpfqnnufyk")
    public suspend fun keepaliveInterval(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keepaliveInterval = mapped
    }

    internal fun build(): RouterBgpArgs = RouterBgpArgs(
        advertiseMode = advertiseMode,
        advertisedGroups = advertisedGroups,
        advertisedIpRanges = advertisedIpRanges,
        asn = asn ?: throw PulumiNullFieldException("asn"),
        identifierRange = identifierRange,
        keepaliveInterval = keepaliveInterval,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy