com.pulumi.awsnative.networkmanager.kotlin.SiteToSiteVpnAttachment.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.SiteToSiteVpnAttachmentProposedSegmentChange
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.SiteToSiteVpnAttachmentProposedSegmentChange.Companion.toKotlin as siteToSiteVpnAttachmentProposedSegmentChangeToKotlin
/**
* Builder for [SiteToSiteVpnAttachment].
*/
@PulumiTagMarker
public class SiteToSiteVpnAttachmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: SiteToSiteVpnAttachmentArgs = SiteToSiteVpnAttachmentArgs()
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 SiteToSiteVpnAttachmentArgsBuilder.() -> Unit) {
val builder = SiteToSiteVpnAttachmentArgsBuilder()
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(): SiteToSiteVpnAttachment {
val builtJavaResource =
com.pulumi.awsnative.networkmanager.SiteToSiteVpnAttachment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SiteToSiteVpnAttachment(builtJavaResource)
}
}
/**
* AWS::NetworkManager::SiteToSiteVpnAttachment Resource Type definition.
*/
public class SiteToSiteVpnAttachment internal constructor(
override val javaResource: com.pulumi.awsnative.networkmanager.SiteToSiteVpnAttachment,
) : KotlinCustomResource(javaResource, SiteToSiteVpnAttachmentMapper) {
/**
* 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 })
/**
* Owner account of the attachment.
*/
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 ->
siteToSiteVpnAttachmentProposedSegmentChangeToKotlin(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 })
/**
* 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)
})
/**
* Last update time of the attachment.
*/
public val updatedAt: Output
get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
/**
* The ARN of the site-to-site VPN attachment.
*/
public val vpnConnectionArn: Output
get() = javaResource.vpnConnectionArn().applyValue({ args0 -> args0 })
}
public object SiteToSiteVpnAttachmentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.networkmanager.SiteToSiteVpnAttachment::class == javaResource::class
override fun map(javaResource: Resource): SiteToSiteVpnAttachment =
SiteToSiteVpnAttachment(
javaResource as
com.pulumi.awsnative.networkmanager.SiteToSiteVpnAttachment,
)
}
/**
* @see [SiteToSiteVpnAttachment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SiteToSiteVpnAttachment].
*/
public suspend fun siteToSiteVpnAttachment(
name: String,
block: suspend SiteToSiteVpnAttachmentResourceBuilder.() -> Unit,
): SiteToSiteVpnAttachment {
val builder = SiteToSiteVpnAttachmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SiteToSiteVpnAttachment].
* @param name The _unique_ name of the resulting resource.
*/
public fun siteToSiteVpnAttachment(name: String): SiteToSiteVpnAttachment {
val builder = SiteToSiteVpnAttachmentResourceBuilder()
builder.name(name)
return builder.build()
}