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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@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.ConnectAttachmentOptions
import com.pulumi.awsnative.networkmanager.kotlin.outputs.ConnectAttachmentProposedSegmentChange
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.ConnectAttachmentOptions.Companion.toKotlin as connectAttachmentOptionsToKotlin
import com.pulumi.awsnative.networkmanager.kotlin.outputs.ConnectAttachmentProposedSegmentChange.Companion.toKotlin as connectAttachmentProposedSegmentChangeToKotlin

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

    public var args: ConnectAttachmentArgs = ConnectAttachmentArgs()

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

/**
 * AWS::NetworkManager::ConnectAttachment Resource Type Definition
 */
public class ConnectAttachment internal constructor(
    override val javaResource: com.pulumi.awsnative.networkmanager.ConnectAttachment,
) : KotlinCustomResource(javaResource, ConnectAttachmentMapper) {
    /**
     * 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.
     */
    public val coreNetworkArn: Output
        get() = javaResource.coreNetworkArn().applyValue({ args0 -> args0 })

    /**
     * ID of the CoreNetwork that the attachment will be attached to.
     */
    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 })

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

    /**
     * Protocol options for connect attachment
     */
    public val options: Output
        get() = javaResource.options().applyValue({ args0 ->
            args0.let({ args0 ->
                connectAttachmentOptionsToKotlin(args0)
            })
        })

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

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

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

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

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

    /**
     * Tags for the attachment.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Id of transport attachment
     */
    public val transportAttachmentId: Output
        get() = javaResource.transportAttachmentId().applyValue({ args0 -> args0 })

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy