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

com.pulumi.awsnative.ec2.kotlin.RouteArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.RouteArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Specifies a route in a route table. For more information, see [Routes](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#route-table-routes) in the *Amazon VPC User Guide*.
 *  You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.
 *  If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) in the ``AWS::EC2::Route`` resource to explicitly declare a dependency on the ``AWS::EC2::TransitGatewayAttachment`` resource.
 * @property carrierGatewayId The ID of the carrier gateway.
 *  You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.
 * @property coreNetworkArn The Amazon Resource Name (ARN) of the core network.
 * @property destinationCidrBlock The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify ``100.68.0.18/18``, we modify it to ``100.68.0.0/18``.
 * @property destinationIpv6CidrBlock The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
 * @property destinationPrefixListId The ID of a prefix list used for the destination match.
 * @property egressOnlyInternetGatewayId [IPv6 traffic only] The ID of an egress-only internet gateway.
 * @property gatewayId The ID of an internet gateway or virtual private gateway attached to your VPC.
 * @property instanceId The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
 * @property localGatewayId The ID of the local gateway.
 * @property natGatewayId [IPv4 traffic only] The ID of a NAT gateway.
 * @property networkInterfaceId The ID of a network interface.
 * @property routeTableId The ID of the route table for the route.
 * @property transitGatewayId The ID of a transit gateway.
 * @property vpcEndpointId The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
 * @property vpcPeeringConnectionId The ID of a VPC peering connection.
 */
public data class RouteArgs(
    public val carrierGatewayId: Output? = null,
    public val coreNetworkArn: Output? = null,
    public val destinationCidrBlock: Output? = null,
    public val destinationIpv6CidrBlock: Output? = null,
    public val destinationPrefixListId: Output? = null,
    public val egressOnlyInternetGatewayId: Output? = null,
    public val gatewayId: Output? = null,
    public val instanceId: Output? = null,
    public val localGatewayId: Output? = null,
    public val natGatewayId: Output? = null,
    public val networkInterfaceId: Output? = null,
    public val routeTableId: Output? = null,
    public val transitGatewayId: Output? = null,
    public val vpcEndpointId: Output? = null,
    public val vpcPeeringConnectionId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.RouteArgs =
        com.pulumi.awsnative.ec2.RouteArgs.builder()
            .carrierGatewayId(carrierGatewayId?.applyValue({ args0 -> args0 }))
            .coreNetworkArn(coreNetworkArn?.applyValue({ args0 -> args0 }))
            .destinationCidrBlock(destinationCidrBlock?.applyValue({ args0 -> args0 }))
            .destinationIpv6CidrBlock(destinationIpv6CidrBlock?.applyValue({ args0 -> args0 }))
            .destinationPrefixListId(destinationPrefixListId?.applyValue({ args0 -> args0 }))
            .egressOnlyInternetGatewayId(egressOnlyInternetGatewayId?.applyValue({ args0 -> args0 }))
            .gatewayId(gatewayId?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .localGatewayId(localGatewayId?.applyValue({ args0 -> args0 }))
            .natGatewayId(natGatewayId?.applyValue({ args0 -> args0 }))
            .networkInterfaceId(networkInterfaceId?.applyValue({ args0 -> args0 }))
            .routeTableId(routeTableId?.applyValue({ args0 -> args0 }))
            .transitGatewayId(transitGatewayId?.applyValue({ args0 -> args0 }))
            .vpcEndpointId(vpcEndpointId?.applyValue({ args0 -> args0 }))
            .vpcPeeringConnectionId(vpcPeeringConnectionId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RouteArgs].
 */
@PulumiTagMarker
public class RouteArgsBuilder internal constructor() {
    private var carrierGatewayId: Output? = null

    private var coreNetworkArn: Output? = null

    private var destinationCidrBlock: Output? = null

    private var destinationIpv6CidrBlock: Output? = null

    private var destinationPrefixListId: Output? = null

    private var egressOnlyInternetGatewayId: Output? = null

    private var gatewayId: Output? = null

    private var instanceId: Output? = null

    private var localGatewayId: Output? = null

    private var natGatewayId: Output? = null

    private var networkInterfaceId: Output? = null

    private var routeTableId: Output? = null

    private var transitGatewayId: Output? = null

    private var vpcEndpointId: Output? = null

    private var vpcPeeringConnectionId: Output? = null

    /**
     * @param value The ID of the carrier gateway.
     *  You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.
     */
    @JvmName("xsoqhlxflxybjqmw")
    public suspend fun carrierGatewayId(`value`: Output) {
        this.carrierGatewayId = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the core network.
     */
    @JvmName("jddadppvxyexegwv")
    public suspend fun coreNetworkArn(`value`: Output) {
        this.coreNetworkArn = value
    }

    /**
     * @param value The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify ``100.68.0.18/18``, we modify it to ``100.68.0.0/18``.
     */
    @JvmName("tkojixbgqablqahc")
    public suspend fun destinationCidrBlock(`value`: Output) {
        this.destinationCidrBlock = value
    }

    /**
     * @param value The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
     */
    @JvmName("faayiomppwsfwhdq")
    public suspend fun destinationIpv6CidrBlock(`value`: Output) {
        this.destinationIpv6CidrBlock = value
    }

    /**
     * @param value The ID of a prefix list used for the destination match.
     */
    @JvmName("pserslukprjnwnir")
    public suspend fun destinationPrefixListId(`value`: Output) {
        this.destinationPrefixListId = value
    }

    /**
     * @param value [IPv6 traffic only] The ID of an egress-only internet gateway.
     */
    @JvmName("oagfppqhpkthodsu")
    public suspend fun egressOnlyInternetGatewayId(`value`: Output) {
        this.egressOnlyInternetGatewayId = value
    }

    /**
     * @param value The ID of an internet gateway or virtual private gateway attached to your VPC.
     */
    @JvmName("btyecvxksdflvkri")
    public suspend fun gatewayId(`value`: Output) {
        this.gatewayId = value
    }

    /**
     * @param value The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
     */
    @JvmName("uvbhouilfwmfoypb")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value The ID of the local gateway.
     */
    @JvmName("kuyoyhmrivwlnldj")
    public suspend fun localGatewayId(`value`: Output) {
        this.localGatewayId = value
    }

    /**
     * @param value [IPv4 traffic only] The ID of a NAT gateway.
     */
    @JvmName("smnaryniyaipnmxb")
    public suspend fun natGatewayId(`value`: Output) {
        this.natGatewayId = value
    }

    /**
     * @param value The ID of a network interface.
     */
    @JvmName("pfmmltojupkftivl")
    public suspend fun networkInterfaceId(`value`: Output) {
        this.networkInterfaceId = value
    }

    /**
     * @param value The ID of the route table for the route.
     */
    @JvmName("rbawjihwqebfujcj")
    public suspend fun routeTableId(`value`: Output) {
        this.routeTableId = value
    }

    /**
     * @param value The ID of a transit gateway.
     */
    @JvmName("blqgwocirpeymchm")
    public suspend fun transitGatewayId(`value`: Output) {
        this.transitGatewayId = value
    }

    /**
     * @param value The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
     */
    @JvmName("ghgbctergobekegk")
    public suspend fun vpcEndpointId(`value`: Output) {
        this.vpcEndpointId = value
    }

    /**
     * @param value The ID of a VPC peering connection.
     */
    @JvmName("uqpvwcwrprjbtgeh")
    public suspend fun vpcPeeringConnectionId(`value`: Output) {
        this.vpcPeeringConnectionId = value
    }

    /**
     * @param value The ID of the carrier gateway.
     *  You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.
     */
    @JvmName("oqpfecgcsstqucog")
    public suspend fun carrierGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.carrierGatewayId = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the core network.
     */
    @JvmName("tmasjgtxlhypceys")
    public suspend fun coreNetworkArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coreNetworkArn = mapped
    }

    /**
     * @param value The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify ``100.68.0.18/18``, we modify it to ``100.68.0.0/18``.
     */
    @JvmName("dvmfoimvuodsnkyy")
    public suspend fun destinationCidrBlock(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationCidrBlock = mapped
    }

    /**
     * @param value The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
     */
    @JvmName("vslwyqolvnhbajyh")
    public suspend fun destinationIpv6CidrBlock(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationIpv6CidrBlock = mapped
    }

    /**
     * @param value The ID of a prefix list used for the destination match.
     */
    @JvmName("qnvtnovmhopnxygo")
    public suspend fun destinationPrefixListId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationPrefixListId = mapped
    }

    /**
     * @param value [IPv6 traffic only] The ID of an egress-only internet gateway.
     */
    @JvmName("fvthquujqtfqastn")
    public suspend fun egressOnlyInternetGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.egressOnlyInternetGatewayId = mapped
    }

    /**
     * @param value The ID of an internet gateway or virtual private gateway attached to your VPC.
     */
    @JvmName("gheemrmgskbcvqfx")
    public suspend fun gatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gatewayId = mapped
    }

    /**
     * @param value The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
     */
    @JvmName("vfumyceojvhdrbiu")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value The ID of the local gateway.
     */
    @JvmName("qwwaeooxrcgctpvt")
    public suspend fun localGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localGatewayId = mapped
    }

    /**
     * @param value [IPv4 traffic only] The ID of a NAT gateway.
     */
    @JvmName("fnbehsbllhnoirtx")
    public suspend fun natGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.natGatewayId = mapped
    }

    /**
     * @param value The ID of a network interface.
     */
    @JvmName("cybdoroaqcpermuc")
    public suspend fun networkInterfaceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkInterfaceId = mapped
    }

    /**
     * @param value The ID of the route table for the route.
     */
    @JvmName("qqfcukqmvwlasvsg")
    public suspend fun routeTableId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routeTableId = mapped
    }

    /**
     * @param value The ID of a transit gateway.
     */
    @JvmName("kgxgocoqvnnncvjw")
    public suspend fun transitGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitGatewayId = mapped
    }

    /**
     * @param value The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
     */
    @JvmName("piscvriiwuuudmal")
    public suspend fun vpcEndpointId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcEndpointId = mapped
    }

    /**
     * @param value The ID of a VPC peering connection.
     */
    @JvmName("pcglxusrwajgkpps")
    public suspend fun vpcPeeringConnectionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcPeeringConnectionId = mapped
    }

    internal fun build(): RouteArgs = RouteArgs(
        carrierGatewayId = carrierGatewayId,
        coreNetworkArn = coreNetworkArn,
        destinationCidrBlock = destinationCidrBlock,
        destinationIpv6CidrBlock = destinationIpv6CidrBlock,
        destinationPrefixListId = destinationPrefixListId,
        egressOnlyInternetGatewayId = egressOnlyInternetGatewayId,
        gatewayId = gatewayId,
        instanceId = instanceId,
        localGatewayId = localGatewayId,
        natGatewayId = natGatewayId,
        networkInterfaceId = networkInterfaceId,
        routeTableId = routeTableId,
        transitGatewayId = transitGatewayId,
        vpcEndpointId = vpcEndpointId,
        vpcPeeringConnectionId = vpcPeeringConnectionId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy