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

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

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

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

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

    public var args: TransitGatewayArgs = TransitGatewayArgs()

    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 TransitGatewayArgsBuilder.() -> Unit) {
        val builder = TransitGatewayArgsBuilder()
        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(): TransitGateway {
        val builtJavaResource = com.pulumi.awsnative.ec2.TransitGateway(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return TransitGateway(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::EC2::TransitGateway
 */
public class TransitGateway internal constructor(
    override val javaResource: com.pulumi.awsnative.ec2.TransitGateway,
) : KotlinCustomResource(javaResource, TransitGatewayMapper) {
    /**
     * A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
     */
    public val amazonSideAsn: Output?
        get() = javaResource.amazonSideAsn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the default association route table.
     */
    public val associationDefaultRouteTableId: Output?
        get() = javaResource.associationDefaultRouteTableId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Enable or disable automatic acceptance of attachment requests. Disabled by default.
     */
    public val autoAcceptSharedAttachments: Output?
        get() = javaResource.autoAcceptSharedAttachments().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the transit gateway.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * Enable or disable automatic association with the default association route table. Enabled by default.
     */
    public val defaultRouteTableAssociation: Output?
        get() = javaResource.defaultRouteTableAssociation().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.
     */
    public val defaultRouteTablePropagation: Output?
        get() = javaResource.defaultRouteTablePropagation().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The description of the transit gateway.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Enable or disable DNS support. Enabled by default.
     */
    public val dnsSupport: Output?
        get() = javaResource.dnsSupport().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Indicates whether multicast is enabled on the transit gateway
     */
    public val multicastSupport: Output?
        get() = javaResource.multicastSupport().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the default propagation route table.
     */
    public val propagationDefaultRouteTableId: Output?
        get() = javaResource.propagationDefaultRouteTableId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The tags for the transit gateway.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    public val transitGatewayArn: Output
        get() = javaResource.transitGatewayArn().applyValue({ args0 -> args0 })

    /**
     * The transit gateway CIDR blocks.
     */
    public val transitGatewayCidrBlocks: Output>?
        get() = javaResource.transitGatewayCidrBlocks().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * Enable or disable Equal Cost Multipath Protocol support. Enabled by default.
     */
    public val vpnEcmpSupport: Output?
        get() = javaResource.vpnEcmpSupport().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy