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

com.pulumi.awsnative.networkmanager.kotlin.TransitGatewayPeering.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.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 [TransitGatewayPeering].
 */
@PulumiTagMarker
public class TransitGatewayPeeringResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: TransitGatewayPeeringArgs = TransitGatewayPeeringArgs()

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

/**
 * AWS::NetworkManager::TransitGatewayPeering Resoruce Type.
 */
public class TransitGatewayPeering internal constructor(
    override val javaResource: com.pulumi.awsnative.networkmanager.TransitGatewayPeering,
) : KotlinCustomResource(javaResource, TransitGatewayPeeringMapper) {
    /**
     * The ARN (Amazon Resource Name) of the core network that you want to peer a transit gateway to.
     */
    public val coreNetworkArn: Output
        get() = javaResource.coreNetworkArn().applyValue({ args0 -> args0 })

    /**
     * The Id of the core network that you want to peer a transit gateway to.
     */
    public val coreNetworkId: Output
        get() = javaResource.coreNetworkId().applyValue({ args0 -> args0 })

    /**
     * The creation time of the transit gateway peering
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

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

    /**
     * Peering owner account Id
     */
    public val ownerAccountId: Output
        get() = javaResource.ownerAccountId().applyValue({ args0 -> args0 })

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

    /**
     * Peering type (TransitGatewayPeering)
     */
    public val peeringType: Output
        get() = javaResource.peeringType().applyValue({ args0 -> args0 })

    /**
     * The ARN (Amazon Resource Name) of the resource that you will peer to a core network
     */
    public val resourceArn: Output
        get() = javaResource.resourceArn().applyValue({ args0 -> args0 })

    /**
     * The state of the transit gateway peering
     */
    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 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The ARN (Amazon Resource Name) of the transit gateway that you will peer to a core network
     */
    public val transitGatewayArn: Output
        get() = javaResource.transitGatewayArn().applyValue({ args0 -> args0 })

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy