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

com.pulumi.awsnative.ec2.kotlin.LocalGatewayRouteTable.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

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

    public var args: LocalGatewayRouteTableArgs = LocalGatewayRouteTableArgs()

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

/**
 * Describes a route table for a local gateway.
 */
public class LocalGatewayRouteTable internal constructor(
    override val javaResource: com.pulumi.awsnative.ec2.LocalGatewayRouteTable,
) : KotlinCustomResource(javaResource, LocalGatewayRouteTableMapper) {
    /**
     * The ID of the local gateway.
     */
    public val localGatewayId: Output
        get() = javaResource.localGatewayId().applyValue({ args0 -> args0 })

    /**
     * The ARN of the local gateway route table.
     */
    public val localGatewayRouteTableArn: Output
        get() = javaResource.localGatewayRouteTableArn().applyValue({ args0 -> args0 })

    /**
     * The ID of the local gateway route table.
     */
    public val localGatewayRouteTableId: Output
        get() = javaResource.localGatewayRouteTableId().applyValue({ args0 -> args0 })

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

    /**
     * The ARN of the outpost.
     */
    public val outpostArn: Output
        get() = javaResource.outpostArn().applyValue({ args0 -> args0 })

    /**
     * The owner of the local gateway route table.
     */
    public val ownerId: Output
        get() = javaResource.ownerId().applyValue({ args0 -> args0 })

    /**
     * The state of the local gateway route table.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy