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

com.pulumi.awsnative.ec2.kotlin.VpnConnectionRoute.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [VpnConnectionRoute].
 */
@PulumiTagMarker
public class VpnConnectionRouteResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: VpnConnectionRouteArgs = VpnConnectionRouteArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend VpnConnectionRouteArgsBuilder.() -> Unit) {
        val builder = VpnConnectionRouteArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): VpnConnectionRoute {
        val builtJavaResource = com.pulumi.awsnative.ec2.VpnConnectionRoute(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return VpnConnectionRoute(builtJavaResource)
    }
}

/**
 * Specifies a static route for a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.
 *  For more information, see [](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the *User Guide*.
 */
public class VpnConnectionRoute internal constructor(
    override val javaResource: com.pulumi.awsnative.ec2.VpnConnectionRoute,
) : KotlinCustomResource(javaResource, VpnConnectionRouteMapper) {
    /**
     * The CIDR block associated with the local subnet of the customer network.
     */
    public val destinationCidrBlock: Output
        get() = javaResource.destinationCidrBlock().applyValue({ args0 -> args0 })

    /**
     * The ID of the VPN connection.
     */
    public val vpnConnectionId: Output
        get() = javaResource.vpnConnectionId().applyValue({ args0 -> args0 })
}

public object VpnConnectionRouteMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.ec2.VpnConnectionRoute::class == javaResource::class

    override fun map(javaResource: Resource): VpnConnectionRoute = VpnConnectionRoute(
        javaResource as
            com.pulumi.awsnative.ec2.VpnConnectionRoute,
    )
}

/**
 * @see [VpnConnectionRoute].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [VpnConnectionRoute].
 */
public suspend fun vpnConnectionRoute(
    name: String,
    block: suspend VpnConnectionRouteResourceBuilder.() -> Unit,
): VpnConnectionRoute {
    val builder = VpnConnectionRouteResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [VpnConnectionRoute].
 * @param name The _unique_ name of the resulting resource.
 */
public fun vpnConnectionRoute(name: String): VpnConnectionRoute {
    val builder = VpnConnectionRouteResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy