![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.networkmanager.kotlin.CustomerGatewayAssociation.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.networkmanager.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 [CustomerGatewayAssociation].
*/
@PulumiTagMarker
public class CustomerGatewayAssociationResourceBuilder internal constructor() {
public var name: String? = null
public var args: CustomerGatewayAssociationArgs = CustomerGatewayAssociationArgs()
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 CustomerGatewayAssociationArgsBuilder.() -> Unit) {
val builder = CustomerGatewayAssociationArgsBuilder()
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(): CustomerGatewayAssociation {
val builtJavaResource =
com.pulumi.awsnative.networkmanager.CustomerGatewayAssociation(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return CustomerGatewayAssociation(builtJavaResource)
}
}
/**
* The AWS::NetworkManager::CustomerGatewayAssociation type associates a customer gateway with a device and optionally, with a link.
*/
public class CustomerGatewayAssociation internal constructor(
override val javaResource: com.pulumi.awsnative.networkmanager.CustomerGatewayAssociation,
) : KotlinCustomResource(javaResource, CustomerGatewayAssociationMapper) {
/**
* The Amazon Resource Name (ARN) of the customer gateway.
*/
public val customerGatewayArn: Output
get() = javaResource.customerGatewayArn().applyValue({ args0 -> args0 })
/**
* The ID of the device
*/
public val deviceId: Output
get() = javaResource.deviceId().applyValue({ args0 -> args0 })
/**
* The ID of the global network.
*/
public val globalNetworkId: Output
get() = javaResource.globalNetworkId().applyValue({ args0 -> args0 })
/**
* The ID of the link
*/
public val linkId: Output?
get() = javaResource.linkId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object CustomerGatewayAssociationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.networkmanager.CustomerGatewayAssociation::class == javaResource::class
override fun map(javaResource: Resource): CustomerGatewayAssociation =
CustomerGatewayAssociation(
javaResource as
com.pulumi.awsnative.networkmanager.CustomerGatewayAssociation,
)
}
/**
* @see [CustomerGatewayAssociation].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [CustomerGatewayAssociation].
*/
public suspend fun customerGatewayAssociation(
name: String,
block: suspend CustomerGatewayAssociationResourceBuilder.() -> Unit,
): CustomerGatewayAssociation {
val builder = CustomerGatewayAssociationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [CustomerGatewayAssociation].
* @param name The _unique_ name of the resulting resource.
*/
public fun customerGatewayAssociation(name: String): CustomerGatewayAssociation {
val builder = CustomerGatewayAssociationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy