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

com.pulumi.awsnative.networkmanager.kotlin.TransitGatewayRouteTableAttachment.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.networkmanager.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.networkmanager.kotlin.outputs.TransitGatewayRouteTableAttachmentProposedNetworkFunctionGroupChange
import com.pulumi.awsnative.networkmanager.kotlin.outputs.TransitGatewayRouteTableAttachmentProposedSegmentChange
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
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.networkmanager.kotlin.outputs.TransitGatewayRouteTableAttachmentProposedNetworkFunctionGroupChange.Companion.toKotlin as transitGatewayRouteTableAttachmentProposedNetworkFunctionGroupChangeToKotlin
import com.pulumi.awsnative.networkmanager.kotlin.outputs.TransitGatewayRouteTableAttachmentProposedSegmentChange.Companion.toKotlin as transitGatewayRouteTableAttachmentProposedSegmentChangeToKotlin

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

    public var args: TransitGatewayRouteTableAttachmentArgs = TransitGatewayRouteTableAttachmentArgs()

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

/**
 * AWS::NetworkManager::TransitGatewayRouteTableAttachment Resource Type definition.
 */
public class TransitGatewayRouteTableAttachment internal constructor(
    override val javaResource: com.pulumi.awsnative.networkmanager.TransitGatewayRouteTableAttachment,
) : KotlinCustomResource(javaResource, TransitGatewayRouteTableAttachmentMapper) {
    /**
     * The ID of the attachment.
     */
    public val attachmentId: Output
        get() = javaResource.attachmentId().applyValue({ args0 -> args0 })

    /**
     * The policy rule number associated with the attachment.
     */
    public val attachmentPolicyRuleNumber: Output
        get() = javaResource.attachmentPolicyRuleNumber().applyValue({ args0 -> args0 })

    /**
     * The type of attachment.
     */
    public val attachmentType: Output
        get() = javaResource.attachmentType().applyValue({ args0 -> args0 })

    /**
     * The ARN of a core network for the VPC attachment.
     */
    public val coreNetworkArn: Output
        get() = javaResource.coreNetworkArn().applyValue({ args0 -> args0 })

    /**
     * The ID of a core network where you're creating a site-to-site VPN attachment.
     */
    public val coreNetworkId: Output
        get() = javaResource.coreNetworkId().applyValue({ args0 -> args0 })

    /**
     * Creation time of the attachment.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The Region where the edge is located.
     */
    public val edgeLocation: Output
        get() = javaResource.edgeLocation().applyValue({ args0 -> args0 })

    /**
     * The name of the network function group attachment.
     */
    public val networkFunctionGroupName: Output?
        get() = javaResource.networkFunctionGroupName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Owner account of the attachment.
     */
    public val ownerAccountId: Output
        get() = javaResource.ownerAccountId().applyValue({ args0 -> args0 })

    /**
     * The Id of peering between transit gateway and core network.
     */
    public val peeringId: Output
        get() = javaResource.peeringId().applyValue({ args0 -> args0 })

    /**
     * The attachment to move from one network function group to another.
     */
    public val proposedNetworkFunctionGroupChange:
        Output?
        get() = javaResource.proposedNetworkFunctionGroupChange().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    transitGatewayRouteTableAttachmentProposedNetworkFunctionGroupChangeToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The attachment to move from one segment to another.
     */
    public val proposedSegmentChange: Output?
        get() = javaResource.proposedSegmentChange().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    transitGatewayRouteTableAttachmentProposedSegmentChangeToKotlin(args0)
                })
            }).orElse(null)
        })

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

    /**
     * The name of the segment that attachment is in.
     */
    public val segmentName: Output
        get() = javaResource.segmentName().applyValue({ args0 -> args0 })

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

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The Arn of transit gateway route table.
     */
    public val transitGatewayRouteTableArn: Output
        get() = javaResource.transitGatewayRouteTableArn().applyValue({ args0 -> args0 })

    /**
     * Last update time of the attachment.
     */
    public val updatedAt: Output
        get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
}

public object TransitGatewayRouteTableAttachmentMapper :
    ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.networkmanager.TransitGatewayRouteTableAttachment::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy