com.pulumi.awsnative.ec2.kotlin.IpamResourceDiscovery.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.ec2.kotlin
import com.pulumi.awsnative.ec2.kotlin.outputs.IpamResourceDiscoveryIpamOperatingRegion
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import com.pulumi.awsnative.ec2.kotlin.outputs.IpamResourceDiscoveryIpamOperatingRegion.Companion.toKotlin as ipamResourceDiscoveryIpamOperatingRegionToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [IpamResourceDiscovery].
*/
@PulumiTagMarker
public class IpamResourceDiscoveryResourceBuilder internal constructor() {
public var name: String? = null
public var args: IpamResourceDiscoveryArgs = IpamResourceDiscoveryArgs()
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 IpamResourceDiscoveryArgsBuilder.() -> Unit) {
val builder = IpamResourceDiscoveryArgsBuilder()
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(): IpamResourceDiscovery {
val builtJavaResource = com.pulumi.awsnative.ec2.IpamResourceDiscovery(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IpamResourceDiscovery(builtJavaResource)
}
}
/**
* Resource Schema of AWS::EC2::IPAMResourceDiscovery Type
*/
public class IpamResourceDiscovery internal constructor(
override val javaResource: com.pulumi.awsnative.ec2.IpamResourceDiscovery,
) : KotlinCustomResource(javaResource, IpamResourceDiscoveryMapper) {
/**
* The resource discovery description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Amazon Resource Name (Arn) for the Resource Discovery.
*/
public val ipamResourceDiscoveryArn: Output
get() = javaResource.ipamResourceDiscoveryArn().applyValue({ args0 -> args0 })
/**
* Id of the IPAM Pool.
*/
public val ipamResourceDiscoveryId: Output
get() = javaResource.ipamResourceDiscoveryId().applyValue({ args0 -> args0 })
/**
* The region the resource discovery is setup in.
*/
public val ipamResourceDiscoveryRegion: Output
get() = javaResource.ipamResourceDiscoveryRegion().applyValue({ args0 -> args0 })
/**
* Determines whether or not address space from this pool is publicly advertised. Must be set if and only if the pool is IPv6.
*/
public val isDefault: Output
get() = javaResource.isDefault().applyValue({ args0 -> args0 })
/**
* The regions Resource Discovery is enabled for. Allows resource discoveries to be created in these regions, as well as enabling monitoring
*/
public val operatingRegions: Output>?
get() = javaResource.operatingRegions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
ipamResourceDiscoveryIpamOperatingRegionToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Owner Account ID of the Resource Discovery
*/
public val ownerId: Output
get() = javaResource.ownerId().applyValue({ args0 -> args0 })
/**
* The state of this Resource Discovery.
*/
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)
})
}
public object IpamResourceDiscoveryMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ec2.IpamResourceDiscovery::class == javaResource::class
override fun map(javaResource: Resource): IpamResourceDiscovery =
IpamResourceDiscovery(javaResource as com.pulumi.awsnative.ec2.IpamResourceDiscovery)
}
/**
* @see [IpamResourceDiscovery].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IpamResourceDiscovery].
*/
public suspend fun ipamResourceDiscovery(
name: String,
block: suspend IpamResourceDiscoveryResourceBuilder.() -> Unit,
): IpamResourceDiscovery {
val builder = IpamResourceDiscoveryResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IpamResourceDiscovery].
* @param name The _unique_ name of the resulting resource.
*/
public fun ipamResourceDiscovery(name: String): IpamResourceDiscovery {
val builder = IpamResourceDiscoveryResourceBuilder()
builder.name(name)
return builder.build()
}