com.pulumi.awsnative.ec2.kotlin.DhcpOptions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [DhcpOptions].
*/
@PulumiTagMarker
public class DhcpOptionsResourceBuilder internal constructor() {
public var name: String? = null
public var args: DhcpOptionsArgs = DhcpOptionsArgs()
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 DhcpOptionsArgsBuilder.() -> Unit) {
val builder = DhcpOptionsArgsBuilder()
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(): DhcpOptions {
val builtJavaResource = com.pulumi.awsnative.ec2.DhcpOptions(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DhcpOptions(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::EC2::DHCPOptions
*/
public class DhcpOptions internal constructor(
override val javaResource: com.pulumi.awsnative.ec2.DhcpOptions,
) : KotlinCustomResource(javaResource, DhcpOptionsMapper) {
/**
* The ID of the DHCP options set.
*/
public val dhcpOptionsId: Output
get() = javaResource.dhcpOptionsId().applyValue({ args0 -> args0 })
/**
* This value is used to complete unqualified DNS hostnames.
*/
public val domainName: Output?
get() = javaResource.domainName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The IPv4 addresses of up to four domain name servers, or AmazonProvidedDNS.
*/
public val domainNameServers: Output>?
get() = javaResource.domainNameServers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The preferred Lease Time for ipV6 address in seconds.
*/
public val ipv6AddressPreferredLeaseTime: Output?
get() = javaResource.ipv6AddressPreferredLeaseTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The IPv4 addresses of up to four NetBIOS name servers.
*/
public val netbiosNameServers: Output>?
get() = javaResource.netbiosNameServers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The NetBIOS node type (1, 2, 4, or 8).
*/
public val netbiosNodeType: Output?
get() = javaResource.netbiosNodeType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The IPv4 addresses of up to four Network Time Protocol (NTP) servers.
*/
public val ntpServers: Output>?
get() = javaResource.ntpServers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* Any tags assigned to the DHCP options set.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object DhcpOptionsMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ec2.DhcpOptions::class == javaResource::class
override fun map(javaResource: Resource): DhcpOptions = DhcpOptions(
javaResource as
com.pulumi.awsnative.ec2.DhcpOptions,
)
}
/**
* @see [DhcpOptions].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DhcpOptions].
*/
public suspend fun dhcpOptions(name: String, block: suspend DhcpOptionsResourceBuilder.() -> Unit): DhcpOptions {
val builder = DhcpOptionsResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DhcpOptions].
* @param name The _unique_ name of the resulting resource.
*/
public fun dhcpOptions(name: String): DhcpOptions {
val builder = DhcpOptionsResourceBuilder()
builder.name(name)
return builder.build()
}