![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.ec2.kotlin.TransitGatewayRouteTableAssociation.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 [TransitGatewayRouteTableAssociation].
*/
@PulumiTagMarker
public class TransitGatewayRouteTableAssociationResourceBuilder internal constructor() {
public var name: String? = null
public var args: TransitGatewayRouteTableAssociationArgs =
TransitGatewayRouteTableAssociationArgs()
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 TransitGatewayRouteTableAssociationArgsBuilder.() -> Unit) {
val builder = TransitGatewayRouteTableAssociationArgsBuilder()
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(): TransitGatewayRouteTableAssociation {
val builtJavaResource =
com.pulumi.awsnative.ec2.TransitGatewayRouteTableAssociation(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return TransitGatewayRouteTableAssociation(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::EC2::TransitGatewayRouteTableAssociation
*/
public class TransitGatewayRouteTableAssociation internal constructor(
override val javaResource: com.pulumi.awsnative.ec2.TransitGatewayRouteTableAssociation,
) : KotlinCustomResource(javaResource, TransitGatewayRouteTableAssociationMapper) {
/**
* The ID of transit gateway attachment.
*/
public val transitGatewayAttachmentId: Output
get() = javaResource.transitGatewayAttachmentId().applyValue({ args0 -> args0 })
/**
* The ID of transit gateway route table.
*/
public val transitGatewayRouteTableId: Output
get() = javaResource.transitGatewayRouteTableId().applyValue({ args0 -> args0 })
}
public object TransitGatewayRouteTableAssociationMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ec2.TransitGatewayRouteTableAssociation::class == javaResource::class
override fun map(javaResource: Resource): TransitGatewayRouteTableAssociation =
TransitGatewayRouteTableAssociation(
javaResource as
com.pulumi.awsnative.ec2.TransitGatewayRouteTableAssociation,
)
}
/**
* @see [TransitGatewayRouteTableAssociation].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [TransitGatewayRouteTableAssociation].
*/
public suspend fun transitGatewayRouteTableAssociation(
name: String,
block: suspend TransitGatewayRouteTableAssociationResourceBuilder.() -> Unit,
): TransitGatewayRouteTableAssociation {
val builder = TransitGatewayRouteTableAssociationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [TransitGatewayRouteTableAssociation].
* @param name The _unique_ name of the resulting resource.
*/
public fun transitGatewayRouteTableAssociation(name: String): TransitGatewayRouteTableAssociation {
val builder = TransitGatewayRouteTableAssociationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy